--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0680.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0680.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 "b2bwatchers.h"
#include "testcase0680.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "testcase0680Traces.h"
-#endif
#define _REPEATS (oOpenIterations*3)
@@ -41,10 +37,7 @@
CTestCase0680* CTestCase0680::NewL(TBool aHost)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0680_NEWL);
- }
+ LOG_FUNC
CTestCase0680* self = new (ELeave) CTestCase0680(aHost);
CleanupStack::PushL(self);
self->ConstructL();
@@ -56,10 +49,7 @@
CTestCase0680::CTestCase0680(TBool aHost)
: CTestCaseB2BRoot(KTestCaseId, aHost, iStatus)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0680_CTESTCASE0680);
- }
+ LOG_FUNC
}
@@ -69,10 +59,7 @@
*/
void CTestCase0680::ConstructL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0680_CONSTRUCTL);
- }
+ LOG_FUNC
iDualRoleCase = ETrue; // another back-back
@@ -82,10 +69,7 @@
CTestCase0680::~CTestCase0680()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0680_DCTESTCASE0680);
- }
+ LOG_FUNC
iCollector.DestroyObservers();
Cancel();
}
@@ -93,10 +77,7 @@
void CTestCase0680::ExecuteTestCaseL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0680_EXECUTETESTCASEL);
- }
+ LOG_FUNC
iCaseStep = EPreconditions;
CActiveScheduler::Add(this);
SelfComplete();
@@ -105,10 +86,7 @@
void CTestCase0680::DoCancel()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0680_DOCANCEL);
- }
+ LOG_FUNC
// cancel our timer
iTimer.Cancel();
}
@@ -117,10 +95,7 @@
// handle event completion
void CTestCase0680::RunStepL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0680_RUNSTEPL);
- }
+ LOG_FUNC
// Obtain the completion code for this CActive obj.
TInt completionCode(iStatus.Int());
TBuf<MAX_DSTRLEN> aDescription;
@@ -169,7 +144,6 @@
case EReadyToRaiseVBus:
{
test.Printf(_L("Into EReadyToRaiseVBus step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP01, "Into EReadyToRaiseVBus step...\n");
if (gTestRoleMaster)
{
// wait for Vbus to be raised
@@ -203,7 +177,6 @@
case EDefaultRoles:
{
test.Printf(_L("Into EDefaultRoles step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP02, "Into EDefaultRoles step...\n");
LOG_STEPNAME(_L("EWaitEnumeration"));
if (gTestRoleMaster)
@@ -227,7 +200,6 @@
iCollector.AddStepTimeout(KTestCase0680ATimeout); // NB. In this test on the A-Device, we expect to timeout
// so a timeout isn't treated as a failure
test.Printf(_L("NOTE : Please observe test result on B-Device...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP03, "NOTE : Please observe test result on B-Device...\n");
iCaseStep = EDropVBus; // This is the step the A-Device will go to
// when the timer (set up in previous test) fires
}
@@ -239,7 +211,6 @@
case EBConfigured: // A B-Device only step!
{
test.Printf(_L("Into EBConfigured step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP04, "Into EBConfigured step...\n");
if (KTestCaseWatchdogTO == iStatus.Int())
{
iCollector.DestroyObservers();
@@ -249,13 +220,11 @@
iCollector.AddRequiredNotification(EWatcherMessage, RUsbOtgDriver::EMessageHnpNotSuspended);
test.Printf(_L("Attempting a swap on an unsuspended link...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP05, "Attempting a swap on an unsuspended link...\n");
err = otgBusRequest(); // Request the host role
if (KErrNone != err)
{
test.Printf(_L("BusRequest returned %d)"),err);
- OstTrace1(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP06, "BusRequest returned %d)",err);
return TestFailed(KErrAbort, _L("BusRequest() failed!"));
}
@@ -273,7 +242,6 @@
}
test.Printf(_L("Into EBErrorReceived step...\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP07, "Into EBErrorReceived step...\n");
iCaseStep = EDropVBus; // Test has pretty much passed now. Just wait for A-Device to drop VBus.
SelfComplete();
break;
@@ -334,7 +302,6 @@
default:
test.Printf(_L("<Error> unknown test step"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0680_RUNSTEPL_DUP08, "<Error> unknown test step");
Cancel();
return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));
}