|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // t_usb tests. |
|
15 // Test Steps available |
|
16 // "StartUsb" - Initiate Start of USB services |
|
17 // "WaitForUsb" - Wait for the bus to re-enumerate |
|
18 // "StartCSY" - Ask C32 to load the ACM CSY |
|
19 // "OpenDTE" - Open the ACM comm port as a DTE |
|
20 // "OpenDCE" - Open the ACM comm port as a DCE |
|
21 // "Read" - Post a Read to the comm port |
|
22 // "Write" - Post a Write to the comm port |
|
23 // "CancelRead" - Cancel a pending Read |
|
24 // "CancelWrite" - Cancel a pending Write |
|
25 // "WaitForRead" - Wait for a Read operation to complete |
|
26 // "WaitForWrite" - Wait for a Write operation to complete |
|
27 // "ReadOneOrMore" - Post a ReadOneOrMore to the comm port |
|
28 // "ClosePort" - Close the ACM port |
|
29 // "CloseCommServer" - Close the handle to C32 |
|
30 // "CloseUsb" - Close the handle to the USB server |
|
31 // "CloseAll" - Close all handles (port, C32 and USB server) |
|
32 // "StopUsb" - Stop USB services |
|
33 // "NotifySignalChange" - Post a notify request for when signals change |
|
34 // "WaitForSignalChange" - Wait for the signals to change |
|
35 // "WaitForReadCancel" - Wait for a read operation to be cancelled completely |
|
36 // "ReadThenCancel" - Post a read and then cancel it immediately |
|
37 // "NotifyConfigChange" - Post a notify request for when the config changes |
|
38 // "NotifyBreak" - Post a notify request for when a break occurs |
|
39 // "WaitForBreak" - Wait for a break to occur |
|
40 // "SetSignalsToMarkC" - Set the signals to mark (Requires a configuration file) |
|
41 // "SetSignalsToSpaceC" - Set the signals to space (Requires a configuration file) |
|
42 // "CheckSignalsC" - Check the signals match (Requires a configuration file) |
|
43 // "WaitForReadFailureC" - Wait for read failure (Requires a configuration file) |
|
44 // "WaitForWriteFailureC" - Wait for write failure (Requires a configuration file) |
|
45 // "OpenPortC" - Open the ACM port configurable for role, mode and return value |
|
46 // "WaitForConfigChangeC" - Wait for the configuration to change |
|
47 // "NotifyStateChange" - Post a notify request for when the LDD state changes |
|
48 // "WaitForStateChangeC" - Wait for the LDD to change state (Requires a configuration file) |
|
49 // |
|
50 // |
|
51 |
|
52 LOAD_SUITE t_usb.dll |
|
53 |
|
54 //////////////////////////////////////// |
|
55 // Test 7 - Check the LDD state changes |
|
56 // when the cable is unplugged |
|
57 //////////////////////////////////////// |
|
58 |
|
59 PRINT Please remove USB cable |
|
60 PAUSE |
|
61 |
|
62 // Request the USB services are started |
|
63 RUN_TEST_STEP -1, t_usb, StartUsb |
|
64 |
|
65 PRINT Please insert USB cable |
|
66 PAUSE |
|
67 |
|
68 // Wait for the bus to re-enumerate |
|
69 RUN_TEST_STEP -1, t_usb, WaitForUsb |
|
70 |
|
71 // Post a request for state notification |
|
72 RUN_TEST_STEP -1, t_usb, NotifyStateChange |
|
73 |
|
74 PRINT Please remove USB cable |
|
75 PAUSE |
|
76 |
|
77 // Check that the LDD's state changes |
|
78 RUN_TEST_STEP -1, t_usb, WaitForStateChangeC, e:\t_usb3.ini |
|
79 |
|
80 // Close all of the handles |
|
81 RUN_TEST_STEP -1, t_usb, CloseAll |
|
82 |
|
83 TEST_COMPLETE 7 |
|
84 |
|
85 UNLOAD |
|
86 |