kerneltest/e32test/usbho/t_otgdi/src/testcase0468.cpp
branchRCL_3
changeset 44 3e88ff8f41d5
parent 43 c1f20ce4abcf
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0468.cpp	Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0468.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 "testcase0468.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "testcase0468Traces.h"
-#endif
 
 #define _REPEATS (oOpenIterations*3)
 
@@ -40,10 +36,7 @@
 
 CTestCase0468* CTestCase0468::NewL(TBool aHost)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_NEWL);
-	    }
+	LOG_FUNC
 	CTestCase0468* self = new (ELeave) CTestCase0468(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -55,10 +48,7 @@
 CTestCase0468::CTestCase0468(TBool aHost)
 :	CTestCaseRoot(KTestCaseId, aHost)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_CTESTCASE0468);
-	    }
+	LOG_FUNC
 		
 	} 
 
@@ -68,10 +58,7 @@
 */
 void CTestCase0468::ConstructL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_CONSTRUCTL);
-	    }
+	LOG_FUNC
 	iWDTimer = CTestCaseWatchdog::NewL();
 	iRepeats = OPEN_REPEATS;
 		
@@ -81,10 +68,7 @@
 
 CTestCase0468::~CTestCase0468()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_DCTESTCASE0468);
-	    }
+	LOG_FUNC
 
 	Cancel();
 	delete iWDTimer;
@@ -94,10 +78,7 @@
 
 void CTestCase0468::ExecuteTestCaseL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_EXECUTETESTCASEL);
-	    }
+	LOG_FUNC
 	iCaseStep = EPreconditions;
 	
 	iRepeats = KOperationRetriesMax;	// VBus event rise retries
@@ -110,10 +91,7 @@
 	
 void CTestCase0468::DoCancel()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_DOCANCEL);
-	    }
+	LOG_FUNC
 
 	// cancel our timer
 	iTimer.Cancel();
@@ -122,10 +100,7 @@
 
 void CTestCase0468::CancelKB(CTestCaseRoot *pThis)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_CANCELKB);
-	    }
+	LOG_FUNC
 	CTestCase0468 * p = REINTERPRET_CAST(CTestCase0468 *,pThis);
 	// cancel any pending call, and then complete our active obj with a cancel value
 	p->iConsole->ReadCancel();
@@ -135,10 +110,7 @@
 
 void CTestCase0468::CancelNotify(CTestCaseRoot *pThis)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_CANCELNOTIFY);
-	    }
+	LOG_FUNC
 	CTestCase0468 * p = REINTERPRET_CAST(CTestCase0468 *,pThis);
 	// cancel any pending call, and then complete our active obj with a timeout value
 	p->otgCancelOtgVbusNotification();
@@ -150,18 +122,12 @@
 void CTestCase0468::DescribePreconditions()
 	{
 	test.Printf(_L("Insert 'A' connector beforehand.\n"));
-	OstTrace0(TRACE_NORMAL, CTESTCASE0468_DESCRIBEPRECONDITIONS, "Insert 'A' connector beforehand.\n");
 	test.Printf(_L("ID_PIN detection and VBus driving tests must already pass.\n"));
-	OstTrace0(TRACE_NORMAL, CTESTCASE0468_DESCRIBEPRECONDITIONS_DUP01, "ID_PIN detection and VBus driving tests must already pass.\n");
 	}
 
 void CTestCase0468::ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps aStep)
 	{
 	LOG_VERBOSE2(_L("Wait %dms before drop VBus"), (TInt)(aMicroSecs.Int()/1000));
-	if(gVerboseOutput)
-	    {
-	    OstTrace1(TRACE_VERBOSE, CTESTCASE0468_CONTINUEAFTER, "Wait %dms before drop VBus", (TInt)(aMicroSecs.Int()/1000));;
-	    }
 	iTimer.After(iStatus, aMicroSecs);
 	iCaseStep = aStep;
 	SetActive();
@@ -170,10 +136,7 @@
 // handle event completion	
 void CTestCase0468::RunStepL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0468_RUNSTEPL);
-	    }
+	LOG_FUNC
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
 	TBuf<MAX_DSTRLEN> aDescription;
@@ -192,9 +155,7 @@
 				}
 			// prompt to insert connector
 			test.Printf(KInsertAConnectorPrompt);
-			OstTrace0(TRACE_NORMAL, CTESTCASE0468_RUNSTEPL_DUP01, KInsertAConnectorPrompt);
 			test.Printf(KPressAnyKeyToContinue);
-			OstTrace0(TRACE_NORMAL, CTESTCASE0468_RUNSTEPL_DUP02, KPressAnyKeyToContinue);
 			RequestCharacter();			
 			break;
 			
@@ -220,9 +181,7 @@
 			if (!otgIdPinPresent())
 				{
 				test.Printf(KInsertAConnectorPrompt);
-				OstTrace0(TRACE_NORMAL, CTESTCASE0468_RUNSTEPL_DUP03, KInsertAConnectorPrompt);
 				test.Printf(KPressAnyKeyToContinue);
-				OstTrace0(TRACE_NORMAL, CTESTCASE0468_RUNSTEPL_DUP04, KPressAnyKeyToContinue);
 				RequestCharacter();
 
 				iCaseStep = EDetectAPlug;
@@ -251,10 +210,8 @@
 			// 4. DRIVE VBUS
 			iWDTimer->Cancel();
 			test.Printf(_L("Drive VBus, iteration %d/%d\n"), OPEN_REPEATS-iRepeats+1, OPEN_REPEATS);
-			OstTraceExt2(TRACE_NORMAL, CTESTCASE0468_RUNSTEPL_DUP05, "Drive VBus, iteration %d/%d\n", OPEN_REPEATS-iRepeats+1, OPEN_REPEATS);
 			// test for VBus rise next
 			test.Printf(_L("Waiting for VBus Event\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0468_RUNSTEPL_DUP06, "Waiting for VBus Event\n");
 			iStatus = KRequestPending;
 			otgQueueOtgVbusNotification( iOTGVBus, iStatus );
 
@@ -272,10 +229,6 @@
 		case ELoopVerifyVBus:
 			// 5. get VBus rise event
 			LOG_VERBOSE2(_L("Post notification val=%d\n\n"), iOTGVBus);
-			if(gVerboseOutput)
-			    {
-			    OstTrace1(TRACE_VERBOSE, CTESTCASE0468_RUNSTEPL_DUP07, "Post notification val=%d\n\n", iOTGVBus);;
-			    }
 			if (KTestCaseWatchdogTO == iStatus.Int())
 				{
 				return TestFailed(KErrAbort, _L("Vbus rise not signalled in time - FAILED!"));
@@ -360,7 +313,6 @@
 			
 		default:
 			test.Printf(_L("<Error> unknown test step"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0468_RUNSTEPL_DUP08, "<Error> unknown test step");
 			Cancel();
 			return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));
 		}