usbmgmt/usbmgrtest/T_usb/scripts/t_usb2.script
changeset 0 c9bc50fca66e
equal deleted inserted replaced
-1:000000000000 0:c9bc50fca66e
       
     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_usb2.scripts
       
    15 // t_usb tests. 
       
    16 // Test Steps available
       
    17 // "StartUsb"			- Initiate Start of USB services
       
    18 // "WaitForUsb"			- Wait for the bus to re-enumerate
       
    19 // "StartCSY"			- Ask C32 to load the ACM CSY
       
    20 // "OpenDTE"			- Open the ACM comm port as a DTE
       
    21 // "OpenDCE"			- Open the ACM comm port as a DCE
       
    22 // "Read"			- Post a Read to the comm port
       
    23 // "Write"			- Post a Write to the comm port
       
    24 // "CancelRead"			- Cancel a pending Read
       
    25 // "CancelWrite" 		- Cancel a pending Write
       
    26 // "WaitForRead"		- Wait for a Read operation to complete
       
    27 // "WaitForWrite"		- Wait for a Write operation to complete
       
    28 // "ReadOneOrMore"		- Post a ReadOneOrMore to the comm port
       
    29 // "ClosePort"			- Close the ACM port
       
    30 // "CloseCommServer"		- Close the handle to C32
       
    31 // "CloseUsb"			- Close the handle to the USB server
       
    32 // "CloseAll"			- Close all handles (port, C32 and USB server)
       
    33 // "StopUsb"			- Stop USB services
       
    34 // "NotifySignalChange"		- Post a notify request for when signals 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 // "WaitForConfigChange"	- Wait for the configuration to change
       
    39 // "NotifyBreak"		- Post a notify request for when a break occurs
       
    40 // "WaitForBreak"		- Wait for a break to occur 
       
    41 // "SetSignalsToMarkC"		- Set the signals to mark (Requires a configuration file)
       
    42 // "SetSignalsToSpaceC"		- Set the signals to space (Requires a configuration file) 
       
    43 // "CheckSignalsC"		- Check the signals match (Requires a configuration file)
       
    44 // "WaitForReadFailureC"	- Wait for read failure (Requires a configuration file)
       
    45 // "WaitForWriteFailureC"	- Wait for write failure (Requires a configuration file)
       
    46 // "OpenPortC"			- Open the ACM port configurable for role, mode and return value
       
    47 // "WaitForSignalChangeC"	- Wait for the signals to change
       
    48 // 
       
    49 //
       
    50 
       
    51 LOAD_SUITE t_usb.dll
       
    52 
       
    53 ////////////////////////////////////////
       
    54 // Test 2 - Register for Config Change
       
    55 ////////////////////////////////////////
       
    56 
       
    57 PRINT Please remove USB cable
       
    58 PAUSE
       
    59 
       
    60 // Request the USB services are started
       
    61 RUN_TEST_STEP -1, t_usb, StartUsb
       
    62 
       
    63 PRINT Please insert USB cable
       
    64 PAUSE
       
    65 
       
    66 // Wait for the bus to re-enumerate
       
    67 RUN_TEST_STEP -1, t_usb, WaitForUsb
       
    68 
       
    69 // Open the ACM comm port as DTE
       
    70 RUN_TEST_STEP -1, t_usb, OpenDTE
       
    71 
       
    72 // Register for Config Change
       
    73 RUN_TEST_STEP -1, t_usb, NotifyConfigChange
       
    74 
       
    75 // Register for Config Change
       
    76 RUN_TEST_STEP -1, t_usb, WaitForConfigChangeC, e:\t_usb3.ini
       
    77 
       
    78 // Close the port
       
    79 RUN_TEST_STEP -1, t_usb, ClosePort
       
    80 
       
    81 // Close the rest of the handles
       
    82 RUN_TEST_STEP -1, t_usb, CloseAll
       
    83 
       
    84 TEST_COMPLETE 2
       
    85 
       
    86 UNLOAD
       
    87