sbsv2/raptor/test/smoke_suite/timeout.py
branchfix
changeset 237 dd11681bd6f3
parent 3 e1eecf4d390d
child 240 fbc6a8ad3957
equal deleted inserted replaced
236:a2dc04c8e649 237:dd11681bd6f3
    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