--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0678.cpp Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0678.cpp Tue Aug 31 16:34:26 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
@@ -25,6 +25,10 @@
//#include "testcasewd.h"
#include "b2bwatchers.h"
#include "testcase0678.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "testcase0678Traces.h"
+#endif
#define _REPEATS (oOpenIterations*3)
@@ -38,7 +42,10 @@
CTestCase0678* CTestCase0678::NewL(TBool aHost)
{
- LOG_FUNC
+ if(gVerboseOutput)
+ {
+ OstTraceFunctionEntry0(CTESTCASE0678_NEWL);
+ }
CTestCase0678* self = new (ELeave) CTestCase0678(aHost);
CleanupStack::PushL(self);
self->ConstructL();
@@ -50,7 +57,10 @@
CTestCase0678::CTestCase0678(TBool aHost)
: CTestCaseB2BRoot(KTestCaseId, aHost, iStatus)
{
- LOG_FUNC
+ if(gVerboseOutput)
+ {
+ OstTraceFunctionEntry0(CTESTCASE0678_CTESTCASE0678);
+ }
}
@@ -60,7 +70,10 @@
*/
void CTestCase0678::ConstructL()
{
- LOG_FUNC
+ if(gVerboseOutput)
+ {
+ OstTraceFunctionEntry0(CTESTCASE0678_CONSTRUCTL);
+ }
iDualRoleCase = ETrue; // another back-back
@@ -70,7 +83,10 @@
CTestCase0678::~CTestCase0678()
{
- LOG_FUNC
+ if(gVerboseOutput)
+ {
+ OstTraceFunctionEntry0(CTESTCASE0678_DCTESTCASE0678);
+ }
iCollector.DestroyObservers();
Cancel();
}
@@ -78,7 +94,10 @@
void CTestCase0678::ExecuteTestCaseL()
{
- LOG_FUNC
+ if(gVerboseOutput)
+ {
+ OstTraceFunctionEntry0(CTESTCASE0678_EXECUTETESTCASEL);
+ }
iCaseStep = EPreconditions;
iHNPCounter = 3; // To be decremented to govern the number of times we do HNP.
CActiveScheduler::Add(this);
@@ -88,7 +107,10 @@
void CTestCase0678::DoCancel()
{
- LOG_FUNC
+ if(gVerboseOutput)
+ {
+ OstTraceFunctionEntry0(CTESTCASE0678_DOCANCEL);
+ }
// cancel our timer
iTimer.Cancel();
}
@@ -97,7 +119,10 @@
// handle event completion
void CTestCase0678::RunStepL()
{
- LOG_FUNC
+ if(gVerboseOutput)
+ {
+ OstTraceFunctionEntry0(CTESTCASE0678_RUNSTEPL);
+ }
// Obtain the completion code for this CActive obj.
TInt completionCode(iStatus.Int());
TBuf<MAX_DSTRLEN> aDescription;
@@ -178,6 +203,7 @@
case EDefaultRoles:
{
test.Printf(_L("Into EDefaultRoles step...\n"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP01, "Into EDefaultRoles step...\n");
if ( --iHNPCounter >= 0)
{
@@ -210,6 +236,7 @@
case EBConfigured: // A B-Device only step!
{
test.Printf(_L("Into EBConfigured step...\n"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP02, "Into EBConfigured step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -224,6 +251,7 @@
case EBSuspended:
{
test.Printf(_L("Into EBSuspended step...\n"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP03, "Into EBSuspended step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -232,6 +260,7 @@
// issue HNP
test.Printf(_L("VBus present, attempting a swap.\n"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP04, "VBus present, attempting a swap.\n");
iCollector.AddRequiredNotification(EWatcherState, RUsbOtgDriver::EStateBHost);
err = otgBusRequest(); // Request the host role
@@ -239,6 +268,7 @@
if (KErrNone != err)
{
test.Printf(_L("BusRequest returned %d\n"),err);
+ OstTrace1(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP05, "BusRequest returned %d\n",err);
return TestFailed(KErrAbort, _L("BusRequest() failed!"));
}
@@ -250,6 +280,7 @@
case ESwappedRoles:
{
test.Printf(_L("Into ESwappedRoles step...\n"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP06, "Into ESwappedRoles step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -275,6 +306,7 @@
case EAConfigured: // A-Device only step
{
test.Printf(_L("Into EWaitTillAConfigured step...\n"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP07, "Into EWaitTillAConfigured step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -290,6 +322,7 @@
case EASuspended: // A-Device only step
{
test.Printf(_L("Into EWaitTillASuspended step...\n"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP08, "Into EWaitTillASuspended step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -357,6 +390,7 @@
default:
test.Printf(_L("<Error> unknown test step"));
+ OstTrace0(TRACE_NORMAL, CTESTCASE0678_RUNSTEPL_DUP09, "<Error> unknown test step");
Cancel();
return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));
}