--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0684.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0684.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 "testcase0684.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "testcase0684Traces.h"
-#endif
#include <e32debug.h>
@@ -44,10 +40,7 @@
CTestCase0684* CTestCase0684::NewL(TBool aHost)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0684_NEWL);
- }
+ LOG_FUNC
CTestCase0684* self = new (ELeave) CTestCase0684(aHost);
CleanupStack::PushL(self);
self->ConstructL();
@@ -59,10 +52,7 @@
CTestCase0684::CTestCase0684(TBool aHost)
: CTestCaseB2BRoot(KTestCaseId, aHost, iStatus)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0684_CTESTCASE0684);
- }
+ LOG_FUNC
}
@@ -72,10 +62,7 @@
*/
void CTestCase0684::ConstructL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0684_CONSTRUCTL);
- }
+ LOG_FUNC
iDualRoleCase = ETrue;
iBusRequestCounter = 2;
@@ -87,10 +74,7 @@
CTestCase0684::~CTestCase0684()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0684_DCTESTCASE0684);
- }
+ LOG_FUNC
iCollector.DestroyObservers();
Cancel();
}
@@ -98,10 +82,7 @@
void CTestCase0684::ExecuteTestCaseL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0684_EXECUTETESTCASEL);
- }
+ LOG_FUNC
iCaseStep = EPreconditions;
CActiveScheduler::Add(this);
SelfComplete();
@@ -110,19 +91,13 @@
void CTestCase0684::DoCancel()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0684_DOCANCEL);
- }
+ LOG_FUNC
// cancel our timer
iTimer.Cancel();
}
void CTestCase0684::RunStepL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0684_RUNSTEPL);
- }
+ LOG_FUNC
// Obtain the completion code for this CActive obj.
TInt completionCode(iStatus.Int());
@@ -186,7 +161,6 @@
case EReadyToRaiseVBus:
{
test.Printf(_L("Into EReadyToRaiseVBus step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP01, "Into EReadyToRaiseVBus step...\n");
if (gTestRoleMaster)
{
@@ -225,7 +199,6 @@
case EDefaultRoles:
{
test.Printf(_L("Into EDefaultRoles step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP02, "Into EDefaultRoles step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -248,7 +221,6 @@
case EAIdleHostPriorToAPeripheral: // an "A-Device only" step
{
test.Printf(_L("Into EAIdleHostPriorToAPeripheral step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP03, "Into EAIdleHostPriorToAPeripheral step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -268,11 +240,10 @@
case EBConfigured:
{
test.Printf(_L("Into EBConfigured step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP04, "Into EBConfigured step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP05, "Timeout");
+ RDebug::Print(_L("Timeout"));
return TestFailed(KErrAbort, _L("Timeout"));
}
iCollector.AddRequiredNotification(EWatcherPeripheralState, EUsbcDeviceStateSuspended);
@@ -284,17 +255,15 @@
case EBSuspended:
{
test.Printf(_L("Into EBSuspended step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP06, "Into EBSuspended step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP07, "Timeout");
+ RDebug::Print(_L("Timeout"));
return TestFailed(KErrAbort, _L("Timeout"));
}
if(iBusRequestCounter > 0){
test.Printf(_L("VBus present, attempting a swap.\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP08, "VBus present, attempting a swap.\n");
iCollector.AddRequiredNotification(EWatcherState, RUsbOtgDriver::EStateBHost);
iBusRequestCounter --;
@@ -302,7 +271,6 @@
if (KErrNone != err)
{
test.Printf(_L("BusRequest returned %d\n"),err);
- OstTrace1(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP09, "BusRequest returned %d\n",err);
return TestFailed(KErrAbort, _L("BusRequest() failed!"));
}
iCaseStep = EBToHost;
@@ -318,7 +286,6 @@
case EAToHost:
{
test.Printf(_L("Into EAToHost step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP10, "Into EAToHost step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -331,7 +298,6 @@
TUint16 val = 0;
GetMaxPower(val);
test.Printf(_L("bMaxPower= %d\n"), val);
- OstTrace1(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP11, "bMaxPower= %d\n", val);
iCollector.AddRequiredNotification(EWatcherState, RUsbOtgDriver::EStateAPeripheral);
iCaseStep = EAToPeripheral;
}
@@ -347,7 +313,6 @@
case EAToPeripheral:
{
test.Printf(_L("Into EAToPeripheral step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP12, "Into EAToPeripheral step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -362,7 +327,6 @@
case EBToHost:
{
test.Printf(_L("Into EBToHost step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP13, "Into EBToHost step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -377,7 +341,6 @@
case EBToPeripheral:
{
test.Printf(_L("Into EBToPeripheral step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP14, "Into EBToPeripheral step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -400,7 +363,6 @@
case EIdleHostPriorToVBusDown:
{
test.Printf(_L("Into EAIdleHostPriorToVBusDown step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP15, "Into EAIdleHostPriorToVBusDown step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
@@ -473,7 +435,6 @@
default:
test.Printf(_L("<Error> unknown test step"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0684_RUNSTEPL_DUP16, "<Error> unknown test step");
Cancel();
RequestCharacter();
return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));