kerneltest/e32test/usbho/t_otgdi/src/testcase0670.cpp
changeset 253 d37db4dcc88d
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0670.cpp	Tue Aug 24 14:42:58 2010 +0100
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0670.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 "testcase0670.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "testcase0670Traces.h"
+#endif
 
 
 
@@ -34,7 +38,10 @@
 
 CTestCase0670* CTestCase0670::NewL(TBool aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0670_NEWL);
+	    }
 	CTestCase0670* self = new (ELeave) CTestCase0670(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -46,7 +53,10 @@
 CTestCase0670::CTestCase0670(TBool aHost)
 :	CTestCaseRoot(KTestCaseId, aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0670_CTESTCASE0670);
+	    }
 		
 	} 
 
@@ -82,7 +92,10 @@
 	
 void CTestCase0670::DoCancel()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0670_DOCANCEL);
+	    }
 
 	// cancel our timer
 	iTimer.Cancel();
@@ -110,19 +123,29 @@
 	{
 	// H4 width     ****************************
 	test.Printf(_L("***************************\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0670_DESCRIBEPRECONDITIONS, "***************************\n");
 	test.Printf(_L("* This test uses a Mini-A *\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0670_DESCRIBEPRECONDITIONS_DUP01, "* This test uses a Mini-A *\n");
 	test.Printf(_L("* to Mini-B cable to link *\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0670_DESCRIBEPRECONDITIONS_DUP02, "* to Mini-B cable to link *\n");
 	test.Printf(_L("* the H4 board to the OPT *\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0670_DESCRIBEPRECONDITIONS_DUP03, "* the H4 board to the OPT *\n");
 	test.Printf(_L("* and makes use of the    *\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0670_DESCRIBEPRECONDITIONS_DUP04, "* and makes use of the    *\n");
 	test.Printf(_L("*  USB OPT test code      *\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0670_DESCRIBEPRECONDITIONS_DUP05, "*  USB OPT test code      *\n");
 	test.Printf(_L("***************************\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0670_DESCRIBEPRECONDITIONS_DUP06, "***************************\n");
 	}
 
 
 // handle event completion	
 void CTestCase0670::RunStepL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0670_RUNSTEPL);
+	    }
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
 	TBuf<MAX_DSTRLEN> aDescription;
@@ -155,10 +178,14 @@
 		case EConnectAtoB:
 			// H4 width     ****************************
 			test.Printf(_L("\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP01, "\n");
 			test.Printf(_L("***********************\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP02, "***********************\n");
 //			WAIT_ON_KEYOP( "Connect H4(A) to OPT(B)\n");
 			test.Printf(_L("Connect H4(A) to OPT(B)\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP03, "Connect H4(Ato OPT(B)\n");
 			test.Printf(KPressAnyKeyToContinue);
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP04, KPressAnyKeyToContinue);
 
 			iCaseStep = EStartOptTD4_5;
 			RequestCharacter();	
@@ -167,10 +194,15 @@
 		case EStartOptTD4_5:
 			// H4 width     ****************************
 			test.Printf(_L("On the OPT, select:\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP05, "On the OPT, select:\n");
 			test.Printf(_L("  Certified FS-A-UUT Test\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP06, "  Certified FS-A-UUT Test\n");
 			test.Printf(_L("  Test TD.4.5-2.9ms-100ms\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP07, "  Test TD.4.5-2.9ms-100ms\n");
 			test.Printf(_L("  And then Click 'Run' "));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP08, "  And then Click 'Run' ");
 			test.Printf(_L("  When test starts, press any key"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP09, "  When test starts, press any key");
 			iCaseStep = EPromptYOpt4_5;
 			RequestCharacter();	
 			break;
@@ -178,6 +210,7 @@
 		case EPromptYOpt4_5:
 			iCaseStep = EConfirmOpt4_5;
 			test.Printf(_L("Did it PASS (Y/N)?"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP10, "Did it PASS (Y/N?");
 			RequestCharacter(); // 30 seconds for user input
 			iWDTimer->IssueRequest(KDelayDurationForTest4_5, this, &CancelKB);
 			break;
@@ -224,6 +257,7 @@
 			
 		default:
 			test.Printf(_L("<Error> unknown test step"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0670_RUNSTEPL_DUP11, "<Error> unknown test step");
 			Cancel();
 			return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));
 		}