diff -r a179b74831c9 -r c1f20ce4abcf kerneltest/e32test/usbho/t_otgdi/src/testcase0462.cpp --- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0462.cpp Thu Aug 19 11:14:22 2010 +0300 +++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0462.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" @@ -24,6 +24,10 @@ #include "testcaseroot.h" #include "testcasewd.h" #include "testcase0462.h" +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "testcase0462Traces.h" +#endif @@ -34,7 +38,10 @@ CTestCase0462* CTestCase0462::NewL(TBool aHost) { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0462_NEWL); + } CTestCase0462* self = new (ELeave) CTestCase0462(aHost); CleanupStack::PushL(self); self->ConstructL(); @@ -46,7 +53,10 @@ CTestCase0462::CTestCase0462(TBool aHost) : CTestCaseRoot(KTestCaseId, aHost) { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0462_CTESTCASE0462); + } } @@ -56,7 +66,10 @@ */ void CTestCase0462::ConstructL() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0462_CONSTRUCTL); + } iRepeats = KOperationRetriesMax; iWDTimer = CTestCaseWatchdog::NewL(); @@ -66,7 +79,10 @@ CTestCase0462::~CTestCase0462() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0462_DCTESTCASE0462); + } Cancel(); delete iWDTimer; @@ -75,7 +91,10 @@ void CTestCase0462::ExecuteTestCaseL() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0462_EXECUTETESTCASEL); + } iCaseStep = ELoadLdd; CActiveScheduler::Add(this); @@ -87,12 +106,16 @@ void CTestCase0462::DescribePreconditions() { test.Printf(_L("Insert 'A' connector beforehand.\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_DESCRIBEPRECONDITIONS, "Insert 'A' connector beforehand.\n"); } void CTestCase0462::DoCancel() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0462_DOCANCEL); + } // cancel our timer iTimer.Cancel(); @@ -111,7 +134,10 @@ // handle event completion void CTestCase0462::RunStepL() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0462_RUNSTEPL); + } // Obtain the completion code for this CActive obj. TInt completionCode(iStatus.Int()); // NOTE: Look at its iStatus.iFlags. @@ -132,7 +158,9 @@ } // prompt to insert connector test.Printf(KInsertAConnectorPrompt); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP01, KInsertAConnectorPrompt); test.Printf(KPressAnyKeyToContinue); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP02, KPressAnyKeyToContinue); RequestCharacter(); break; @@ -151,6 +179,7 @@ case ERegisterForEvents: // prompt to remove connector test.Printf(KRemoveAConnectorPrompt); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP03, KRemoveAConnectorPrompt); if (iDequeAttempts > 3) { return (TestFailed(KErrCorrupt, _L(" too many irrelevant/incorrect events"))); @@ -185,6 +214,7 @@ case EGetAndCancelEvent: OtgEventString(iOTGEvent, aDescription); test.Printf(_L("Received event %d '%S' status(%d)"), iOTGEvent, &aDescription, completionCode); + OstTraceExt3(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP04, "Received event %d '%S' status(%d)", iOTGEvent, aDescription, completionCode); if (RUsbOtgDriver::EEventAPlugRemoved == iOTGEvent) { otgQueueOtgEventRequest( iOTGEvent, iStatus); @@ -214,9 +244,11 @@ case EInsertA: // 6. remove 'A' iConsole->ReadCancel(); test.Printf(KInsertAConnectorPrompt); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP05, KInsertAConnectorPrompt); iCaseStep = ERemoveA; test.Printf(KPressAnyKeyToContinue); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP06, KPressAnyKeyToContinue); RequestCharacter(); break; @@ -224,11 +256,13 @@ case ERemoveA: iConsole->ReadCancel(); test.Printf(KRemoveAConnectorPrompt); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP07, KRemoveAConnectorPrompt); if (iRepeats-- >0) iCaseStep = EInsertA; else iCaseStep = ETallyEvents; test.Printf(KPressAnyKeyToContinue); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP08, KPressAnyKeyToContinue); RequestCharacter(); break; @@ -251,6 +285,7 @@ default: test.Printf(_L(" unknown test step")); + OstTrace0(TRACE_NORMAL, CTESTCASE0462_RUNSTEPL_DUP09, " unknown test step"); Cancel(); return (TestFailed(KErrCorrupt, _L(" unknown test step")));