13 # |
13 # |
14 # Description: |
14 # Description: |
15 # |
15 # |
16 |
16 |
17 from raptor_tests import SmokeTest |
17 from raptor_tests import SmokeTest |
|
18 from raptor_tests import ReplaceEnvs |
|
19 from raptor_meta import BldInfFile |
18 |
20 |
19 def run(): |
21 def run(): |
20 t = SmokeTest() |
22 t = SmokeTest() |
21 t.id = "30" |
23 t.id = "30" |
22 t.name = "resource" |
24 t.name = "resource" |
23 t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE" |
25 t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE" |
24 t.targets = [ |
26 t.targets = [ |
25 "$(EPOCROOT)/epoc32/include/testresource.rsg", |
|
26 "$(EPOCROOT)/epoc32/include/testresource.hrh", |
|
27 "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01", |
|
28 "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc", |
|
29 "$(EPOCROOT)/epoc32/localisation/group/testresource.info", |
|
30 "$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp", |
|
31 |
|
32 "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", |
27 "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", |
33 "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", |
28 "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", |
34 "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", |
29 "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", |
35 "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", |
30 "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", |
36 "$(EPOCROOT)/epoc32/include/helloworld.rsg", |
31 "$(EPOCROOT)/epoc32/include/helloworld.rsg", |
43 "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", |
38 "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", |
44 "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc", |
39 "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc", |
45 "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc" |
40 "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc" |
46 ] |
41 ] |
47 |
42 |
48 t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [ |
|
49 "testresource_/testresource_resource_testresource2_sc.rpp.d", |
|
50 "testresource_/testresource_resource_testresource3_02.rpp", |
|
51 "testresource_/testresource_resource_testresource3_02.rpp.d", |
|
52 "testresource_/testresource_resource_testresource3_sc.rpp", |
|
53 "testresource_/testresource_resource_testresource3_sc.rpp.d", |
|
54 "testresource_/testresource_resource_testresource_01.rpp", |
|
55 "testresource_/testresource_resource_testresource_01.rpp.d", |
|
56 "testresource_/testresource_resource_testresource_sc.rpp", |
|
57 "testresource_/testresource_resource_testresource_sc.rpp.d"]) |
|
58 |
43 |
59 t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ |
44 t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ |
60 "helloworld_exe/helloworld.mbm_bmconvcommands", |
45 "helloworld_exe/helloworld.mbm_bmconvcommands", |
61 "helloworld_exe/helloworld__resource_apps_sc.rpp", |
46 "helloworld_exe/helloworld_sc.rpp", |
62 "helloworld_exe/helloworld__resource_apps_sc.rpp.d", |
47 "helloworld_exe/helloworld_sc.rpp.d", |
63 "helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp", |
48 "helloworld_reg_exe/helloworld_reg_sc.rpp", |
64 "helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"]) |
49 "helloworld_reg_exe/helloworld_reg_sc.rpp.d"]) |
65 |
50 |
66 t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"] |
51 t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"] |
67 |
52 |
68 t.run() |
53 t.run() |
|
54 |
|
55 t.id="30a" |
|
56 t.name = "no_depend_gen_resource" |
|
57 t.usebash = True |
|
58 t.description = """Check that dependent resources still build correctly even when we turn dependency generation off. This |
|
59 test cannot really do this reliably, if you think about it, since it can't force make to try building resources |
|
60 in the 'wrong' order. What it does attempt is to check that |
|
61 the ultimately generated dependency file is ok. |
|
62 N.B. It also attempts to ensure that the dependency file is 'minimal' i.e. that it only references .mbg and .rsg files |
|
63 that might come from other parts of the same build. This is important for performance in situations where --no-depend-generate |
|
64 is used because the weight of 'complete' dependency information would overwhelm make. |
|
65 """ |
|
66 buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf') |
|
67 res_depfile= buildLocation+"/dependentresource_/dependentresource_sc.rpp.d" |
|
68 |
|
69 t.targets = [ |
|
70 "$(EPOCROOT)/epoc32/include/testresource.rsg", |
|
71 "$(EPOCROOT)/epoc32/include/testresource.hrh", |
|
72 "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01", |
|
73 "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc", |
|
74 "$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe", |
|
75 "$(EPOCROOT)/epoc32/localisation/group/testresource.info", |
|
76 "$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp", |
|
77 res_depfile |
|
78 ] |
|
79 |
|
80 t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [ |
|
81 "testresource_/testresource_02.rpp", |
|
82 "testresource_/testresource_02.rpp.d", |
|
83 "testresource_/testresource_01.rpp", |
|
84 "testresource_/testresource_01.rpp.d", |
|
85 "testresource_/testresource_sc.rpp", |
|
86 "testresource_/testresource_sc.rpp.d"]) |
|
87 |
|
88 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) |
|
89 |
|
90 t.mustnotmatch = [] |
|
91 |
|
92 t.mustmatch = [ |
|
93 "4 .*.dependentresource_.dependentresource_sc.rpp.d" |
|
94 ] |
|
95 |
|
96 t.run() |
|
97 |
|
98 t.name = 'resource' |
|
99 t.print_result() |
69 return t |
100 return t |