--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0467.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0467.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"
@@ -24,10 +24,6 @@
#include "testcaseroot.h"
#include "testcasewd.h"
#include "testcase0467.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "testcase0467Traces.h"
-#endif
@@ -41,10 +37,7 @@
CTestCase0467* CTestCase0467::NewL(TBool aHost)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_NEWL);
- }
+ LOG_FUNC
CTestCase0467* self = new (ELeave) CTestCase0467(aHost);
CleanupStack::PushL(self);
self->ConstructL();
@@ -56,10 +49,7 @@
CTestCase0467::CTestCase0467(TBool aHost)
: CTestCaseRoot(KTestCaseId, aHost)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_CTESTCASE0467);
- }
+ LOG_FUNC
}
@@ -69,10 +59,7 @@
*/
void CTestCase0467::ConstructL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_CONSTRUCTL);
- }
+ LOG_FUNC
iRepeats = INSERT_REPEATS;
iWDTimer = CTestCaseWatchdog::NewL();
@@ -82,10 +69,7 @@
CTestCase0467::~CTestCase0467()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_DCTESTCASE0467);
- }
+ LOG_FUNC
Cancel();
delete iWDTimer;
@@ -95,10 +79,7 @@
void CTestCase0467::ExecuteTestCaseL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_EXECUTETESTCASEL);
- }
+ LOG_FUNC
iCaseStep = EPreconditions;
iRepeats = KOperationRetriesMax; // VBus event rise retries
@@ -111,10 +92,7 @@
void CTestCase0467::DoCancel()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_DOCANCEL);
- }
+ LOG_FUNC
// cancel our timer
iTimer.Cancel();
@@ -133,10 +111,7 @@
void CTestCase0467::CancelIdPin(CTestCaseRoot *pThis)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_CANCELIDPIN);
- }
+ LOG_FUNC
CTestCase0467 * p = REINTERPRET_CAST(CTestCase0467 *,pThis);
// cancel any pending call, and then complete our active obj with a timeout value
@@ -149,19 +124,14 @@
void CTestCase0467::DescribePreconditions()
{
test.Printf(_L("Remove 'A' connector beforehand.\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0467_DESCRIBEPRECONDITIONS, "Remove 'A' connector beforehand.\n");
test.Printf(_L("ID_PIN detection and VBus driving tests must already pass.\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0467_DESCRIBEPRECONDITIONS_DUP01, "ID_PIN detection and VBus driving tests must already pass.\n");
}
// handle event completion
void CTestCase0467::RunStepL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0467_RUNSTEPL);
- }
+ LOG_FUNC
// Obtain the completion code for this CActive obj.
TInt completionCode(iStatus.Int());
TBuf<MAX_DSTRLEN> aDescription;
@@ -178,9 +148,7 @@
}
// prompt to remove connector
test.Printf(KRemoveAConnectorPrompt);
- OstTrace0(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP01, KRemoveAConnectorPrompt);
test.Printf(KPressAnyKeyToContinue);
- OstTrace0(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP02, KPressAnyKeyToContinue);
RequestCharacter();
break;
@@ -198,7 +166,6 @@
case ERepeatLoop: // 2
test.Printf(_L("Repeat test %d/%d\n"), INSERT_REPEATS-iRepeats+1, INSERT_REPEATS);
- OstTraceExt2(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP03, "Repeat test %d/%d\n", INSERT_REPEATS-iRepeats+1, INSERT_REPEATS);
if (--iRepeats)
iCaseStep = EWaitForIDPresent;
@@ -210,7 +177,6 @@
case EWaitForIDPresent:
// 3. prompt for insertion
test.Printf(KInsertAConnectorPrompt);
- OstTrace0(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP04, KInsertAConnectorPrompt);
otgQueueOtgIdPinNotification( iOTGIdPin, iStatus );
SetActive();
@@ -221,10 +187,6 @@
case EVerifyIDPresent:
// 4. detect id_pin event
LOG_VERBOSE1(_L("STEP4 - detect id_pin event 'A'\n"));
- if(gVerboseOutput)
- {
- OstTrace0(TRACE_VERBOSE, CTESTCASE0467_RUNSTEPL_DUP05, "STEP4 - detect id_pin event 'A'\n");;
- }
// retrieve the current ID_PIN value
otgQueueOtgIdPinNotification( iOTGIdPin, iStatus );
@@ -262,7 +224,6 @@
case EWaitForIDGone:
// 5. prompt for insertion
test.Printf(KRemoveAConnectorPrompt);
- OstTrace0(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP06, KRemoveAConnectorPrompt);
otgQueueOtgIdPinNotification( iOTGIdPin, iStatus );
SetActive();
iCaseStep = EVerifyIDGone;
@@ -271,19 +232,13 @@
case EVerifyIDGone:
// 6. detect id_pin gone event
LOG_VERBOSE1(_L("STEP4 - detect id_pin remove event 'B'\n"));
- if(gVerboseOutput)
- {
- OstTrace0(TRACE_VERBOSE, CTESTCASE0467_RUNSTEPL_DUP07, "STEP4 - detect id_pin remove event 'B'\n");;
- }
test.Printf(_L("ID_PIN=%d\n"), iOTGIdPin);
- OstTrace1(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP08, "ID_PIN=%d\n", iOTGIdPin);
User::After(5000); // 5ms
otgQueueOtgIdPinNotification( iOTGIdPin, iStatus );
otgCancelOtgIdPinNotification();
User::WaitForRequest(iStatus); // swallow it
test.Printf(_L("ID_PIN=%d\n"), iOTGIdPin);
- OstTrace1(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP09, "ID_PIN=%d\n", iOTGIdPin);
if (iOTGIdPin != RUsbOtgDriver::EIdPinBPlug)
{
@@ -323,7 +278,6 @@
default:
test.Printf(_L("<Error> unknown test step"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0467_RUNSTEPL_DUP10, "<Error> unknown test step");
Cancel();
return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));
}