equal
deleted
inserted
replaced
|
1 # |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the License "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 |
|
17 from raptor_tests import SmokeTest |
|
18 import os |
|
19 |
|
20 def run(): |
|
21 t = SmokeTest() |
|
22 t.description = "test that long commands time out and get retried" |
|
23 |
|
24 exitCode = "15" |
|
25 if t.onWindows: |
|
26 exitCode = "128" # why are they different? |
|
27 |
|
28 t.id = "60a" |
|
29 t.name = "timeout" |
|
30 t.usebash = True |
|
31 t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f-" |
|
32 |
|
33 t.mustmatch = [ |
|
34 "status exit='failed' code='" + exitCode + "' attempt='1'", |
|
35 ] |
|
36 t.errors = -1 |
|
37 t.returncode = 1 |
|
38 t.run() |
|
39 |
|
40 t.id = "60b" |
|
41 t.name = "timeout with retries" |
|
42 t.usebash = True |
|
43 t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f-" |
|
44 |
|
45 t.mustmatch = [ |
|
46 "status exit='retry' code='" + exitCode + "' attempt='1'", |
|
47 "status exit='retry' code='" + exitCode + "' attempt='2'", |
|
48 "status exit='failed' code='" + exitCode + "' attempt='3'", |
|
49 ] |
|
50 t.errors = -1 |
|
51 t.returncode = 1 |
|
52 t.run() |
|
53 |
|
54 t.id = "60" |
|
55 t.name = "timeout" |
|
56 t.print_result() |
|
57 return t |