591
|
1 |
#
|
|
2 |
# Copyright (c) 2010 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 |
import os
|
|
18 |
from raptor_tests import AntiTargetSmokeTest
|
|
19 |
|
|
20 |
def run():
|
|
21 |
t = AntiTargetSmokeTest()
|
|
22 |
t.id = "116"
|
|
23 |
t.name = "delete_on_failed_compile"
|
|
24 |
t.description = "Test that object files are not present following a forced failed compile."
|
|
25 |
|
|
26 |
t.usebash = True
|
|
27 |
base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 -k"
|
|
28 |
|
|
29 |
t.id = "116a" # Ensure everything is reallyclean before the test
|
|
30 |
t.name = "delete_on_failed_compile_reallyclean_01"
|
|
31 |
t.errors = 0
|
|
32 |
t.returncode = 0
|
|
33 |
t.antitargets = [ ]
|
|
34 |
t.command = base_command + " reallyclean"
|
|
35 |
t.run()
|
|
36 |
|
|
37 |
t.id = "116b" # Object files should *not* be present after this forced failed compile
|
|
38 |
t.name = "delete_on_failed_compile_build"
|
|
39 |
t.errors = 0
|
|
40 |
t.returncode = 1
|
|
41 |
# None of these files should be present
|
|
42 |
t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf',
|
|
43 |
[ "test_/armv5/udeb/test.o",
|
|
44 |
"test_/armv5/udeb/test1.o",
|
|
45 |
"test_/armv5/udeb/test2.o",
|
|
46 |
"test_/armv5/udeb/test3.o",
|
|
47 |
"test_/armv5/udeb/test4.o",
|
|
48 |
"test_/armv5/udeb/test5.o",
|
|
49 |
"test_/armv5/udeb/test6.o",
|
|
50 |
"test_/armv5/urel/test.o",
|
|
51 |
"test_/armv5/urel/test1.o",
|
|
52 |
"test_/armv5/urel/test2.o",
|
|
53 |
"test_/armv5/urel/test3.o",
|
|
54 |
"test_/armv5/urel/test4.o",
|
|
55 |
"test_/armv5/urel/test5.o",
|
|
56 |
"test_/armv5/urel/test6.o" ])
|
|
57 |
sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/")
|
|
58 |
t.command = base_command.replace("armv5", "armv5.fake_compiler") + \
|
|
59 |
" --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants" % sbshome
|
|
60 |
t.run()
|
|
61 |
|
|
62 |
t.id = "116c"
|
|
63 |
t.name = "delete_on_failed_compile_reallyclean_02"
|
|
64 |
t.errors = 0
|
|
65 |
t.returncode = 0
|
|
66 |
t.antitargets = [] # Remove the list of anti-targets
|
|
67 |
t.command = base_command + " reallyclean"
|
|
68 |
t.run()
|
|
69 |
|
|
70 |
t.id = "116d" # Use a redefined make_engine variant - object files *should* be present
|
|
71 |
t.name = "delete_on_failed_compile_build_redefined_make_engine"
|
|
72 |
t.errors = 0
|
|
73 |
t.returncode = 1
|
|
74 |
t.antitargets = [] # Remove the list of anti-targets
|
|
75 |
# All of these files should be present
|
|
76 |
t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf',
|
|
77 |
[ "test_/armv5/udeb/test.o",
|
|
78 |
"test_/armv5/udeb/test1.o",
|
|
79 |
"test_/armv5/udeb/test2.o",
|
|
80 |
"test_/armv5/udeb/test3.o",
|
|
81 |
"test_/armv5/udeb/test4.o",
|
|
82 |
"test_/armv5/udeb/test5.o",
|
|
83 |
"test_/armv5/udeb/test6.o",
|
|
84 |
"test_/armv5/urel/test.o",
|
|
85 |
"test_/armv5/urel/test1.o",
|
|
86 |
"test_/armv5/urel/test2.o",
|
|
87 |
"test_/armv5/urel/test3.o",
|
|
88 |
"test_/armv5/urel/test4.o",
|
|
89 |
"test_/armv5/urel/test5.o",
|
|
90 |
"test_/armv5/urel/test6.o" ])
|
|
91 |
|
|
92 |
t.command = base_command.replace("armv5", "armv5.fake_compiler") + " -e make_test " \
|
|
93 |
+ " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants " % sbshome \
|
|
94 |
+ " --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome
|
|
95 |
t.run()
|
|
96 |
|
|
97 |
t.id = "116e"
|
|
98 |
t.name = "delete_on_failed_compile_reallyclean_03"
|
|
99 |
t.errors = 0
|
|
100 |
t.returncode = 0
|
|
101 |
t.antitargets = [] # Remove the list of anti-targets
|
|
102 |
t.targets = [] # Remove the list of targets
|
|
103 |
t.command = base_command + " reallyclean"
|
|
104 |
t.run()
|
|
105 |
|
|
106 |
t.id = "116"
|
|
107 |
t.name = "delete_on_failed_compile"
|
|
108 |
t.print_result()
|
|
109 |
return t
|