sbsv2/raptor/test/smoke_suite/timeout.py
branchfix
changeset 247 8426d4dedf84
parent 240 fbc6a8ad3957
child 414 fdf44dc5eff3
equal deleted inserted replaced
246:b9b473d0d6df 247:8426d4dedf84
     1 #
     1 #
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 # Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 # All rights reserved.
     3 # All rights reserved.
     4 # This component and the accompanying materials are made available
     4 # This component and the accompanying materials are made available
     5 # under the terms of the License "Eclipse Public License v1.0"
     5 # under the terms of the License "Eclipse Public License v1.0"
     6 # which accompanies this distribution, and is available
     6 # which accompanies this distribution, and is available
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
    19 
    19 
    20 def run():
    20 def run():
    21 	t = SmokeTest()
    21 	t = SmokeTest()
    22 	t.description = "test that long commands time out and get retried"
    22 	t.description = "test that long commands time out and get retried"
    23 	
    23 	
    24 	exitCode = "15"
    24 	exitCode = "128"
    25 	if t.onWindows:
       
    26 		exitCode = "128" # why are they different?
       
    27 
    25 
    28 	t.id = "60a"
    26 	t.id = "60a"
    29 	t.name = "timeout"
    27 	t.name = "timeout"
    30 	t.usebash = True
    28 	t.usebash = True
    31 	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f-"
    29 	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f-"
    32 
    30 
    33 	t.mustmatch = [
    31 	t.mustmatch = [
    34 		"status exit='failed' code='" + exitCode + "' attempt='1'",
    32 		"status exit='failed' code='" + exitCode + "' attempt='1' *reason='timeout'",
    35 	]
    33 	]
    36 	t.errors = -1
    34 	t.errors = -1
    37 	t.returncode = 1
    35 	t.returncode = 1
    38 	t.run()
    36 	t.run()
    39 	
    37 	
    41 	t.name = "timeout with retries"
    39 	t.name = "timeout with retries"
    42 	t.usebash = True
    40 	t.usebash = True
    43 	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f-"
    41 	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f-"
    44 
    42 
    45 	t.mustmatch = [
    43 	t.mustmatch = [
    46 		"status exit='retry' code='" + exitCode + "' attempt='1'",
    44 		"status exit='retry' code='" + exitCode + "' attempt='1' *reason='timeout'",
    47 		"status exit='retry' code='" + exitCode + "' attempt='2'",
    45 		"status exit='retry' code='" + exitCode + "' attempt='2' *reason='timeout'",
    48 		"status exit='failed' code='" + exitCode + "' attempt='3'",
    46 		"status exit='failed' code='" + exitCode + "' attempt='3' *reason='timeout'",
    49 	]
    47 	]
    50 	t.errors = -1
    48 	t.errors = -1
    51 	t.returncode = 1
    49 	t.returncode = 1
    52 	t.run()
    50 	t.run()
    53 	
    51