diff -r 0a40b8675b23 -r d37db4dcc88d kerneltest/e32test/usbho/t_otgdi/src/testcase0466.cpp --- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0466.cpp Tue Aug 24 14:42:58 2010 +0100 +++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0466.cpp Tue Aug 24 14:49:21 2010 +0100 @@ -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 "testcase0466.h" +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "testcase0466Traces.h" +#endif @@ -34,7 +38,10 @@ CTestCase0466* CTestCase0466::NewL(TBool aHost) { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0466_NEWL); + } CTestCase0466* self = new (ELeave) CTestCase0466(aHost); CleanupStack::PushL(self); self->ConstructL(); @@ -46,7 +53,10 @@ CTestCase0466::CTestCase0466(TBool aHost) : CTestCaseRoot(KTestCaseId, aHost) { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0466_CTESTCASE0466); + } } @@ -56,7 +66,10 @@ */ void CTestCase0466::ConstructL() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0466_CONSTRUCTL); + } iWDTimer = CTestCaseWatchdog::NewL(); BaseConstructL(); @@ -65,7 +78,10 @@ CTestCase0466::~CTestCase0466() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0466_DCTESTCASE0466); + } Cancel(); delete iWDTimer; @@ -74,7 +90,10 @@ void CTestCase0466::ExecuteTestCaseL() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0466_EXECUTETESTCASEL); + } iCaseStep = EPreconditions; iRepeats = KOperationRetriesMax; @@ -88,23 +107,38 @@ void CTestCase0466::DescribePreconditions() { test.Printf(_L("BEFORE running this test\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS, "BEFORE running this test\n"); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP01, "\n"); test.Printf(_L("Insert the connector\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP02, "Insert the connector\n"); test.Printf(_L("from the OET with SW9\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP03, "from the OET with SW9\n"); test.Printf(_L("set to 'A-DEVICE' and\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP04, "set to 'A-DEVICE' and\n"); test.Printf(_L("all other switches OFF\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP05, "all other switches OFF\n"); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP06, "\n"); test.Printf(_L("Confirm passing tests\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP07, "Confirm passing tests\n"); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP08, "\n"); test.Printf(_L("ID_PIN detection\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP09, "ID_PIN detection\n"); test.Printf(_L("VBus Driving\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP10, "VBus Driving\n"); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_DESCRIBEPRECONDITIONS_DUP11, "\n"); } void CTestCase0466::DoCancel() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0466_DOCANCEL); + } // cancel our timer iTimer.Cancel(); @@ -123,7 +157,10 @@ // handle event completion void CTestCase0466::RunStepL() { - LOG_FUNC + if(gVerboseOutput) + { + OstTraceFunctionEntry0(CTESTCASE0466_RUNSTEPL); + } // Obtain the completion code for this CActive obj. TInt completionCode(iStatus.Int()); TBuf aDescription; @@ -141,10 +178,15 @@ } // prompt to insert connector test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP01, "\n"); test.Printf(KInsertAConnectorPrompt); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP02, KInsertAConnectorPrompt); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP03, "\n"); test.Printf(KPressAnyKeyToContinue); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP04, KPressAnyKeyToContinue); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP05, "\n"); RequestCharacter(); break; @@ -182,11 +224,17 @@ // ...and tell user to apply load test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP06, "\n"); test.Printf(_L("************************\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP07, "************************\n"); test.Printf(_L("* Using SW4 on the OET *\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP08, "* Using SW4 on the OET *\n"); test.Printf(_L("* Apply 100mA LOAD now *\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP09, "* Apply 100mA LOAD now *\n"); test.Printf(_L("************************\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP10, "************************\n"); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP11, "\n"); iCaseStep = EVerifyBusFail; @@ -196,6 +244,7 @@ OtgMessageString(iOTGMessage, aDescription); test.Printf(_L("Received message %d '%S' status(%d)\n"), iOTGMessage, &aDescription, completionCode); + OstTraceExt3(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP12, "Received message %d '%S' status(%d)\n", iOTGMessage, aDescription, completionCode); if (RUsbOtgDriver::EMessageVbusError == iOTGMessage) { @@ -234,15 +283,22 @@ // remove 100ma Load - this reminds the user test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP13, "\n"); test.Printf(_L("************************\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP14, "************************\n"); test.Printf(_L("* Using SW4 on the OET *\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP15, "* Using SW4 on the OET *\n"); test.Printf(_L("* Remove 100mA LOAD! *\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP16, "* Remove 100mA LOAD! *\n"); test.Printf(_L("************************\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP17, "************************\n"); test.Printf(_L("\n")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP18, "\n"); iCaseStep = ELastStep; // press any key test.Printf(KPressAnyKeyToContinue); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP19, KPressAnyKeyToContinue); RequestCharacter(); break; @@ -251,6 +307,7 @@ default: test.Printf(_L(" unknown test step")); + OstTrace0(TRACE_NORMAL, CTESTCASE0466_RUNSTEPL_DUP20, " unknown test step"); Cancel(); return (TestFailed(KErrCorrupt, _L(" unknown test step")));