diff -r c1f20ce4abcf -r 3e88ff8f41d5 kerneltest/e32test/usbho/t_otgdi/src/testcase0683.cpp --- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0683.cpp Tue Aug 31 16:34:26 2010 +0300 +++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0683.cpp Wed Sep 01 12:34:56 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2009 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,10 +25,6 @@ //#include "testcasewd.h" #include "b2bwatchers.h" #include "testcase0683.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "testcase0683Traces.h" -#endif #define _REPEATS (oOpenIterations*3) @@ -42,10 +38,7 @@ CTestCase0683* CTestCase0683::NewL(TBool aHost) { - if(gVerboseOutput) - { - OstTraceFunctionEntry0(CTESTCASE0683_NEWL); - } + LOG_FUNC CTestCase0683* self = new (ELeave) CTestCase0683(aHost); CleanupStack::PushL(self); self->ConstructL(); @@ -57,10 +50,7 @@ CTestCase0683::CTestCase0683(TBool aHost) : CTestCaseB2BRoot(KTestCaseId, aHost, iStatus) { - if(gVerboseOutput) - { - OstTraceFunctionEntry0(CTESTCASE0683_CTESTCASE0683); - } + LOG_FUNC } @@ -70,10 +60,7 @@ */ void CTestCase0683::ConstructL() { - if(gVerboseOutput) - { - OstTraceFunctionEntry0(CTESTCASE0683_CONSTRUCTL); - } + LOG_FUNC iDualRoleCase = ETrue; // another back-back @@ -83,10 +70,7 @@ CTestCase0683::~CTestCase0683() { - if(gVerboseOutput) - { - OstTraceFunctionEntry0(CTESTCASE0683_DCTESTCASE0683); - } + LOG_FUNC iCollector.DestroyObservers(); Cancel(); } @@ -94,10 +78,7 @@ void CTestCase0683::ExecuteTestCaseL() { - if(gVerboseOutput) - { - OstTraceFunctionEntry0(CTESTCASE0683_EXECUTETESTCASEL); - } + LOG_FUNC iCaseStep = EPreconditions; iHNPCounter = 3; // To be decremented to govern the number of times we do HNP. CActiveScheduler::Add(this); @@ -107,10 +88,7 @@ void CTestCase0683::DoCancel() { - if(gVerboseOutput) - { - OstTraceFunctionEntry0(CTESTCASE0683_DOCANCEL); - } + LOG_FUNC // cancel our timer iTimer.Cancel(); } @@ -119,10 +97,7 @@ // handle event completion void CTestCase0683::RunStepL() { - if(gVerboseOutput) - { - OstTraceFunctionEntry0(CTESTCASE0683_RUNSTEPL); - } + LOG_FUNC // Obtain the completion code for this CActive obj. TInt completionCode(iStatus.Int()); TBuf aDescription; @@ -206,7 +181,6 @@ case EDefaultRoles: { test.Printf(_L("Into EDefaultRoles step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP01, "Into EDefaultRoles step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { @@ -255,7 +229,6 @@ case EBConfigured: // A B-Device only step! { test.Printf(_L("Into EBConfigured step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP02, "Into EBConfigured step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { iCollector.DestroyObservers(); @@ -270,7 +243,6 @@ case EBSuspended: { test.Printf(_L("Into EBSuspended step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP03, "Into EBSuspended step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { iCollector.DestroyObservers(); @@ -281,14 +253,12 @@ { // issue bus request to trigger HNP test.Printf(_L("VBus present, attempting a swap.\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP04, "VBus present, attempting a swap.\n"); iCollector.AddRequiredNotification(EWatcherState, RUsbOtgDriver::EStateBHost); err = otgBusRequest(); // Request the host role if (KErrNone != err) { test.Printf(_L("BusRequest returned %d\n"),err); - OstTrace1(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP05, "BusRequest returned %d\n",err); return TestFailed(KErrAbort, _L("BusRequest() failed!")); } @@ -309,7 +279,6 @@ case EAIdleHostPriorToAPeripheral: // an "A-Device only" step { test.Printf(_L("Into EAIdleHostPriorToAPeripheral step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP06, "Into EAIdleHostPriorToAPeripheral step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { iCollector.DestroyObservers(); @@ -327,7 +296,6 @@ case ESwappedRoles: { test.Printf(_L("Into ESwappedRoles step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP07, "Into ESwappedRoles step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { iCollector.DestroyObservers(); @@ -353,7 +321,6 @@ case EAConfigured: // A-Device only step { test.Printf(_L("Into EAConfigured step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP08, "Into EAConfigured step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { iCollector.DestroyObservers(); @@ -370,7 +337,6 @@ case EASuspended: // A-Device only step { test.Printf(_L("Into EASuspended step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP09, "Into EASuspended step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { iCollector.DestroyObservers(); @@ -388,7 +354,6 @@ case EAIdleHostPriorToVBusDown: { test.Printf(_L("Into EAIdleHostPriorToVBusDown step...\n")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP10, "Into EAIdleHostPriorToVBusDown step...\n"); if (KTestCaseWatchdogTO == iStatus.Int()) { iCollector.DestroyObservers(); @@ -457,7 +422,6 @@ default: test.Printf(_L(" unknown test step")); - OstTrace0(TRACE_NORMAL, CTESTCASE0683_RUNSTEPL_DUP11, " unknown test step"); Cancel(); return (TestFailed(KErrCorrupt, _L(" unknown test step"))); }