usbmgmt/usbmgrtest/T_usb/scripts/t_usb6.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_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 // "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 // 
       
    48 //
       
    49 
       
    50 LOAD_SUITE t_usb.dll
       
    51 
       
    52 ////////////////////////////////////////////
       
    53 // Test 6 - Post a Read, cancel it and repost
       
    54 // another read and check that it completes
       
    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 // Post a read then cancel it
       
    73 RUN_TEST_STEP -1, t_usb, ReadThenCancel
       
    74 
       
    75 // Post another read 
       
    76 RUN_TEST_STEP -1, t_usb, Read
       
    77 
       
    78 PRINT Please luanch hyperterm and type some data
       
    79 PAUSE
       
    80 
       
    81 // Wait for read to complete
       
    82 RUN_TEST_STEP -1, t_usb, WaitForRead
       
    83 
       
    84 // Close the port
       
    85 RUN_TEST_STEP -1, t_usb, ClosePort
       
    86 
       
    87 // Close the rest of the handles
       
    88 RUN_TEST_STEP -1, t_usb, CloseAll
       
    89 
       
    90 TEST_COMPLETE 6
       
    91 
       
    92 UNLOAD
       
    93