13 # |
13 # |
14 # Description: |
14 # Description: |
15 # |
15 # |
16 |
16 |
17 from raptor_tests import AntiTargetSmokeTest, ReplaceEnvs |
17 from raptor_tests import AntiTargetSmokeTest, ReplaceEnvs |
|
18 from raptor_meta import BldInfFile |
18 import os |
19 import os |
19 |
20 |
20 def run(): |
21 def run(): |
21 t = AntiTargetSmokeTest() |
22 t = AntiTargetSmokeTest() |
22 t.usebash = True |
23 t.usebash = True |
|
24 |
|
25 # create some empty source files just to test createvmaps command file handling: |
|
26 test_cpp_files = [] |
|
27 for i in xrange(0,16): |
|
28 tf = "smoke_suite/test_resources/bv/variant1/test_createvmap{0:02}.cpp".format(i) |
|
29 f = open(tf,"w+") |
|
30 f.close() |
|
31 test_cpp_files.append(tf) |
23 |
32 |
24 preBuiltTargets = [ |
33 preBuiltTargets = [ |
25 "$(EPOCROOT)/epoc32/release/armv5/udeb/dummy.lib", |
34 "$(EPOCROOT)/epoc32/release/armv5/udeb/dummy.lib", |
26 "$(EPOCROOT)/epoc32/release/armv5/urel/dummy.lib", |
35 "$(EPOCROOT)/epoc32/release/armv5/urel/dummy.lib", |
27 "$(EPOCROOT)/epoc32/release/armv5/udeb/debfake.lib", |
36 "$(EPOCROOT)/epoc32/release/armv5/udeb/debfake.lib", |
298 "dummy_var2_dll/dummy_var2_dummy.rsc.d", |
307 "dummy_var2_dll/dummy_var2_dummy.rsc.d", |
299 "dummy_var3_exe/dummy_var3_dummy.rsc.rpp", |
308 "dummy_var3_exe/dummy_var3_dummy.rsc.rpp", |
300 "dummy_var3_exe/dummy_var3_dummy.rsc.d" |
309 "dummy_var3_exe/dummy_var3_dummy.rsc.d" |
301 ] |
310 ] |
302 |
311 |
303 sbscommand = "sbs -b smoke_suite/test_resources/bv/bld.inf -c armv5 " + \ |
312 bldinf = 'smoke_suite/test_resources/bv/bld.inf' |
304 "-c armv5.test_bv_1 -c armv5.test_bv_2 -c armv5.test_bv_3 -f- " + \ |
313 sbscommand = "sbs -b {0} -c armv5 -c armv5.test_bv_1 -c armv5.test_bv_2 -c armv5.test_bv_3 -f- --configpath=test/smoke_suite/test_resources/bv/config/variants".format(bldinf) |
305 "--configpath=test/smoke_suite/test_resources/bv/config/variants" |
|
306 |
314 |
307 t.id = "56a" |
315 t.id = "56a" |
308 t.description = """Build variant and invariant components. |
316 t.description = """Build variant and invariant components. |
309 In this default mode of operation, all components build for the non-product armv5 config whereas |
317 In this default mode of operation, all components build for the non-product armv5 config whereas |
310 only variant components build for the armv5.* bv configs.""" |
318 only variant components build for the armv5.* bv configs.""" |
311 t.name = "featurevariant_build" |
319 t.name = "featurevariant_build" |
312 t.command = sbscommand |
320 |
|
321 t.command = "{0} && cat $(EPOCROOT)/epoc32/build/{1}/{2}".format(sbscommand, BldInfFile.outputPathFragment(bldinf), "createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1.vmap.cmdfile") |
313 t.targets = preBuiltTargets + invariantTargets + variantTargetsGeneric + variantTargetsDefaultTree + variantTargetsProductTrees |
322 t.targets = preBuiltTargets + invariantTargets + variantTargetsGeneric + variantTargetsDefaultTree + variantTargetsProductTrees |
314 t.addbuildtargets('smoke_suite/test_resources/bv/bld.inf', |
323 t.addbuildtargets(bldinf, |
315 invariantBuildTargets + variantBuildTargetsGeneric + variantBuildTargetsDefaultTree + variantBuildTargetsProductTrees |
324 invariantBuildTargets + variantBuildTargetsGeneric + variantBuildTargetsDefaultTree + variantBuildTargetsProductTrees |
316 ) |
325 ) |
|
326 |
317 # Test that static libs are linked from the invariant place. |
327 # Test that static libs are linked from the invariant place. |
318 t.mustmatch = [ |
328 t.mustmatch = [ |
319 "armlink.*epoc32/release/armv5/urel/bv_static_lib.lib", |
329 "armlink.*epoc32/release/armv5/urel/bv_static_lib.lib", |
320 "armlink.*epoc32/release/armv5/udeb/bv_static_lib.lib" |
330 "armlink.*epoc32/release/armv5/udeb/bv_static_lib.lib", |
321 ] |
331 "\s*-s.*variant1/CreateStaticDLL_variant1.cpp", |
322 t.run() |
332 "\s*-s.*variant1/test_createvmap01.cpp", |
|
333 "\s*-s.*variant1/test_createvmap02.cpp", |
|
334 "\s*-s.*variant1/test_createvmap03.cpp", |
|
335 "\s*-s.*variant1/test_createvmap04.cpp", |
|
336 "\s*-s.*variant1/test_createvmap05.cpp", |
|
337 "\s*-s.*variant1/test_createvmap06.cpp", |
|
338 "\s*-s.*variant1/test_createvmap07.cpp", |
|
339 "\s*-s.*variant1/test_createvmap08.cpp", |
|
340 "\s*-s.*variant1/test_createvmap09.cpp", |
|
341 "\s*-s.*variant1/test_createvmap10.cpp", |
|
342 "\s*-s.*variant1/test_createvmap11.cpp", |
|
343 "\s*-s.*variant1/test_createvmap12.cpp", |
|
344 "\s*-s.*variant1/test_createvmap13.cpp", |
|
345 "\s*-s.*variant1/test_createvmap14.cpp", |
|
346 "\s*-s.*variant1/test_createvmap15.cpp", |
|
347 "\s*-s.*variant1/CreateStaticDLL_variant1.mmp" |
|
348 ] |
|
349 t.run() |
|
350 |
|
351 |
323 |
352 |
324 t.id = "56b" |
353 t.id = "56b" |
325 t.description = """Build variant and invariant components using an os_properties.xml that sets FEATUREVARIANTSAFE=1. |
354 t.description = """Build variant and invariant components using an os_properties.xml that sets FEATUREVARIANTSAFE=1. |
326 With FEATUREVARIANTSAFE only invariant components build for the non-product armv5 config and |
355 With FEATUREVARIANTSAFE only invariant components build for the non-product armv5 config and |
327 only variant components build for the armv5.* bv configs.""" |
356 only variant components build for the armv5.* bv configs.""" |