equal
deleted
inserted
replaced
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of the License "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 // |
18 // |
19 |
19 |
20 #include "general.h" |
20 #include "general.h" |
21 #include "config.h" |
21 #include "config.h" |
22 #include "activecontrol.h" |
22 #include "activecontrol.h" |
23 #include "activeRW.h" |
23 #include "activerw.h" |
24 |
24 |
25 // --- Global Top Level Variables |
25 // --- Global Top Level Variables |
26 |
26 |
27 CActiveControl* gActiveControl; |
27 CActiveControl* gActiveControl; |
28 #ifdef USB_SC |
28 #ifdef USB_SC |
29 RTest test(_L("T_USB_SCDEVICE")); |
29 RTest test(_L("T_USB_SCDEVICE")); |
30 #else |
30 #else |
31 RTest test(_L("T_USB_DEVICE")); |
31 RTest test(_L("T_USB_DEVICE")); |
|
32 #endif |
|
33 |
|
34 #ifdef USB_SC |
|
35 TBool gShareHandle = EFalse; |
32 #endif |
36 #endif |
33 TBool gVerbose = EFalse; |
37 TBool gVerbose = EFalse; |
34 TBool gSkip = EFalse; |
38 TBool gSkip = EFalse; |
35 TBool gTempTest = EFalse; |
39 TBool gTempTest = EFalse; |
36 TBool gStopOnFail = ETrue; |
40 TBool gStopOnFail = ETrue; |
79 gActiveControl = CActiveControl::NewL(myConsole, aConfigFile, aScriptFile); |
83 gActiveControl = CActiveControl::NewL(myConsole, aConfigFile, aScriptFile); |
80 CleanupStack::PushL(gActiveControl); |
84 CleanupStack::PushL(gActiveControl); |
81 |
85 |
82 |
86 |
83 // Call request function |
87 // Call request function |
|
88 #ifdef USB_SC |
|
89 if (!gShareHandle) |
|
90 gActiveControl->RequestEp0ControlPacket(); |
|
91 #else |
84 gActiveControl->RequestEp0ControlPacket(); |
92 gActiveControl->RequestEp0ControlPacket(); |
85 |
93 #endif |
86 CActiveScheduler::Start(); |
94 CActiveScheduler::Start(); |
87 |
95 |
88 test.Printf (_L("Test Run Completed\n")); |
96 test.Printf (_L("Test Run Completed\n")); |
89 |
97 |
90 if (gSoakCount > 0) |
98 if (gSoakCount > 0) |
145 else if (token == _L("/n")) |
153 else if (token == _L("/n")) |
146 { |
154 { |
147 RDebug::Print(_L("Not Stopping on Test Fail\n")); |
155 RDebug::Print(_L("Not Stopping on Test Fail\n")); |
148 gStopOnFail = EFalse; |
156 gStopOnFail = EFalse; |
149 } |
157 } |
|
158 #ifdef USB_SC |
|
159 else if (token == _L("/a")) |
|
160 { |
|
161 RDebug::Print(_L("share handle test\n")); |
|
162 gShareHandle = ETrue; |
|
163 } |
|
164 #endif |
150 else if (token.Left(5) == _L("/soak")) |
165 else if (token.Left(5) == _L("/soak")) |
151 { |
166 { |
152 TInt equalPos; |
167 TInt equalPos; |
153 gSoakCount = -1; |
168 gSoakCount = -1; |
154 equalPos = token.Locate('='); |
169 equalPos = token.Locate('='); |
203 delete cleanup; // destroy clean-up stack |
218 delete cleanup; // destroy clean-up stack |
204 |
219 |
205 __UHEAP_MARKEND; |
220 __UHEAP_MARKEND; |
206 |
221 |
207 RDebug::Print(_L("Program exit: done.\n")); |
222 RDebug::Print(_L("Program exit: done.\n")); |
208 |
|
209 return 0; // and return |
223 return 0; // and return |
210 } |
224 } |
211 |
225 |
212 |
226 |
213 // -eof- |
227 // -eof- |