author | kelvzhu |
Tue, 27 Jul 2010 13:00:43 +0800 | |
changeset 621 | 96fee2635b19 |
parent 616 | 24e4ef208cca |
child 625 | a1925fb7753a |
permissions | -rw-r--r-- |
591 | 1 |
# |
2 |
# Copyright (c) 2009-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 |
from raptor_tests import SmokeTest |
|
18 |
from raptor_tests import ReplaceEnvs |
|
19 |
from raptor_meta import BldInfFile |
|
20 |
||
21 |
def run(): |
|
22 |
t = SmokeTest() |
|
23 |
t.id = "30" |
|
24 |
t.name = "resource" |
|
25 |
t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE" |
|
26 |
t.targets = [ |
|
27 |
"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", |
|
28 |
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", |
|
29 |
"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", |
|
30 |
"$(EPOCROOT)/epoc32/include/helloworld.rsg", |
|
31 |
"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc", |
|
32 |
"$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc", |
|
33 |
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc", |
|
34 |
"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", |
|
35 |
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc", |
|
36 |
"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc" |
|
37 |
] |
|
38 |
||
39 |
||
40 |
t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ |
|
41 |
"helloworld_exe/helloworld.mbm_bmconvcommands", |
|
42 |
"helloworld_exe/helloworld_HelloWorld_sc.rpp", |
|
43 |
"helloworld_exe/helloworld_HelloWorld_sc.rpp.d", |
|
44 |
"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp", |
|
45 |
"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"]) |
|
46 |
||
47 |
t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"] |
|
48 |
||
49 |
t.run() |
|
50 |
||
51 |
t.id="30a" |
|
52 |
t.name = "no_depend_gen_resource" |
|
53 |
t.usebash = True |
|
54 |
t.description = """Check that dependent resources still build correctly even when we turn dependency generation off. This |
|
55 |
test cannot really do this reliably, if you think about it, since it can't force make to try building resources |
|
56 |
in the 'wrong' order. What it does attempt is to check that |
|
57 |
the ultimately generated dependency file is ok. |
|
58 |
N.B. It also attempts to ensure that the dependency file is 'minimal' i.e. that it only references .mbg and .rsg files |
|
59 |
that might come from other parts of the same build. This is important for performance in situations where --no-depend-generate |
|
60 |
is used because the weight of 'complete' dependency information would overwhelm make. |
|
61 |
""" |
|
62 |
buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf') |
|
63 |
res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d" |
|
64 |
||
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
65 |
|
591 | 66 |
t.targets = [ |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
67 |
"$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.r01", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
68 |
"$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.rsc", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
69 |
"$(EPOCROOT)/epoc32/data/z/resource/dependentresource/dependentresource.rsc", |
591 | 70 |
"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01", |
71 |
"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc", |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
72 |
"$(EPOCROOT)/epoc32/include/testresource.hrh", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
73 |
"$(EPOCROOT)/epoc32/include/testresource.rsg", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
74 |
"$(EPOCROOT)/epoc32/include/onelang.rsg", |
591 | 75 |
"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe", |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
76 |
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.r01", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
77 |
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.rsc", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
78 |
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/dependentresource/dependentresource.rsc", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
79 |
"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.r01", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
80 |
"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
81 |
"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/dependentresource/dependentresource.rsc", |
591 | 82 |
res_depfile |
83 |
] |
|
84 |
||
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
85 |
t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
86 |
"dependentresource_/dependentresource_dependentresource.rsc", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
87 |
"testresource_/testresource_dependentresource.r01", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
88 |
"testresource_/testresource_dependentresource.rsc", |
591 | 89 |
"testresource_/testresource_testresource_01.rpp", |
90 |
"testresource_/testresource_testresource_01.rpp.d", |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
91 |
"testresource_/testresource_testresource_02.rpp", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
92 |
"onelang_/onelang_onelang_sc.rpp", |
591 | 93 |
"testresource_/testresource_testresource_sc.rpp"]) |
94 |
||
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
95 |
t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && { X=`md5sum $(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc` && Y=`md5sum $(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc` && [ \"${X%% *}\" != \"${Y%% *}\" ] ; } && wc -l %s " % (res_depfile, res_depfile) |
591 | 96 |
|
97 |
t.mustnotmatch = [] |
|
98 |
||
99 |
t.mustmatch = [ |
|
100 |
"[23] .*.dependentresource_.dependentresource_dependentresource_sc.rpp.d" |
|
101 |
] |
|
102 |
||
103 |
t.run() |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
104 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
105 |
t.id="30b" |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
106 |
t.name = "resource_corner_cases_reallyclean" |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
107 |
t.usebash = True |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
108 |
t.description = """ Additional corner cases for resources: |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
109 |
1) Use of "TARGETTYPE none" but not "TARGET" mmp keyword. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
110 |
2) Use of a resource with no LANG. """ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
111 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
112 |
t.targets = [] |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
113 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
114 |
t.command = "sbs -b smoke_suite/test_resources/resource/group/bld2.inf -c armv5_urel -c winscw_urel reallyclean" |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
115 |
t.mustnotmatch = [] |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
116 |
t.mustmatch = [] |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
117 |
t.run() |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
118 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
119 |
t.id="30c" |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
120 |
t.name = "resource_corner_cases" |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
121 |
t.usebash = True |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
122 |
t.description = """ Additional corner cases for resources: |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
123 |
1) Use of "TARGETTYPE none" but not "TARGET" mmp keyword. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
124 |
2) Use of a resource with no LANG. """ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
125 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
126 |
buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld2.inf') |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
127 |
rsc_file= buildLocation+"/testresource_/testresource_testresource.rsc" |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
128 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
129 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
130 |
t.targets = ["$(EPOCROOT)/epoc32/data/z/resource/apps/notargetkeyword.mbm", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
131 |
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/notargetkeyword.mbm", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
132 |
"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/notargetkeyword.mbm", |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
133 |
rsc_file ] |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
134 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
135 |
t.command = "sbs -b smoke_suite/test_resources/resource/group/bld2.inf -c armv5_urel -c winscw_urel" |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
136 |
t.mustnotmatch = [] |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
137 |
t.mustmatch = [] |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
138 |
t.run() |
591 | 139 |
|
140 |
t.name = 'resource' |
|
141 |
t.print_result() |
|
142 |
return t |