author | Daniel Jacobs <daniel.jacobs@nokia.com> |
Thu, 13 May 2010 14:14:32 +0100 | |
changeset 553 | 7d4971eaf863 |
parent 546 | e6381a1f4952 |
child 573 | e2b5644641c6 |
permissions | -rw-r--r-- |
3 | 1 |
# |
260
6956be913ed6
apply review #3865 comments
Richard Taylor <richard.i.taylor@nokia.com>
parents:
258
diff
changeset
|
2 |
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 | 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 |
|
463
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
18 |
from raptor_tests import ReplaceEnvs |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
19 |
from raptor_meta import BldInfFile |
3 | 20 |
|
21 |
def run(): |
|
22 |
t = SmokeTest() |
|
23 |
t.id = "30" |
|
24 |
t.name = "resource" |
|
463
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
25 |
t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE" |
3 | 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 |
||
463
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
39 |
|
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
40 |
t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
41 |
"helloworld_exe/helloworld.mbm_bmconvcommands", |
537
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
42 |
"helloworld_exe/helloworld_HelloWorld_sc.rpp", |
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
43 |
"helloworld_exe/helloworld_HelloWorld_sc.rpp.d", |
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
44 |
"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp", |
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
45 |
"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"]) |
463
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
46 |
|
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
47 |
t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"] |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
48 |
|
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
49 |
t.run() |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
50 |
|
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
51 |
t.id="30a" |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
52 |
t.name = "no_depend_gen_resource" |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
53 |
t.usebash = True |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
54 |
t.description = """Check that dependent resources still build correctly even when we turn dependency generation off. This |
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
55 |
test cannot really do this reliably, if you think about it, since it can't force make to try building resources |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
56 |
in the 'wrong' order. What it does attempt is to check that |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
57 |
the ultimately generated dependency file is ok. |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
58 |
N.B. It also attempts to ensure that the dependency file is 'minimal' i.e. that it only references .mbg and .rsg files |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
59 |
that might come from other parts of the same build. This is important for performance in situations where --no-depend-generate |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
60 |
is used because the weight of 'complete' dependency information would overwhelm make. |
463
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
61 |
""" |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
62 |
buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf') |
537
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
63 |
res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d" |
463
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
64 |
|
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
65 |
t.targets = [ |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
66 |
"$(EPOCROOT)/epoc32/include/testresource.rsg", |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
67 |
"$(EPOCROOT)/epoc32/include/testresource.hrh", |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
68 |
"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01", |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
69 |
"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc", |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
70 |
"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe", |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
71 |
res_depfile |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
72 |
] |
92c43194abb5
test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents:
393
diff
changeset
|
73 |
|
3 | 74 |
t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [ |
537
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
75 |
"testresource_/testresource_testresource_02.rpp", |
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
76 |
"testresource_/testresource_testresource_01.rpp", |
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
77 |
"testresource_/testresource_testresource_01.rpp.d", |
164e587fef9f
fix: take action on copy tags at the end of build phases.
timothy.murphy@nokia.com
parents:
533
diff
changeset
|
78 |
"testresource_/testresource_testresource_sc.rpp"]) |
3 | 79 |
|
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
80 |
t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && wc -l %s " % (res_depfile, res_depfile) |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
81 |
|
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
82 |
t.mustnotmatch = [] |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
83 |
|
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
84 |
t.mustmatch = [ |
546
e6381a1f4952
fix tests for resources. Add python dependency manipulation because it's understandable to humans.
timothy.murphy@nokia.com
parents:
539
diff
changeset
|
85 |
"[23] .*.dependentresource_.dependentresource_dependentresource_sc.rpp.d" |
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
463
diff
changeset
|
86 |
] |
3 | 87 |
|
88 |
t.run() |
|
473
ae731bee7d46
resource test - small review comment fixes
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
89 |
|
ae731bee7d46
resource test - small review comment fixes
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
90 |
t.name = 'resource' |
ae731bee7d46
resource test - small review comment fixes
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
91 |
t.print_result() |
3 | 92 |
return t |