Exemple #1
0
def run():
	t = AntiTargetSmokeTest()
	t.id = "61"
	t.name = "smp"
	#
	# the command asks for ARMV5 and ARMV5SMP but the component only builds
	# code for ARMV5SMP according to its bld.inf file. so, check that the
	# ARMV5SMP binaries exist and the ARMV5 ones do not.
	#
	t.command = "sbs -b smoke_suite/test_resources/smp/bld.inf -c armv5 -c " + \
			"armv5.smp"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5smp/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5smp/udeb/test.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5smp/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5smp/urel/test.exe.map"
		]
	t.addbuildtargets('smoke_suite/test_resources/smp/bld.inf', [
		"test_/armv5smp/udeb/test.o",
		"test_/armv5smp/urel/test.o"
	])
	t.antitargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map"
	]
	t.addbuildantitargets('smoke_suite/test_resources/smp/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o"
		])
	t.run()
	return t
Exemple #2
0
def run():
    t = AntiTargetSmokeTest()
    t.id = "61"
    t.name = "smp"
    #
    # the command asks for ARMV5 and ARMV5SMP but the component only builds
    # code for ARMV5SMP according to its bld.inf file. so, check that the
    # ARMV5SMP binaries exist and the ARMV5 ones do not.
    #
    t.command = "sbs -b smoke_suite/test_resources/smp/bld.inf -c armv5 -c " + \
      "armv5.smp"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5smp/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5smp/udeb/test.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5smp/urel/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5smp/urel/test.exe.map"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/smp/bld.inf',
        ["test_/armv5smp/udeb/test.o", "test_/armv5smp/urel/test.o"])
    t.antitargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map"
    ]
    t.addbuildantitargets(
        'smoke_suite/test_resources/smp/bld.inf',
        ["test_/armv5/udeb/test.o", "test_/armv5/urel/test.o"])
    t.run()
    return t
def run():	
	t = AntiTargetSmokeTest()
	t.id = "43"
	t.name = "named_extension"
	t.description = "Test -p option with named extensions - should clean then" \
			+ " create success.txt"
	t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf " \
			+ "REALLYCLEAN && sbs -b " \
			+ "smoke_suite/test_resources/basics/helloworld/Bld.inf -p run_this"
	t.targets = [
		"$(EPOCROOT)/epoc32/success.txt"
		]
	t.antitargets = [
		"$(EPOCROOT)/epoc32/failure.txt",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/HelloWorld.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/HelloWorld.exe"
	]
	t.addbuildantitargets("smoke_suite/test_resources/basics/helloworld/Bld.inf", [
		"$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/armv5/udeb/HelloWorld.o",
		"$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/armv5/urel/HelloWorld.o",
		"$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/winscw/udeb/HelloWorld.o",
		"$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/winscw/urel/HelloWorld.o"
		])
	t.run()
	return t
def run():
    t = AntiTargetSmokeTest()
    t.id = "43"
    t.name = "named_extension"
    t.description = "Test -p option with named extensions - should clean then" \
      + " create success.txt"
    t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf " \
      + "REALLYCLEAN && sbs -b " \
      + "smoke_suite/test_resources/basics/helloworld/Bld.inf -p run_this"
    t.targets = ["$(EPOCROOT)/epoc32/success.txt"]
    t.antitargets = [
        "$(EPOCROOT)/epoc32/failure.txt",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/HelloWorld.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/HelloWorld.exe"
    ]
    t.addbuildantitargets(
        "smoke_suite/test_resources/basics/helloworld/Bld.inf", [
            "$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/armv5/udeb/HelloWorld.o",
            "$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/armv5/urel/HelloWorld.o",
            "$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/winscw/udeb/HelloWorld.o",
            "$(EPOCROOT)/epoc32/build/basics/helloworld/helloworld_exe/winscw/urel/HelloWorld.o"
        ])
    t.run()
    return t
Exemple #5
0
def run():
    t = AntiTargetSmokeTest()
    t.id = "76"
    t.name = "nobuild"

    t.usebash = True
    t.command = (
        "sbs -b smoke_suite/test_resources/simple/bld.inf CLEAN "
        + "&& sbs -b smoke_suite/test_resources/simple/bld.inf -n -m ${SBSMAKEFILE} -f ${SBSLOGFILE} "
        + "&& grep -i 'No build performed' ${SBSLOGFILE}"
    )

    t.targets = []
    t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", [])
    t.antitargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe",
    ]
    t.addbuildantitargets(
        "smoke_suite/test_resources/simple/bld.inf",
        [
            "test_/armv5/udeb/test.o",
            "test_/armv5/urel/test.o",
            "test_/armv5/udeb/test3.o",
            "test_/armv5/udeb/test4.o",
            "test_/armv5/udeb/test5.o",
            "test_/armv5/udeb/test1.o",
            "test_/armv5/udeb/test6.o",
            "test_/armv5/udeb/test2.o",
            "test_/armv5/urel/test3.o",
            "test_/armv5/urel/test4.o",
            "test_/armv5/urel/test5.o",
            "test_/armv5/urel/test1.o",
            "test_/armv5/urel/test6.o",
            "test_/armv5/urel/test2.o",
            "test_/winscw/udeb/test.o",
            "test_/winscw/urel/test.o",
            "test_/winscw/udeb/test3.o",
            "test_/winscw/udeb/test4.o",
            "test_/winscw/udeb/test5.o",
            "test_/winscw/udeb/test1.o",
            "test_/winscw/udeb/test6.o",
            "test_/winscw/udeb/test2.o",
            "test_/winscw/urel/test3.o",
            "test_/winscw/urel/test4.o",
            "test_/winscw/urel/test5.o",
            "test_/winscw/urel/test1.o",
            "test_/winscw/urel/test6.o",
            "test_/winscw/urel/test2.o",
        ],
    )
    t.mustmatch = [".*No build performed.*"]

    t.run()
    return t
def run():
	
	# build something; make it read-only; then try and clean it
	
	t = AntiTargetSmokeTest()
	t.id = "10a"
	t.name = "clean_readonly" 
	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
	]
	t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf",
	[
	"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
	"createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
	])
	t.run()
	setupOK = (t.result != AntiTargetSmokeTest.FAIL)
	
	# This particular file createstaticdll.dll is changed to be readonly to test
	# 		if sbs CLEAN command actually gets rid of read only files
	fileForClean = os.environ['EPOCROOT'] + "/epoc32/release/armv5/urel/createstaticdll.dll"
	if os.path.exists(fileForClean):
		os.chmod(fileForClean, stat.S_IREAD)
	
	t.id = "10"
	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 CLEAN"
	t.targets = []
	t.antitargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
	]
	t.addbuildantitargets("smoke_suite/test_resources/simple_dll/bld.inf",
	[
	"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
	"createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
	])
	t.run()
	
	if not setupOK:
		t.result = AntiTargetSmokeTest.FAIL
		
	return t
Exemple #7
0
def run():

    # build something; make it read-only; then try and clean it

    t = AntiTargetSmokeTest()
    t.id = "10a"
    t.name = "clean_readonly"
    t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
    ]
    t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf", [
        "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
        "createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
    ])
    t.run()
    setupOK = (t.result != AntiTargetSmokeTest.FAIL)

    # This particular file createstaticdll.dll is changed to be readonly to test
    # 		if sbs CLEAN command actually gets rid of read only files
    fileForClean = os.environ[
        'EPOCROOT'] + "/epoc32/release/armv5/urel/createstaticdll.dll"
    if os.path.exists(fileForClean):
        os.chmod(fileForClean, stat.S_IREAD)

    t.id = "10"
    t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 CLEAN"
    t.targets = []
    t.antitargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
    ]
    t.addbuildantitargets("smoke_suite/test_resources/simple_dll/bld.inf", [
        "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
        "createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
    ])
    t.run()

    if not setupOK:
        t.result = AntiTargetSmokeTest.FAIL

    return t
Exemple #8
0
def run():
    t = AntiTargetSmokeTest()
    t.id = "76"
    t.name = "nobuild"

    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf CLEAN " + \
      "&& sbs -b smoke_suite/test_resources/simple/bld.inf -n -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " + \
      "&& grep -i 'No build performed' ${SBSLOGFILE}"

    t.targets = []
    t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [])
    t.antitargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe"
    ]
    t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', [
        "test_/armv5/udeb/test.o", "test_/armv5/urel/test.o",
        "test_/armv5/udeb/test3.o", "test_/armv5/udeb/test4.o",
        "test_/armv5/udeb/test5.o", "test_/armv5/udeb/test1.o",
        "test_/armv5/udeb/test6.o", "test_/armv5/udeb/test2.o",
        "test_/armv5/urel/test3.o", "test_/armv5/urel/test4.o",
        "test_/armv5/urel/test5.o", "test_/armv5/urel/test1.o",
        "test_/armv5/urel/test6.o", "test_/armv5/urel/test2.o",
        "test_/winscw/udeb/test.o", "test_/winscw/urel/test.o",
        "test_/winscw/udeb/test3.o", "test_/winscw/udeb/test4.o",
        "test_/winscw/udeb/test5.o", "test_/winscw/udeb/test1.o",
        "test_/winscw/udeb/test6.o", "test_/winscw/udeb/test2.o",
        "test_/winscw/urel/test3.o", "test_/winscw/urel/test4.o",
        "test_/winscw/urel/test5.o", "test_/winscw/urel/test1.o",
        "test_/winscw/urel/test6.o", "test_/winscw/urel/test2.o"
    ])
    t.mustmatch = [".*No build performed.*"]

    t.run()
    return t
def run():
	# 102a - 102b Test running trace compiler on one mmp with different source files controlled macros. 
	t = AntiTargetSmokeTest()
	t.description = "Testcases (ID 102a - 102c) test trace compiler running with variants and macros"
	
	# 1st time build includes var_source1 and var_source2 for variant_source.mmp
	t.id = "102a"
	t.name = "TC_variant_source_var1"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf -c default.tc_var1" + \
			" --configpath=test/smoke_suite/test_resources/tracecompiler/variant_source"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/variant_source.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/variant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/variant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/variant_source.exe",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/inv_sourceTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source1Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source2Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/fixed_id.definitions",
		"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
		"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
		"invariant_source_/armv5/udeb/inv_source.o",
		"invariant_source_/armv5/udeb/inv_source.o.d",
		"invariant_source_/armv5/urel/inv_source.o",
		"invariant_source_/armv5/urel/inv_source.o.d",
		"invariant_source_/winscw/udeb/inv_source.o",
		"invariant_source_/winscw/udeb/inv_source.o.d",
		"invariant_source_/winscw/urel/inv_source.o",
		"invariant_source_/winscw/urel/inv_source.o.d",
		"invariant_source_/tracecompile_invariant_source_exe_10000002.done",
		"variant_source_/armv5/udeb/var_source1.o",
		"variant_source_/armv5/udeb/var_source1.o.d",
		"variant_source_/armv5/udeb/var_source2.o",
		"variant_source_/armv5/udeb/var_source2.o.d",
		"variant_source_/armv5/urel/var_source1.o",
		"variant_source_/armv5/urel/var_source1.o.d",
		"variant_source_/armv5/urel/var_source2.o",
		"variant_source_/armv5/urel/var_source2.o.d",
		"variant_source_/winscw/udeb/var_source1.o",
		"variant_source_/winscw/udeb/var_source1.o.d",
		"variant_source_/winscw/udeb/var_source2.o",
		"variant_source_/winscw/udeb/var_source2.o.d",
		"variant_source_/winscw/urel/var_source1.o",
		"variant_source_/winscw/urel/var_source1.o.d",
		"variant_source_/winscw/urel/var_source2.o",
		"variant_source_/winscw/urel/var_source2.o.d",
		"variant_source_/tracecompile_variant_source_exe_10000003.done"
	])
	t.antitargets = [
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h"
		]
	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
		"variant_source_/armv5/udeb/var_source3.o",
		"variant_source_/armv5/urel/var_source3.o",
		"variant_source_/winscw/udeb/var_source3.o",
		"variant_source_/winscw/urel/var_source3.o"
	])
	t.run()

	# 2nd time build includes var_source1 and var_source3 for variant_source.mmp
	t = SmokeTest()
	t.id = "102b"
	t.name = "TC_variant_source_var2"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf -c default.tc_var2" + \
			" --configpath=test/smoke_suite/test_resources/tracecompiler/variant_source"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/variant_source.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/variant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/variant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/invariant_source.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/variant_source.exe",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/inv_sourceTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source1Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source2Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h",
		"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
		"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
		"invariant_source_/armv5/udeb/inv_source.o",
		"invariant_source_/armv5/udeb/inv_source.o.d",
		"invariant_source_/armv5/urel/inv_source.o",
		"invariant_source_/armv5/urel/inv_source.o.d",
		"invariant_source_/winscw/udeb/inv_source.o",
		"invariant_source_/winscw/udeb/inv_source.o.d",
		"invariant_source_/winscw/urel/inv_source.o",
		"invariant_source_/winscw/urel/inv_source.o.d",
		"invariant_source_/tracecompile_invariant_source_exe_10000002.done",
		"variant_source_/armv5/udeb/var_source1.o",
		"variant_source_/armv5/udeb/var_source1.o.d",
		"variant_source_/armv5/udeb/var_source3.o",
		"variant_source_/armv5/udeb/var_source3.o.d",
		"variant_source_/armv5/urel/var_source1.o",
		"variant_source_/armv5/urel/var_source1.o.d",
		"variant_source_/armv5/urel/var_source3.o",
		"variant_source_/armv5/urel/var_source3.o.d",
		"variant_source_/winscw/udeb/var_source1.o",
		"variant_source_/winscw/udeb/var_source1.o.d",
		"variant_source_/winscw/udeb/var_source3.o",
		"variant_source_/winscw/udeb/var_source3.o.d",
		"variant_source_/winscw/urel/var_source1.o",
		"variant_source_/winscw/urel/var_source1.o.d",
		"variant_source_/winscw/urel/var_source3.o",
		"variant_source_/winscw/urel/var_source3.o.d",
		"variant_source_/tracecompile_variant_source_exe_10000003.done"
	])
	t.run()

	# Build multiple variants together, which involves different source files in one mmp
	# Raptor only call trace compiler once no matter how many variants
	# In this example, ".phone" 1 2 3 involve tc_a b c respectively, and all involve tc_main
	t = SmokeTest()
	t.id = "102c"
	t.name = "TC_multiple_variants"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf" + \
			" -c armv5.phone1 -c armv5.phone2 -c armv5.phone3" + \
			" --configpath=test/smoke_suite/test_resources/tracecompiler/multiple_variants"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5.phone1/udeb/tc_variants.exe",
		"$(EPOCROOT)/epoc32/release/armv5.phone1/urel/tc_variants.exe",
		"$(EPOCROOT)/epoc32/release/armv5.phone2/udeb/tc_variants.exe",
		"$(EPOCROOT)/epoc32/release/armv5.phone2/urel/tc_variants.exe",
		"$(EPOCROOT)/epoc32/release/armv5.phone3/udeb/tc_variants.exe",
		"$(EPOCROOT)/epoc32/release/armv5.phone3/urel/tc_variants.exe",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_mainTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_aTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_bTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_cTraces.h",
		"$(EPOCROOT)/epoc32/ost_dictionaries/tc_variants_0x10000004_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf', [
		"tc_variants_/armv5.phone1/udeb/tc_main.o",
		"tc_variants_/armv5.phone1/udeb/tc_a.o",
		"tc_variants_/armv5.phone1/urel/tc_main.o",
		"tc_variants_/armv5.phone1/urel/tc_a.o",
		"tc_variants_/armv5.phone2/udeb/tc_main.o",
		"tc_variants_/armv5.phone2/udeb/tc_b.o",
		"tc_variants_/armv5.phone2/urel/tc_main.o",
		"tc_variants_/armv5.phone2/urel/tc_b.o",
		"tc_variants_/armv5.phone3/udeb/tc_main.o",
		"tc_variants_/armv5.phone3/udeb/tc_c.o",
		"tc_variants_/armv5.phone3/urel/tc_main.o",
		"tc_variants_/armv5.phone3/urel/tc_c.o",
		"tc_variants_/tracecompile_tc_variants_exe_10000004.done"
	])	
	t.run()

	# 102d and 102e is to test a very rare situation, where one mmpfile includes 3 children mmpfiles, 
	# which are guarded by macros. They share some source file, and two share the same UID3. 
	# When build them together, Raptor should be able to distinguish them and run trace compiler 
	# on each of them. 
	t = SmokeTest()
	t.id = "102d"
	t.name = "TC_mum_children_mmps_build"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \
			" -c armv5.tc_var1 -c armv5.tc_var2 -c armv5.tc_var3" + \
			" --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/child1.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/child1.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/child2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child1_exe/child1Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child1_exe/commonTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/child2Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/commonTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/child3Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/commonTraces.h",
		"$(EPOCROOT)/epoc32/ost_dictionaries/child1_exe_0x11100001_Dictionary.xml",
		"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
		"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
		"child1_/armv5/udeb/child1.o",
		"child1_/armv5/udeb/common.o",
		"child1_/armv5/urel/child1.o",
		"child1_/armv5/urel/common.o",
		"child1_/tracecompile_child1_exe_11100001.done",
		"child2_/armv5/udeb/child2.o",
		"child2_/armv5/udeb/common.o",
		"child2_/armv5/urel/child2.o",
		"child2_/armv5/urel/common.o",
		"child2_/tracecompile_child2_exe_11100002.done",
		"child3_/armv5/udeb/child3.o",
		"child3_/armv5/udeb/common.o",
		"child3_/armv5/urel/child3.o",
		"child3_/armv5/urel/common.o",
		"child3_/tracecompile_child3_exe_11100002.done"
	])
	t.warnings = 3
	t.run()

	# Clean mmp A then build mmp B and C. As common.cpp is shared by A B and C, commonTraces.h would be 
	# cleaned when cleaning mmp A. But as B and C aren't cleaned, Raptor wouldn't run trace compiler on
	# B and C, thus commonTraces.h wouldn't be generated again, so be missing for mmp B and C.
	# The solution is to use new trace path "traces/traces_<TARGET>_<TARGETTYPE>" instead of "traces" so shared 
	# source has different copy of trace headers for different projects.
	t = SmokeTest()
	t.id = "102e"
	t.name = "TC_mum_children_mmps_clean"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \
			" --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps" + \
			" -c armv5.tc_var1 CLEAN && " + \
			"sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \
			" --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps" + \
			" -c armv5.tc_var2 -c armv5.tc_var3"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/child2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/child2Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/commonTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/child3Traces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/commonTraces.h",
		"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
		"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
		"child2_/armv5/udeb/child2.o",
		"child2_/armv5/udeb/common.o",
		"child2_/armv5/urel/child2.o",
		"child2_/armv5/urel/common.o",
		"child2_/tracecompile_child2_exe_11100002.done",
		"child3_/armv5/udeb/child3.o",
		"child3_/armv5/udeb/common.o",
		"child3_/armv5/urel/child3.o",
		"child3_/armv5/urel/common.o",
		"child3_/tracecompile_child3_exe_11100002.done"
	])
	t.warnings = 3
	t.run()


	t.id = "102"
	t.name = "tracecompiler_variants"
	t.print_result()
	
	return t
def run():

	t = AntiTargetSmokeTest()
	t.name = "unfrozen_savespace"

	t.command = "sbs -b smoke_suite/test_resources/unfrozen/bld.inf -k -c winscw -c armv5 CLEAN" \
				" && sbs -b smoke_suite/test_resources/unfrozen/bld.inf -c winscw.savespace -c armv5.savespace"

	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.map",	
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.lib",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.lib",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols3.dll",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test_unfrozen.exe"
		]

	t.antitargets = []

	t.addbuildantitargets('smoke_suite/test_resources/unfrozen/bld.inf', [
		"test_unfrozen_/armv5/udeb",
		"test_unfrozen_/armv5/urel",
		"test_unfrozen_/winscw/udeb",
		"test_unfrozen_/winscw/urel"
		# TODO: Add these anti targets once we figure out how to actually delete
		# them.
		# "unfrozensymbols2_dll/armv5/udeb",
		# "unfrozensymbols2_dll/armv5/urel",
		# "unfrozensymbols2_dll/winscw/udeb",
		# "unfrozensymbols2_dll/winscw/urel",
		# "unfrozensymbols_dll/armv5/udeb",
		# "unfrozensymbols_dll/armv5/urel",
		# "unfrozensymbols_dll/winscw/udeb",
		# "unfrozensymbols_dll/winscw/urel"
		] )

	t.countmatch = [
			[".*Elf2e32: Warning: New Symbol .* found, export\(s\) not yet Frozen.*", 26],
			[".*\.def\(\d\) : .*@\d.*", 18]
		]

	t.warnings = 8
	t.run()
	return t
def run():
    # 102a - 102b Test running trace compiler on one mmp with different source files controlled macros.
    t = AntiTargetSmokeTest()
    t.description = "Testcases (ID 102a - 102c) test trace compiler running with variants and macros"

    # 1st time build includes var_source1 and var_source2 for variant_source.mmp
    t.id = "102a"
    t.name = "TC_variant_source_var1"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf -c default.tc_var1" + \
      " --configpath=test/smoke_suite/test_resources/tracecompiler/variant_source"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/variant_source.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/variant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/variant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/variant_source.exe",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/inv_sourceTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source1Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source2Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/fixed_id.definitions",
        "$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
        "$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf',
        [
            "invariant_source_/armv5/udeb/inv_source.o",
            "invariant_source_/armv5/udeb/inv_source.o.d",
            "invariant_source_/armv5/urel/inv_source.o",
            "invariant_source_/armv5/urel/inv_source.o.d",
            "invariant_source_/winscw/udeb/inv_source.o",
            "invariant_source_/winscw/udeb/inv_source.o.d",
            "invariant_source_/winscw/urel/inv_source.o",
            "invariant_source_/winscw/urel/inv_source.o.d",
            "invariant_source_/tracecompile_invariant_source_exe_10000002.done",
            "variant_source_/armv5/udeb/var_source1.o",
            "variant_source_/armv5/udeb/var_source1.o.d",
            "variant_source_/armv5/udeb/var_source2.o",
            "variant_source_/armv5/udeb/var_source2.o.d",
            "variant_source_/armv5/urel/var_source1.o",
            "variant_source_/armv5/urel/var_source1.o.d",
            "variant_source_/armv5/urel/var_source2.o",
            "variant_source_/armv5/urel/var_source2.o.d",
            "variant_source_/winscw/udeb/var_source1.o",
            "variant_source_/winscw/udeb/var_source1.o.d",
            "variant_source_/winscw/udeb/var_source2.o",
            "variant_source_/winscw/udeb/var_source2.o.d",
            "variant_source_/winscw/urel/var_source1.o",
            "variant_source_/winscw/urel/var_source1.o.d",
            "variant_source_/winscw/urel/var_source2.o",
            "variant_source_/winscw/urel/var_source2.o.d",
            "variant_source_/tracecompile_variant_source_exe_10000003.done"
        ])
    t.antitargets = [
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h"
    ]
    t.addbuildantitargets(
        'smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf',
        [
            "variant_source_/armv5/udeb/var_source3.o",
            "variant_source_/armv5/urel/var_source3.o",
            "variant_source_/winscw/udeb/var_source3.o",
            "variant_source_/winscw/urel/var_source3.o"
        ])
    t.run()

    # 2nd time build includes var_source1 and var_source3 for variant_source.mmp
    t = SmokeTest()
    t.id = "102b"
    t.name = "TC_variant_source_var2"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf -c default.tc_var2" + \
      " --configpath=test/smoke_suite/test_resources/tracecompiler/variant_source"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/variant_source.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/variant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/variant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/invariant_source.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/variant_source.exe",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/inv_sourceTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source1Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source2Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h",
        "$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
        "$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf',
        [
            "invariant_source_/armv5/udeb/inv_source.o",
            "invariant_source_/armv5/udeb/inv_source.o.d",
            "invariant_source_/armv5/urel/inv_source.o",
            "invariant_source_/armv5/urel/inv_source.o.d",
            "invariant_source_/winscw/udeb/inv_source.o",
            "invariant_source_/winscw/udeb/inv_source.o.d",
            "invariant_source_/winscw/urel/inv_source.o",
            "invariant_source_/winscw/urel/inv_source.o.d",
            "invariant_source_/tracecompile_invariant_source_exe_10000002.done",
            "variant_source_/armv5/udeb/var_source1.o",
            "variant_source_/armv5/udeb/var_source1.o.d",
            "variant_source_/armv5/udeb/var_source3.o",
            "variant_source_/armv5/udeb/var_source3.o.d",
            "variant_source_/armv5/urel/var_source1.o",
            "variant_source_/armv5/urel/var_source1.o.d",
            "variant_source_/armv5/urel/var_source3.o",
            "variant_source_/armv5/urel/var_source3.o.d",
            "variant_source_/winscw/udeb/var_source1.o",
            "variant_source_/winscw/udeb/var_source1.o.d",
            "variant_source_/winscw/udeb/var_source3.o",
            "variant_source_/winscw/udeb/var_source3.o.d",
            "variant_source_/winscw/urel/var_source1.o",
            "variant_source_/winscw/urel/var_source1.o.d",
            "variant_source_/winscw/urel/var_source3.o",
            "variant_source_/winscw/urel/var_source3.o.d",
            "variant_source_/tracecompile_variant_source_exe_10000003.done"
        ])
    t.run()

    # Build multiple variants together, which involves different source files in one mmp
    # Raptor only call trace compiler once no matter how many variants
    # In this example, ".phone" 1 2 3 involve tc_a b c respectively, and all involve tc_main
    t = SmokeTest()
    t.id = "102c"
    t.name = "TC_multiple_variants"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf" + \
      " -c armv5.phone1 -c armv5.phone2 -c armv5.phone3" + \
      " --configpath=test/smoke_suite/test_resources/tracecompiler/multiple_variants"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5.phone1/udeb/tc_variants.exe",
        "$(EPOCROOT)/epoc32/release/armv5.phone1/urel/tc_variants.exe",
        "$(EPOCROOT)/epoc32/release/armv5.phone2/udeb/tc_variants.exe",
        "$(EPOCROOT)/epoc32/release/armv5.phone2/urel/tc_variants.exe",
        "$(EPOCROOT)/epoc32/release/armv5.phone3/udeb/tc_variants.exe",
        "$(EPOCROOT)/epoc32/release/armv5.phone3/urel/tc_variants.exe",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_mainTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_aTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_bTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_cTraces.h",
        "$(EPOCROOT)/epoc32/ost_dictionaries/tc_variants_0x10000004_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf',
        [
            "tc_variants_/armv5.phone1/udeb/tc_main.o",
            "tc_variants_/armv5.phone1/udeb/tc_a.o",
            "tc_variants_/armv5.phone1/urel/tc_main.o",
            "tc_variants_/armv5.phone1/urel/tc_a.o",
            "tc_variants_/armv5.phone2/udeb/tc_main.o",
            "tc_variants_/armv5.phone2/udeb/tc_b.o",
            "tc_variants_/armv5.phone2/urel/tc_main.o",
            "tc_variants_/armv5.phone2/urel/tc_b.o",
            "tc_variants_/armv5.phone3/udeb/tc_main.o",
            "tc_variants_/armv5.phone3/udeb/tc_c.o",
            "tc_variants_/armv5.phone3/urel/tc_main.o",
            "tc_variants_/armv5.phone3/urel/tc_c.o",
            "tc_variants_/tracecompile_tc_variants_exe_10000004.done"
        ])
    t.run()

    # 102d and 102e is to test a very rare situation, where one mmpfile includes 3 children mmpfiles,
    # which are guarded by macros. They share some source file, and two share the same UID3.
    # When build them together, Raptor should be able to distinguish them and run trace compiler
    # on each of them.
    t = SmokeTest()
    t.id = "102d"
    t.name = "TC_mum_children_mmps_build"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \
      " -c armv5.tc_var1 -c armv5.tc_var2 -c armv5.tc_var3" + \
      " --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/child1.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/child1.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/child2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child1_exe/child1Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child1_exe/commonTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/child2Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/commonTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/child3Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/commonTraces.h",
        "$(EPOCROOT)/epoc32/ost_dictionaries/child1_exe_0x11100001_Dictionary.xml",
        "$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
        "$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf',
        [
            "child1_/armv5/udeb/child1.o", "child1_/armv5/udeb/common.o",
            "child1_/armv5/urel/child1.o", "child1_/armv5/urel/common.o",
            "child1_/tracecompile_child1_exe_11100001.done",
            "child2_/armv5/udeb/child2.o", "child2_/armv5/udeb/common.o",
            "child2_/armv5/urel/child2.o", "child2_/armv5/urel/common.o",
            "child2_/tracecompile_child2_exe_11100002.done",
            "child3_/armv5/udeb/child3.o", "child3_/armv5/udeb/common.o",
            "child3_/armv5/urel/child3.o", "child3_/armv5/urel/common.o",
            "child3_/tracecompile_child3_exe_11100002.done"
        ])
    t.warnings = 3
    t.run()

    # Clean mmp A then build mmp B and C. As common.cpp is shared by A B and C, commonTraces.h would be
    # cleaned when cleaning mmp A. But as B and C aren't cleaned, Raptor wouldn't run trace compiler on
    # B and C, thus commonTraces.h wouldn't be generated again, so be missing for mmp B and C.
    # The solution is to use new trace path "traces/traces_<TARGET>_<TARGETTYPE>" instead of "traces" so shared
    # source has different copy of trace headers for different projects.
    t = SmokeTest()
    t.id = "102e"
    t.name = "TC_mum_children_mmps_clean"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \
      " --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps" + \
      " -c armv5.tc_var1 CLEAN && " + \
      "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \
      " --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps" + \
      " -c armv5.tc_var2 -c armv5.tc_var3"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/child2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/child2Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child2_exe/commonTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/child3Traces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/child3_exe/commonTraces.h",
        "$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
        "$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf',
        [
            "child2_/armv5/udeb/child2.o", "child2_/armv5/udeb/common.o",
            "child2_/armv5/urel/child2.o", "child2_/armv5/urel/common.o",
            "child2_/tracecompile_child2_exe_11100002.done",
            "child3_/armv5/udeb/child3.o", "child3_/armv5/udeb/common.o",
            "child3_/armv5/urel/child3.o", "child3_/armv5/urel/common.o",
            "child3_/tracecompile_child3_exe_11100002.done"
        ])
    t.warnings = 3
    t.run()

    t.id = "102"
    t.name = "tracecompiler_variants"
    t.print_result()

    return t
def run():
    t = AntiTargetSmokeTest()
    t.name = "delete_on_failed_compile"
    t.description = "Test that object files are not present following a forced failed compile."

    t.usebash = True
    base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 -k"

    # Ensure everything is reallyclean before the test
    t.name = "delete_on_failed_compile_reallyclean_01"
    t.returncode = 0
    t.antitargets = []
    t.command = base_command + " reallyclean"
    t.run()

    # Object files should *not* be present after this forced failed compile
    t.name = "delete_on_failed_compile_build"
    t.errors = 1
    t.returncode = 1
    # None of these files should be present
    t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', [
        "test_/armv5/udeb/test.o", "test_/armv5/udeb/test1.o",
        "test_/armv5/udeb/test2.o", "test_/armv5/udeb/test3.o",
        "test_/armv5/udeb/test4.o", "test_/armv5/udeb/test5.o",
        "test_/armv5/udeb/test6.o", "test_/armv5/urel/test.o",
        "test_/armv5/urel/test1.o", "test_/armv5/urel/test2.o",
        "test_/armv5/urel/test3.o", "test_/armv5/urel/test4.o",
        "test_/armv5/urel/test5.o", "test_/armv5/urel/test6.o"
    ])
    sbshome = os.environ["SBS_HOME"].replace("\\", "/").rstrip("/")
    t.command = base_command.replace("armv5", "armv5.fake_compiler") + \
    " --configpath={0}/test/smoke_suite/test_resources/simple/compilervariants".format(sbshome)
    t.run()

    t.name = "delete_on_failed_compile_reallyclean_02"
    t.errors = 0
    t.returncode = 0
    t.antitargets = []  # Remove the list of anti-targets
    t.command = base_command + " reallyclean"
    t.run()

    # Use a redefined make_engine variant - object files *should* be present
    t.name = "delete_on_failed_compile_build_redefined_make_engine"
    t.errors = 1
    t.returncode = 1
    t.antitargets = []  # Remove the list of anti-targets
    # All of these files should be present
    t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [
        "test_/armv5/udeb/test.o", "test_/armv5/udeb/test1.o",
        "test_/armv5/udeb/test2.o", "test_/armv5/udeb/test3.o",
        "test_/armv5/udeb/test4.o", "test_/armv5/udeb/test5.o",
        "test_/armv5/udeb/test6.o", "test_/armv5/urel/test.o",
        "test_/armv5/urel/test1.o", "test_/armv5/urel/test2.o",
        "test_/armv5/urel/test3.o", "test_/armv5/urel/test4.o",
        "test_/armv5/urel/test5.o", "test_/armv5/urel/test6.o"
    ])

    t.command = base_command.replace("armv5", "armv5.fake_compiler") + " -e make_test " \
    + " --configpath={0}/test/smoke_suite/test_resources/simple/compilervariants ".format(sbshome) \
    + " --configpath={0}/test/smoke_suite/test_resources/simple/makevariants".format(sbshome)
    t.run()

    t.name = "delete_on_failed_compile_reallyclean_03"
    t.errors = 0
    t.returncode = 0
    t.antitargets = []  # Remove the list of anti-targets
    t.targets = []  # Remove the list of targets
    t.command = base_command + " reallyclean"
    t.run()

    t.name = "delete_on_failed_compile"
    t.print_result()
    return t
Exemple #13
0
def run():
    t = AntiTargetSmokeTest()
    t.description = "Testcases (ID 0101a - 0101d) test trace compiler"
    # General test for trace compiler, which generates
    # 1. trace headers like <source>Traces.h
    # 2. fixed_id.definitions
    # 3. dictionary files like <project name>_<UID>_Dictionary.xml
    # 4. trace definitions like <project name>_<UID>_TraceDefinitions.h
    t.id = "101a"
    t.name = "TC_general"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
        "$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf', [
            "testTC_dll/armv5/udeb/wlanhwinit.o",
            "testTC_dll/armv5/udeb/wlanhwinit.o.d",
            "testTC_dll/armv5/udeb/wlanhwinitmain.o",
            "testTC_dll/armv5/udeb/wlanhwinitmain.o.d",
            "testTC_dll/armv5/udeb/wlanhwinitpermparser.o",
            "testTC_dll/armv5/udeb/wlanhwinitpermparser.o.d",
            "testTC_dll/armv5/udeb/testTC_udeb_objects.via",
            "testTC_dll/armv5/udeb/testTC{000a0000}.def",
            "testTC_dll/armv5/urel/wlanhwinit.o",
            "testTC_dll/armv5/urel/wlanhwinit.o.d",
            "testTC_dll/armv5/urel/wlanhwinitmain.o",
            "testTC_dll/armv5/urel/wlanhwinitmain.o.d",
            "testTC_dll/armv5/urel/wlanhwinitpermparser.o",
            "testTC_dll/armv5/urel/wlanhwinitpermparser.o.d",
            "testTC_dll/armv5/urel/testTC_urel_objects.via",
            "testTC_dll/armv5/urel/testTC{000a0000}.def",
            "testTC_dll/tracecompile_testTC_dll_1000008d.done"
        ])
    t.run()

    # General CLEAN test for trace compiler outputs
    t.id = "101b"
    t.name = "TC_general_CLEAN"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler CLEAN"
    t.targets = []
    t.antitargets = [
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h"
    ]
    t.addbuildantitargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf',
        ["testtc_dll/tracecompile_testTC_dll_1000008d.done"])
    t.run()

    t.id = "101c"
    t.name = "TC_bv_path"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf -c armv5.tracecompiler"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe.map",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions",
        "$(EPOCROOT)/epoc32/ost_dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf',
        [
            "HelloWorld_exe/armv5/udeb/HelloWorld.o",
            "HelloWorld_exe/armv5/udeb/HelloWorld.o.d",
            "HelloWorld_exe/armv5/udeb/HelloWorld_udeb_objects.via",
            "HelloWorld_exe/armv5/urel/HelloWorld.o",
            "HelloWorld_exe/armv5/urel/HelloWorld.o.d",
            "HelloWorld_exe/armv5/urel/HelloWorld_urel_objects.via",
            "HelloWorld_exe/tracecompile_HelloWorld_exe_e78a5aa3.done"
        ])
    t.antitargets = []
    t.run()

    # 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source
    # containing no osttraces.
    # Trace compiler only runs when there are osttraces code in source. Raptor decides this by
    # checking whether there is a "traces" or "traces_<prj_name>" folder in USERINCLUDE in a mmp file.
    t.id = "101d"
    t.name = "TC_autorun1"
    # Run - USERINCLUDE ../traces_autorun1
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
      " -p autorun1.mmp"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
            "test_/armv5/udeb/test.o", "test_/armv5/urel/test.o",
            "test_/tracecompile_test_exe_00000001.done"
        ])
    t.antitargets = []  # Currently unnecessary, but helps the code be robust
    t.run()

    t.id = "101e"
    t.name = "TC_autorun2"
    # No run - USERINCLUDE ./tracesnotmatch
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
      " -p autorun2.mmp CLEAN " + \
      "&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
      " -p autorun2.mmp"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
            "test_/armv5/udeb/test.o",
            "test_/armv5/urel/test.o",
        ])
    t.antitargets = []  # Currently unnecessary, but helps the code be robust
    t.addbuildantitargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf',
        ["test_/tracecompile_test_exe_00000001.done"])
    t.run()

    t.id = "101f"
    t.name = "TC_autorun3"
    # No run - no UID
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
      " -p autorun3.mmp CLEAN " + \
      "&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
      " -p autorun3.mmp"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
            "test_/armv5/udeb/test.o",
            "test_/armv5/urel/test.o",
        ])
    t.antitargets = []
    t.addbuildantitargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf',
        ["test_/tracecompile_test_exe_00000001.done"])
    t.run()

    # Test trace compiler doesn't run when it is switched off
    # Trace compiler switch is off by default. To turn it on use variant ".tracecompiler".
    t.id = "101g"
    t.name = "TC_switch_off"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
      " -p autorun1.mmp CLEAN " + \
      "&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5 -p autorun1.mmp"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf',
        ["test_/armv5/udeb/test.o", "test_/armv5/urel/test.o"])
    t.antitargets = []
    t.addbuildantitargets(
        'smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf',
        ["test_/tracecompile_test_exe_00000001.done"])
    t.run()

    t.id = "101"
    t.name = "tracecompiler_general"
    t.print_result()
    return t
def run():
	t = AntiTargetSmokeTest()
	t.name = "delete_on_failed_compile"
	t.description = "Test that object files are not present following a forced failed compile."
	
	t.usebash = True
	base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 -k"
	
	# Ensure everything is reallyclean before the test
	t.name = "delete_on_failed_compile_reallyclean_01"
	t.returncode = 0
	t.antitargets = [ ]
	t.command = base_command + " reallyclean"
	t.run()
	
	# Object files should *not* be present after this forced failed compile
	t.name = "delete_on_failed_compile_build"
	t.errors = 1
	t.returncode = 1
	# None of these files should be present
	t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', 
		[	"test_/armv5/udeb/test.o",
			"test_/armv5/udeb/test1.o",
			"test_/armv5/udeb/test2.o",
			"test_/armv5/udeb/test3.o",
			"test_/armv5/udeb/test4.o",
			"test_/armv5/udeb/test5.o",
			"test_/armv5/udeb/test6.o",
			"test_/armv5/urel/test.o",
			"test_/armv5/urel/test1.o",
			"test_/armv5/urel/test2.o",
			"test_/armv5/urel/test3.o",
			"test_/armv5/urel/test4.o",
			"test_/armv5/urel/test5.o",
			"test_/armv5/urel/test6.o"  ])
	sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/")
	t.command = base_command.replace("armv5", "armv5.fake_compiler") + \
	" --configpath={0}/test/smoke_suite/test_resources/simple/compilervariants".format(sbshome)
	t.run()
	
	t.name = "delete_on_failed_compile_reallyclean_02"
	t.errors = 0
	t.returncode = 0
	t.antitargets = [] # Remove the list of anti-targets
	t.command = base_command + " reallyclean"
	t.run()
	
	# Use a redefined make_engine variant - object files *should* be present
	t.name = "delete_on_failed_compile_build_redefined_make_engine"
	t.errors = 1
	t.returncode = 1
	t.antitargets = [] # Remove the list of anti-targets
	# All of these files should be present
	t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', 
		[	"test_/armv5/udeb/test.o",
			"test_/armv5/udeb/test1.o",
			"test_/armv5/udeb/test2.o",
			"test_/armv5/udeb/test3.o",
			"test_/armv5/udeb/test4.o",
			"test_/armv5/udeb/test5.o",
			"test_/armv5/udeb/test6.o",
			"test_/armv5/urel/test.o",
			"test_/armv5/urel/test1.o",
			"test_/armv5/urel/test2.o",
			"test_/armv5/urel/test3.o",
			"test_/armv5/urel/test4.o",
			"test_/armv5/urel/test5.o",
			"test_/armv5/urel/test6.o"  ])
	
	t.command = base_command.replace("armv5", "armv5.fake_compiler") + " -e make_test " \
	+ " --configpath={0}/test/smoke_suite/test_resources/simple/compilervariants ".format(sbshome) \
	+ " --configpath={0}/test/smoke_suite/test_resources/simple/makevariants".format(sbshome)
	t.run()
	
	t.name = "delete_on_failed_compile_reallyclean_03"
	t.errors = 0
	t.returncode = 0
	t.antitargets = [] # Remove the list of anti-targets
	t.targets = [] # Remove the list of targets
	t.command = base_command + " reallyclean"
	t.run()
	
	t.name = "delete_on_failed_compile"
	t.print_result()
	return t
Exemple #15
0
def run():
	result = SmokeTest.PASS
	
	t = SmokeTest()
	t.id = "0005a"
	t.name = "exe_armv5_winscw"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \
			"-c winscw"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test.exe.map"
		]
	t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o",
		"test_/winscw/udeb/test.o",
		"test_/winscw/udeb/test_UID_.o",
		"test_/winscw/udeb/test.UID.CPP",
		"test_/winscw/urel/test.o",
		"test_/winscw/urel/test_UID_.o",
		"test_/winscw/urel/test.UID.CPP"
	])
	t.run()
	if t.result == SmokeTest.FAIL:
		result = SmokeTest.FAIL
		
	
	"Check that CLEAN removes built files"
	c = AntiTargetSmokeTest()
	c.id = "0005b"
	c.name = "exe_armv5_winscw_clean"
	c.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \
			"-c winscw CLEAN"
	c.antitargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test.exe.map"
		]
	c.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o",
		"test_/winscw/udeb/test.o",
		"test_/winscw/udeb/test_UID_.o",
		"test_/winscw/udeb/test.UID.CPP",
		"test_/winscw/urel/test.o",
		"test_/winscw/urel/test_UID_.o",
		"test_/winscw/urel/test.UID.CPP"
	])
	c.run()
	if c.result == SmokeTest.FAIL:
		result = SmokeTest.FAIL
	
	
	"Rebuild"
	t.id = "0005c"
	t.run()
	if t.result == SmokeTest.FAIL:
		result = SmokeTest.FAIL
	
	
	"Check that REALLYCLEAN removes built files"
	c.id = "0005d"
	c.name = "exe_armv5_winscw_reallyclean"
	c.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \
			"-c winscw REALLYCLEAN"
	c.run()
	if c.result == SmokeTest.FAIL:
		result = SmokeTest.FAIL
	
	
	t.id = "5"
	t.name = "exe_armv5_winscw_plus_clean"
	t.result = result
	t.print_result()
	return t
Exemple #16
0
def run():
    t = AntiTargetSmokeTest()
    t.usebash = True

    # create some empty source files just to test createvmaps command file handling:
    test_cpp_files = []
    for i in range(0, 16):
        tf = "smoke_suite/test_resources/bv/variant1/test_createvmap{0:02}.cpp".format(
            i)
        f = open(tf, "w+")
        f.close()
        test_cpp_files.append(tf)

    preBuiltTargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/dummy.lib",
        "$(EPOCROOT)/epoc32/release/armv5/urel/dummy.lib",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/debfake.lib",
        "$(EPOCROOT)/epoc32/release/armv5/urel/relfake.lib"
    ]

    invariantTargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_invariant.dll",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_invariant.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_invariant.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_invariant.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_invariant.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_invariant.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_invariant.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_invariant{000a0000}.dso"
    ]

    variantTargetsDefaultTree = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createexe_variant3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createexe_variant3.exe.sym"
    ]

    variantTargetsProductTrees = [
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant2.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll.vmap",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe.vmap",
    ]

    variantTargetsGeneric = [
        "$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_var1.rsc",
        "$(EPOCROOT)/epoc32/include/dummy_var1.rsg",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_var2.rsc",
        "$(EPOCROOT)/epoc32/include/dummy_var2.rsg",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_var3.rsc",
        "$(EPOCROOT)/epoc32/include/dummy_var3.rsg",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_inv.rsc",
        "$(EPOCROOT)/epoc32/include/dummy_inv.rsg",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant1.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant1{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant2.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant2{000a0000}.dso"
    ]

    invariantBuildTargets = [
        "createstaticdll_invariant_dll/armv5/udeb/CreateStaticDLL_invariant.o",
        "createstaticdll_invariant_dll/armv5/udeb/CreateStaticDLL_invariant.o.d",
        "createstaticdll_invariant_dll/armv5/udeb/createstaticdll_invariant_udeb_objects.via",
        "createstaticdll_invariant_dll/armv5/udeb/createstaticdll_invariant{000a0000}.def",
        "createstaticdll_invariant_dll/armv5/udeb/createstaticdll_invariant{000a0000}.dso",
        "createstaticdll_invariant_dll/armv5/urel/CreateStaticDLL_invariant.o",
        "createstaticdll_invariant_dll/armv5/urel/CreateStaticDLL_invariant.o.d",
        "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant_urel_objects.via",
        "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.def",
        "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.dso",
        "dummy_inv_dll/dummy_inv_dummy.rsc.rpp",
        "dummy_inv_dll/dummy_inv_dummy.rsc.d"
    ]

    variantBuildTargetsDefaultTree = [
        "createstaticdll_variant1_dll/armv5/udeb/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5/udeb/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5/udeb/createstaticdll_variant1_udeb_objects.via",
        "createstaticdll_variant1_dll/armv5/udeb/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5/udeb/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant1_dll/armv5/urel/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5/urel/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5/urel/createstaticdll_variant1_urel_objects.via",
        "createstaticdll_variant1_dll/armv5/urel/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5/urel/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5/udeb/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5/udeb/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5/udeb/createstaticdll_variant2_udeb_objects.via",
        "createstaticdll_variant2_dll/armv5/udeb/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5/udeb/createstaticdll_variant2{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5/urel/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5/urel/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5/urel/createstaticdll_variant2_urel_objects.via",
        "createstaticdll_variant2_dll/armv5/urel/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5/urel/createstaticdll_variant2{000a0000}.dso",
        "createexe_variant3_exe/armv5/udeb/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5/udeb/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5/udeb/createexe_variant3_udeb_objects.via",
        "createexe_variant3_exe/armv5/urel/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5/urel/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5/urel/createexe_variant3_urel_objects.via"
    ]

    variantBuildTargetsProductTrees = [
        "createstaticdll_variant1_dll/armv5.one/udeb/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5.one/udeb/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5.one/udeb/createstaticdll_variant1_udeb_objects.via",
        "createstaticdll_variant1_dll/armv5.one/udeb/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5.one/udeb/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant1_dll/armv5.one/urel/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5.one/urel/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5.one/urel/createstaticdll_variant1_urel_objects.via",
        "createstaticdll_variant1_dll/armv5.one/urel/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5.one/urel/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5.one/udeb/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5.one/udeb/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5.one/udeb/createstaticdll_variant2_udeb_objects.via",
        "createstaticdll_variant2_dll/armv5.one/udeb/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5.one/udeb/createstaticdll_variant2{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5.one/urel/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5.one/urel/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5.one/urel/createstaticdll_variant2_urel_objects.via",
        "createstaticdll_variant2_dll/armv5.one/urel/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5.one/urel/createstaticdll_variant2{000a0000}.dso",
        "createexe_variant3_exe/armv5.one/udeb/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5.one/udeb/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5.one/udeb/createexe_variant3_udeb_objects.via",
        "createexe_variant3_exe/armv5.one/urel/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5.one/urel/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5.one/urel/createexe_variant3_urel_objects.via",
        "createstaticdll_variant1_dll/armv5.two/udeb/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5.two/udeb/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5.two/udeb/createstaticdll_variant1_udeb_objects.via",
        "createstaticdll_variant1_dll/armv5.two/udeb/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5.two/udeb/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant1_dll/armv5.two/urel/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5.two/urel/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5.two/urel/createstaticdll_variant1_urel_objects.via",
        "createstaticdll_variant1_dll/armv5.two/urel/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5.two/urel/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5.two/udeb/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5.two/udeb/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5.two/udeb/createstaticdll_variant2_udeb_objects.via",
        "createstaticdll_variant2_dll/armv5.two/udeb/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5.two/udeb/createstaticdll_variant2{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5.two/urel/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5.two/urel/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5.two/urel/createstaticdll_variant2_urel_objects.via",
        "createstaticdll_variant2_dll/armv5.two/urel/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5.two/urel/createstaticdll_variant2{000a0000}.dso",
        "createexe_variant3_exe/armv5.two/udeb/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5.two/udeb/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5.two/udeb/createexe_variant3_udeb_objects.via",
        "createexe_variant3_exe/armv5.two/urel/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5.two/urel/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5.two/urel/createexe_variant3_urel_objects.via",
        "createstaticdll_variant1_dll/armv5.three/udeb/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5.three/udeb/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1_udeb_objects.via",
        "createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant1_dll/armv5.three/urel/CreateStaticDLL_variant1.o",
        "createstaticdll_variant1_dll/armv5.three/urel/CreateStaticDLL_variant1.o.d",
        "createstaticdll_variant1_dll/armv5.three/urel/createstaticdll_variant1_urel_objects.via",
        "createstaticdll_variant1_dll/armv5.three/urel/createstaticdll_variant1{000a0000}.def",
        "createstaticdll_variant1_dll/armv5.three/urel/createstaticdll_variant1{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5.three/udeb/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5.three/udeb/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5.three/udeb/createstaticdll_variant2_udeb_objects.via",
        "createstaticdll_variant2_dll/armv5.three/udeb/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5.three/udeb/createstaticdll_variant2{000a0000}.dso",
        "createstaticdll_variant2_dll/armv5.three/urel/CreateStaticDLL_variant2.o",
        "createstaticdll_variant2_dll/armv5.three/urel/CreateStaticDLL_variant2.o.d",
        "createstaticdll_variant2_dll/armv5.three/urel/createstaticdll_variant2_urel_objects.via",
        "createstaticdll_variant2_dll/armv5.three/urel/createstaticdll_variant2{000a0000}.def",
        "createstaticdll_variant2_dll/armv5.three/urel/createstaticdll_variant2{000a0000}.dso",
        "createexe_variant3_exe/armv5.three/udeb/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5.three/udeb/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5.three/udeb/createexe_variant3_udeb_objects.via",
        "createexe_variant3_exe/armv5.three/urel/CreateEXE_variant3.o",
        "createexe_variant3_exe/armv5.three/urel/CreateEXE_variant3.o.d",
        "createexe_variant3_exe/armv5.three/urel/createexe_variant3_urel_objects.via"
    ]

    variantBuildTargetsGeneric = [
        "dummy_var1_dll/dummy_var1_dummy.rsc.rpp",
        "dummy_var1_dll/dummy_var1_dummy.rsc.d",
        "dummy_var2_dll/dummy_var2_dummy.rsc.rpp",
        "dummy_var2_dll/dummy_var2_dummy.rsc.d",
        "dummy_var3_exe/dummy_var3_dummy.rsc.rpp",
        "dummy_var3_exe/dummy_var3_dummy.rsc.d"
    ]

    bldinf = 'smoke_suite/test_resources/bv/bld.inf'
    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)

    t.description = """Build variant and invariant components.
		In this default mode of operation, all components build for the non-product armv5 config whereas
		only variant components build for the armv5.* bv configs."""
    t.name = "featurevariant_build"

    t.command = "{0} && cat $(EPOCROOT)/epoc32/build/{1}/{2}".format(
        sbscommand, BldInfFile.outputPathFragment(bldinf),
        "createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1.vmap.cmdfile"
    )
    t.targets = preBuiltTargets + invariantTargets + variantTargetsGeneric + variantTargetsDefaultTree + variantTargetsProductTrees
    t.addbuildtargets(
        bldinf, invariantBuildTargets + variantBuildTargetsGeneric +
        variantBuildTargetsDefaultTree + variantBuildTargetsProductTrees)

    # Test that static libs are linked from the invariant place.
    t.mustmatch = [
        "armlink.*epoc32/release/armv5/urel/bv_static_lib.lib",
        "armlink.*epoc32/release/armv5/udeb/bv_static_lib.lib",
        "\s*-s.*variant1/CreateStaticDLL_variant1.cpp",
        "\s*-s.*variant1/test_createvmap01.cpp",
        "\s*-s.*variant1/test_createvmap02.cpp",
        "\s*-s.*variant1/test_createvmap03.cpp",
        "\s*-s.*variant1/test_createvmap04.cpp",
        "\s*-s.*variant1/test_createvmap05.cpp",
        "\s*-s.*variant1/test_createvmap06.cpp",
        "\s*-s.*variant1/test_createvmap07.cpp",
        "\s*-s.*variant1/test_createvmap08.cpp",
        "\s*-s.*variant1/test_createvmap09.cpp",
        "\s*-s.*variant1/test_createvmap10.cpp",
        "\s*-s.*variant1/test_createvmap11.cpp",
        "\s*-s.*variant1/test_createvmap12.cpp",
        "\s*-s.*variant1/test_createvmap13.cpp",
        "\s*-s.*variant1/test_createvmap14.cpp",
        "\s*-s.*variant1/test_createvmap15.cpp",
        "\s*-s.*variant1/CreateStaticDLL_variant1.mmp"
    ]
    t.run()

    t.description = """Build variant and invariant components using an os_properties.xml that sets FEATUREVARIANTSAFE=1.
		With FEATUREVARIANTSAFE only invariant components build for the non-product armv5 config and
		only variant components build for the armv5.* bv configs."""
    t.name = "featurevariant_build_featurevariantsafe"
    t.command = sbscommand + " --configpath=test/smoke_suite/test_resources/bv/config/properties"
    t.targets = preBuiltTargets + invariantTargets + variantTargetsGeneric + variantTargetsProductTrees
    t.addbuildtargets(
        'smoke_suite/test_resources/bv/bld.inf', invariantBuildTargets +
        variantBuildTargetsGeneric + variantBuildTargetsProductTrees)
    t.antitargets = variantTargetsDefaultTree
    t.addbuildantitargets('smoke_suite/test_resources/bv/bld.inf',
                          variantBuildTargetsDefaultTree)
    # Test that static libs are linked from the invariant place.
    t.mustmatch = [
        "armlink.*epoc32/release/armv5/urel/bv_static_lib.lib",
        "armlink.*epoc32/release/armv5/udeb/bv_static_lib.lib"
    ]
    t.run()

    t.description = """Check that the .vmap files appear in the WHAT output"""
    t.name = "featurevariant_vmap_in_whatlog"
    t.command = sbscommand + " --what"
    t.targets = []
    t.antitargets = []
    # Each product produces a .vmap file per binary
    t.mustmatch = [
        "epoc32.release.armv5\.one.udeb.createstaticdll_variant1\.dll\.vmap",
        "epoc32.release.armv5\.one.udeb.createstaticdll_variant2\.dll\.vmap",
        "epoc32.release.armv5\.one.udeb.createexe_variant3\.exe\.vmap",
        "epoc32.release.armv5\.one.urel.createstaticdll_variant1\.dll\.vmap",
        "epoc32.release.armv5\.one.urel.createstaticdll_variant2\.dll\.vmap",
        "epoc32.release.armv5\.one.urel.createexe_variant3\.exe\.vmap",
        "epoc32.release.armv5\.two.udeb.createstaticdll_variant1\.dll\.vmap",
        "epoc32.release.armv5\.two.udeb.createstaticdll_variant2\.dll\.vmap",
        "epoc32.release.armv5\.two.udeb.createexe_variant3\.exe\.vmap",
        "epoc32.release.armv5\.two.urel.createstaticdll_variant1\.dll\.vmap",
        "epoc32.release.armv5\.two.urel.createstaticdll_variant2\.dll\.vmap",
        "epoc32.release.armv5\.two.urel.createexe_variant3\.exe\.vmap",
        "epoc32.release.armv5\.three.udeb.createstaticdll_variant1\.dll\.vmap",
        "epoc32.release.armv5\.three.udeb.createstaticdll_variant2\.dll\.vmap",
        "epoc32.release.armv5\.three.udeb.createexe_variant3\.exe\.vmap",
        "epoc32.release.armv5\.three.urel.createstaticdll_variant1\.dll\.vmap",
        "epoc32.release.armv5\.three.urel.createstaticdll_variant2\.dll\.vmap",
        "epoc32.release.armv5\.three.urel.createexe_variant3\.exe\.vmap",
    ]
    t.run()

    # tests for the createvmap script
    createvmap = "python $(SBS_HOME)/bin/createvmap.py"
    vmapfile = "$(EPOCROOT)/epoc32/build/test.vmap"
    vmap = " -o " + vmapfile

    if 'SBS_BVCPP' in os.environ:
        bvcpp = " -c " + os.environ['SBS_BVCPP'].replace('\\', '/')
    else:
        bvcpp = " -c $(SBS_HOME)/$(HOSTPLATFORM_DIR)/bv/bin/cpp"
        if t.onWindows:
            bvcpp += ".exe"

    bvdata = "$(SBS_HOME)/test/smoke_suite/test_resources/bv"

    preinc = " -p " + bvdata + "/var1/var1.h"
    listA = " -f " + bvdata + "/listA.txt"
    listB = " -f " + bvdata + "/listB.txt"
    listC = " -f " + bvdata + "/listC.txt"
    srcWith = " -s " + bvdata + "/with_macros.cpp"
    srcWithout = " -s " + bvdata + "/without_macros.cpp"
    badSrc = " -s " + bvdata + "/with_errors.cpp"

    t.name = "createvmap exits with an error"
    t.usebash = True
    t.command = createvmap
    t.returncode = 1
    t.targets = []
    t.mustmatch = []
    t.run()

    t.name = "createvmap shows cpp errors"
    t.usebash = True
    t.command = createvmap + vmap + bvcpp + preinc + listA + badSrc
    t.returncode = 1
    t.targets = []
    t.mustmatch = ["#error this code is broken"]
    t.run()

    t.name = "createvmap errors on missing feature list"
    t.usebash = True
    t.command = createvmap + vmap + bvcpp + preinc + listC + srcWith
    t.returncode = 1
    t.targets = []
    t.mustmatch = ["The feature list '.*listC.txt' does not exist"]
    t.run()

    t.name = "createvmap warns on featureless code"
    t.usebash = True
    t.command = createvmap + vmap + bvcpp + preinc + listA + srcWithout
    t.returncode = 0
    t.targets = [vmapfile]
    t.mustmatch = ["warning: No feature macros were found in the source"]
    t.run()

    t.name = "createvmap creates the right vmap file"
    t.usebash = True
    t.command = createvmap + vmap + bvcpp + preinc + listA + listB + srcWith + srcWithout + " && cat " + vmapfile
    t.returncode = 0
    t.targets = [vmapfile]
    t.mustmatch = ["A_1=defined", "B_1000=undefined"]
    t.run()

    # clean up test cpp files from the first test (do it noow after they are no longer needed)
    for tf in test_cpp_files:
        os.unlink(tf)

    # print the overall result
    t.name = "featurevariants"
    t.print_result()
    return t
def run():
	t = AntiTargetSmokeTest()
	t.usebash = True

	# create some empty source files just to test createvmaps command file handling:
	test_cpp_files = []
	for i in range(0,16):
		tf = "smoke_suite/test_resources/bv/variant1/test_createvmap{0:02}.cpp".format(i)
		f = open(tf,"w+")
		f.close()
		test_cpp_files.append(tf)
	
	preBuiltTargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dummy.lib",
		"$(EPOCROOT)/epoc32/release/armv5/urel/dummy.lib",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/debfake.lib",
		"$(EPOCROOT)/epoc32/release/armv5/urel/relfake.lib"
		]
	
	invariantTargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_invariant.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_invariant.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_invariant.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_invariant.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_invariant.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_invariant.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_invariant.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_invariant{000a0000}.dso"
		]
	
	variantTargetsDefaultTree = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll_variant2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createexe_variant3.exe.sym",

		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll_variant2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createexe_variant3.exe.sym"
		]
	
	variantTargetsProductTrees = [		
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createstaticdll_variant2.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5.one/udeb/createexe_variant3.exe.vmap",

		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant1.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createstaticdll_variant2.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe.sym",		
		"$(EPOCROOT)/epoc32/release/armv5.one/urel/createexe_variant3.exe.vmap",

		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant1.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createstaticdll_variant2.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5.two/udeb/createexe_variant3.exe.vmap",
		
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant1.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createstaticdll_variant2.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5.two/urel/createexe_variant3.exe.vmap",

		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant1.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createstaticdll_variant2.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5.three/udeb/createexe_variant3.exe.vmap",
		
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant1.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createstaticdll_variant2.dll.vmap",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5.three/urel/createexe_variant3.exe.vmap",
		]
	
	variantTargetsGeneric = [
		"$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_var1.rsc",
		"$(EPOCROOT)/epoc32/include/dummy_var1.rsg",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_var2.rsc",
		"$(EPOCROOT)/epoc32/include/dummy_var2.rsg",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_var3.rsc",
		"$(EPOCROOT)/epoc32/include/dummy_var3.rsg",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/dummy_inv.rsc",
		"$(EPOCROOT)/epoc32/include/dummy_inv.rsg",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant1.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant1{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant2.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll_variant2{000a0000}.dso"
		]
	
	invariantBuildTargets = [
		"createstaticdll_invariant_dll/armv5/udeb/CreateStaticDLL_invariant.o",
		"createstaticdll_invariant_dll/armv5/udeb/CreateStaticDLL_invariant.o.d",
		"createstaticdll_invariant_dll/armv5/udeb/createstaticdll_invariant_udeb_objects.via",
		"createstaticdll_invariant_dll/armv5/udeb/createstaticdll_invariant{000a0000}.def",
		"createstaticdll_invariant_dll/armv5/udeb/createstaticdll_invariant{000a0000}.dso",
		"createstaticdll_invariant_dll/armv5/urel/CreateStaticDLL_invariant.o",
		"createstaticdll_invariant_dll/armv5/urel/CreateStaticDLL_invariant.o.d",
		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant_urel_objects.via",
		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.def",
		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.dso",
		"dummy_inv_dll/dummy_inv_dummy.rsc.rpp",
		"dummy_inv_dll/dummy_inv_dummy.rsc.d"
		]

	variantBuildTargetsDefaultTree = [
		"createstaticdll_variant1_dll/armv5/udeb/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5/udeb/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5/udeb/createstaticdll_variant1_udeb_objects.via",
		"createstaticdll_variant1_dll/armv5/udeb/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5/udeb/createstaticdll_variant1{000a0000}.dso",
		"createstaticdll_variant1_dll/armv5/urel/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5/urel/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5/urel/createstaticdll_variant1_urel_objects.via",
		"createstaticdll_variant1_dll/armv5/urel/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5/urel/createstaticdll_variant1{000a0000}.dso",
		
		"createstaticdll_variant2_dll/armv5/udeb/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5/udeb/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5/udeb/createstaticdll_variant2_udeb_objects.via",
		"createstaticdll_variant2_dll/armv5/udeb/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5/udeb/createstaticdll_variant2{000a0000}.dso",
		"createstaticdll_variant2_dll/armv5/urel/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5/urel/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5/urel/createstaticdll_variant2_urel_objects.via",
		"createstaticdll_variant2_dll/armv5/urel/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5/urel/createstaticdll_variant2{000a0000}.dso",
		
		"createexe_variant3_exe/armv5/udeb/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5/udeb/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5/udeb/createexe_variant3_udeb_objects.via",
		"createexe_variant3_exe/armv5/urel/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5/urel/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5/urel/createexe_variant3_urel_objects.via"
		]
	
	variantBuildTargetsProductTrees = [		
		"createstaticdll_variant1_dll/armv5.one/udeb/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5.one/udeb/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5.one/udeb/createstaticdll_variant1_udeb_objects.via",
		"createstaticdll_variant1_dll/armv5.one/udeb/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5.one/udeb/createstaticdll_variant1{000a0000}.dso",
		"createstaticdll_variant1_dll/armv5.one/urel/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5.one/urel/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5.one/urel/createstaticdll_variant1_urel_objects.via",
		"createstaticdll_variant1_dll/armv5.one/urel/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5.one/urel/createstaticdll_variant1{000a0000}.dso",
		
		"createstaticdll_variant2_dll/armv5.one/udeb/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5.one/udeb/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5.one/udeb/createstaticdll_variant2_udeb_objects.via",
		"createstaticdll_variant2_dll/armv5.one/udeb/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5.one/udeb/createstaticdll_variant2{000a0000}.dso",
		"createstaticdll_variant2_dll/armv5.one/urel/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5.one/urel/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5.one/urel/createstaticdll_variant2_urel_objects.via",
		"createstaticdll_variant2_dll/armv5.one/urel/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5.one/urel/createstaticdll_variant2{000a0000}.dso",
		
		"createexe_variant3_exe/armv5.one/udeb/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5.one/udeb/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5.one/udeb/createexe_variant3_udeb_objects.via",
		"createexe_variant3_exe/armv5.one/urel/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5.one/urel/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5.one/urel/createexe_variant3_urel_objects.via",
		
		"createstaticdll_variant1_dll/armv5.two/udeb/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5.two/udeb/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5.two/udeb/createstaticdll_variant1_udeb_objects.via",
		"createstaticdll_variant1_dll/armv5.two/udeb/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5.two/udeb/createstaticdll_variant1{000a0000}.dso",
		"createstaticdll_variant1_dll/armv5.two/urel/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5.two/urel/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5.two/urel/createstaticdll_variant1_urel_objects.via",
		"createstaticdll_variant1_dll/armv5.two/urel/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5.two/urel/createstaticdll_variant1{000a0000}.dso",
		
		"createstaticdll_variant2_dll/armv5.two/udeb/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5.two/udeb/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5.two/udeb/createstaticdll_variant2_udeb_objects.via",
		"createstaticdll_variant2_dll/armv5.two/udeb/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5.two/udeb/createstaticdll_variant2{000a0000}.dso",
		"createstaticdll_variant2_dll/armv5.two/urel/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5.two/urel/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5.two/urel/createstaticdll_variant2_urel_objects.via",
		"createstaticdll_variant2_dll/armv5.two/urel/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5.two/urel/createstaticdll_variant2{000a0000}.dso",
		
		"createexe_variant3_exe/armv5.two/udeb/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5.two/udeb/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5.two/udeb/createexe_variant3_udeb_objects.via",
		"createexe_variant3_exe/armv5.two/urel/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5.two/urel/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5.two/urel/createexe_variant3_urel_objects.via",
		
		"createstaticdll_variant1_dll/armv5.three/udeb/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5.three/udeb/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1_udeb_objects.via",
		"createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1{000a0000}.dso",
		"createstaticdll_variant1_dll/armv5.three/urel/CreateStaticDLL_variant1.o",
		"createstaticdll_variant1_dll/armv5.three/urel/CreateStaticDLL_variant1.o.d",
		"createstaticdll_variant1_dll/armv5.three/urel/createstaticdll_variant1_urel_objects.via",
		"createstaticdll_variant1_dll/armv5.three/urel/createstaticdll_variant1{000a0000}.def",
		"createstaticdll_variant1_dll/armv5.three/urel/createstaticdll_variant1{000a0000}.dso",
		
		"createstaticdll_variant2_dll/armv5.three/udeb/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5.three/udeb/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5.three/udeb/createstaticdll_variant2_udeb_objects.via",
		"createstaticdll_variant2_dll/armv5.three/udeb/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5.three/udeb/createstaticdll_variant2{000a0000}.dso",
		"createstaticdll_variant2_dll/armv5.three/urel/CreateStaticDLL_variant2.o",
		"createstaticdll_variant2_dll/armv5.three/urel/CreateStaticDLL_variant2.o.d",
		"createstaticdll_variant2_dll/armv5.three/urel/createstaticdll_variant2_urel_objects.via",
		"createstaticdll_variant2_dll/armv5.three/urel/createstaticdll_variant2{000a0000}.def",
		"createstaticdll_variant2_dll/armv5.three/urel/createstaticdll_variant2{000a0000}.dso",
		
		"createexe_variant3_exe/armv5.three/udeb/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5.three/udeb/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5.three/udeb/createexe_variant3_udeb_objects.via",
		"createexe_variant3_exe/armv5.three/urel/CreateEXE_variant3.o",
		"createexe_variant3_exe/armv5.three/urel/CreateEXE_variant3.o.d",
		"createexe_variant3_exe/armv5.three/urel/createexe_variant3_urel_objects.via"
		]
	
	variantBuildTargetsGeneric = [
		"dummy_var1_dll/dummy_var1_dummy.rsc.rpp",
		"dummy_var1_dll/dummy_var1_dummy.rsc.d",
		"dummy_var2_dll/dummy_var2_dummy.rsc.rpp",
		"dummy_var2_dll/dummy_var2_dummy.rsc.d",
		"dummy_var3_exe/dummy_var3_dummy.rsc.rpp",
		"dummy_var3_exe/dummy_var3_dummy.rsc.d"
		]
	
	bldinf = 'smoke_suite/test_resources/bv/bld.inf'
	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)
	
	t.description = """Build variant and invariant components.
		In this default mode of operation, all components build for the non-product armv5 config whereas
		only variant components build for the armv5.* bv configs."""
	t.name = "featurevariant_build"

	t.command = "{0} && cat $(EPOCROOT)/epoc32/build/{1}/{2}".format(sbscommand, BldInfFile.outputPathFragment(bldinf), "createstaticdll_variant1_dll/armv5.three/udeb/createstaticdll_variant1.vmap.cmdfile")
	t.targets = preBuiltTargets + invariantTargets + variantTargetsGeneric + variantTargetsDefaultTree + variantTargetsProductTrees							
	t.addbuildtargets(bldinf,
				invariantBuildTargets + variantBuildTargetsGeneric + variantBuildTargetsDefaultTree + variantBuildTargetsProductTrees	
				)
	
	# Test that static libs are linked from the invariant place.
	t.mustmatch = [
		"armlink.*epoc32/release/armv5/urel/bv_static_lib.lib",
		"armlink.*epoc32/release/armv5/udeb/bv_static_lib.lib",
		"\s*-s.*variant1/CreateStaticDLL_variant1.cpp",
		"\s*-s.*variant1/test_createvmap01.cpp",
		"\s*-s.*variant1/test_createvmap02.cpp",
		"\s*-s.*variant1/test_createvmap03.cpp",
		"\s*-s.*variant1/test_createvmap04.cpp",
		"\s*-s.*variant1/test_createvmap05.cpp",
		"\s*-s.*variant1/test_createvmap06.cpp",
		"\s*-s.*variant1/test_createvmap07.cpp",
		"\s*-s.*variant1/test_createvmap08.cpp",
		"\s*-s.*variant1/test_createvmap09.cpp",
		"\s*-s.*variant1/test_createvmap10.cpp",
		"\s*-s.*variant1/test_createvmap11.cpp",
		"\s*-s.*variant1/test_createvmap12.cpp",
		"\s*-s.*variant1/test_createvmap13.cpp",
		"\s*-s.*variant1/test_createvmap14.cpp",
		"\s*-s.*variant1/test_createvmap15.cpp",
		"\s*-s.*variant1/CreateStaticDLL_variant1.mmp"
		]
	t.run()


	
	t.description = """Build variant and invariant components using an os_properties.xml that sets FEATUREVARIANTSAFE=1.
		With FEATUREVARIANTSAFE only invariant components build for the non-product armv5 config and
		only variant components build for the armv5.* bv configs.""" 
	t.name = "featurevariant_build_featurevariantsafe"
	t.command = sbscommand + " --configpath=test/smoke_suite/test_resources/bv/config/properties"
	t.targets = preBuiltTargets + invariantTargets + variantTargetsGeneric + variantTargetsProductTrees
	t.addbuildtargets('smoke_suite/test_resources/bv/bld.inf',
				invariantBuildTargets + variantBuildTargetsGeneric + variantBuildTargetsProductTrees	
				)
	t.antitargets = variantTargetsDefaultTree
	t.addbuildantitargets('smoke_suite/test_resources/bv/bld.inf',
				variantBuildTargetsDefaultTree
				)
	# Test that static libs are linked from the invariant place.
	t.mustmatch = [
		"armlink.*epoc32/release/armv5/urel/bv_static_lib.lib",
		"armlink.*epoc32/release/armv5/udeb/bv_static_lib.lib"
		]
	t.run()
	
	
	t.description = """Check that the .vmap files appear in the WHAT output""" 
	t.name = "featurevariant_vmap_in_whatlog"
	t.command = sbscommand + " --what"
	t.targets = []
	t.antitargets = []
	# Each product produces a .vmap file per binary
	t.mustmatch = [
		"epoc32.release.armv5\.one.udeb.createstaticdll_variant1\.dll\.vmap",
		"epoc32.release.armv5\.one.udeb.createstaticdll_variant2\.dll\.vmap",
		"epoc32.release.armv5\.one.udeb.createexe_variant3\.exe\.vmap",

		"epoc32.release.armv5\.one.urel.createstaticdll_variant1\.dll\.vmap",
		"epoc32.release.armv5\.one.urel.createstaticdll_variant2\.dll\.vmap",
		"epoc32.release.armv5\.one.urel.createexe_variant3\.exe\.vmap",

		"epoc32.release.armv5\.two.udeb.createstaticdll_variant1\.dll\.vmap",
		"epoc32.release.armv5\.two.udeb.createstaticdll_variant2\.dll\.vmap",
		"epoc32.release.armv5\.two.udeb.createexe_variant3\.exe\.vmap",
		
		"epoc32.release.armv5\.two.urel.createstaticdll_variant1\.dll\.vmap",
		"epoc32.release.armv5\.two.urel.createstaticdll_variant2\.dll\.vmap",
		"epoc32.release.armv5\.two.urel.createexe_variant3\.exe\.vmap",

		"epoc32.release.armv5\.three.udeb.createstaticdll_variant1\.dll\.vmap",
		"epoc32.release.armv5\.three.udeb.createstaticdll_variant2\.dll\.vmap",
		"epoc32.release.armv5\.three.udeb.createexe_variant3\.exe\.vmap",
		
		"epoc32.release.armv5\.three.urel.createstaticdll_variant1\.dll\.vmap",
		"epoc32.release.armv5\.three.urel.createstaticdll_variant2\.dll\.vmap",
		"epoc32.release.armv5\.three.urel.createexe_variant3\.exe\.vmap",
		]
	t.run()


	# tests for the createvmap script
	createvmap = "python $(SBS_HOME)/bin/createvmap.py"
	vmapfile = "$(EPOCROOT)/epoc32/build/test.vmap"
	vmap = " -o " + vmapfile
	
	if 'SBS_BVCPP' in os.environ:
		bvcpp = " -c " + os.environ['SBS_BVCPP'].replace('\\','/')
	else:
		bvcpp = " -c $(SBS_HOME)/$(HOSTPLATFORM_DIR)/bv/bin/cpp"
		if t.onWindows:
			bvcpp += ".exe"

	bvdata = "$(SBS_HOME)/test/smoke_suite/test_resources/bv"
	
	preinc = " -p " + bvdata + "/var1/var1.h"
	listA = " -f " + bvdata + "/listA.txt"
	listB = " -f " + bvdata + "/listB.txt"
	listC = " -f " + bvdata + "/listC.txt"
	srcWith = " -s " + bvdata + "/with_macros.cpp"
	srcWithout = " -s " + bvdata + "/without_macros.cpp"
	badSrc = " -s " + bvdata + "/with_errors.cpp"

	t.name = "createvmap exits with an error"
	t.usebash = True
	t.command = createvmap
	t.returncode = 1
	t.targets = []
	t.mustmatch = []
	t.run()

	
	t.name = "createvmap shows cpp errors"
	t.usebash = True
	t.command = createvmap + vmap + bvcpp + preinc + listA + badSrc
	t.returncode = 1
	t.targets = []
	t.mustmatch = ["#error this code is broken"]
	t.run()
	
	
	t.name = "createvmap errors on missing feature list"
	t.usebash = True
	t.command = createvmap + vmap + bvcpp + preinc + listC + srcWith
	t.returncode = 1
	t.targets = []
	t.mustmatch = ["The feature list '.*listC.txt' does not exist"]
	t.run()
	
	
	t.name = "createvmap warns on featureless code"
	t.usebash = True
	t.command = createvmap + vmap + bvcpp + preinc + listA + srcWithout
	t.returncode = 0
	t.targets = [vmapfile]
	t.mustmatch = ["warning: No feature macros were found in the source"]
	t.run()
	
	
	t.name = "createvmap creates the right vmap file"
	t.usebash = True
	t.command = createvmap + vmap + bvcpp + preinc + listA + listB + srcWith + srcWithout + " && cat " + vmapfile
	t.returncode = 0
	t.targets = [vmapfile]
	t.mustmatch = ["A_1=defined", "B_1000=undefined"]
	t.run()


	# clean up test cpp files from the first test (do it noow after they are no longer needed)
	for tf in test_cpp_files:
		os.unlink(tf)
	
	
	# print the overall result
	t.name = "featurevariants"
	t.print_result()
	return t
def run():
	t = AntiTargetSmokeTest()
	t.description = "Testcases (ID 0101a - 0101d) test trace compiler"
	# General test for trace compiler, which generates
	# 1. trace headers like <source>Traces.h
	# 2. fixed_id.definitions
	# 3. dictionary files like <project name>_<UID>_Dictionary.xml
	# 4. trace definitions like <project name>_<UID>_TraceDefinitions.h
	t.id = "101a"
	t.name = "TC_general"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler"	
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
		"$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf', [
		"testTC_dll/armv5/udeb/wlanhwinit.o",
		"testTC_dll/armv5/udeb/wlanhwinit.o.d",
		"testTC_dll/armv5/udeb/wlanhwinitmain.o",
		"testTC_dll/armv5/udeb/wlanhwinitmain.o.d",
		"testTC_dll/armv5/udeb/wlanhwinitpermparser.o",
		"testTC_dll/armv5/udeb/wlanhwinitpermparser.o.d",
		"testTC_dll/armv5/udeb/testTC_udeb_objects.via",
		"testTC_dll/armv5/udeb/testTC{000a0000}.def",
		"testTC_dll/armv5/urel/wlanhwinit.o",
		"testTC_dll/armv5/urel/wlanhwinit.o.d",
		"testTC_dll/armv5/urel/wlanhwinitmain.o",
		"testTC_dll/armv5/urel/wlanhwinitmain.o.d",
		"testTC_dll/armv5/urel/wlanhwinitpermparser.o",
		"testTC_dll/armv5/urel/wlanhwinitpermparser.o.d",	
		"testTC_dll/armv5/urel/testTC_urel_objects.via",
		"testTC_dll/armv5/urel/testTC{000a0000}.def",
		"testTC_dll/tracecompile_testTC_dll_1000008d.done"
	])
	t.run()
	
	# General CLEAN test for trace compiler outputs
	t.id = "101b"
	t.name = "TC_general_CLEAN"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler CLEAN"
	t.targets = []	
	t.antitargets = [
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h"
		]
	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"testtc_dll/tracecompile_testTC_dll_1000008d.done"
	])
	t.run()
			
	t.id = "101c"
	t.name = "TC_bv_path"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf -c armv5.tracecompiler" 
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe.map",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions",
		"$(EPOCROOT)/epoc32/ost_dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h"
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf', [
		"HelloWorld_exe/armv5/udeb/HelloWorld.o",
		"HelloWorld_exe/armv5/udeb/HelloWorld.o.d",
		"HelloWorld_exe/armv5/udeb/HelloWorld_udeb_objects.via",
		"HelloWorld_exe/armv5/urel/HelloWorld.o",
		"HelloWorld_exe/armv5/urel/HelloWorld.o.d",
		"HelloWorld_exe/armv5/urel/HelloWorld_urel_objects.via",
		"HelloWorld_exe/tracecompile_HelloWorld_exe_e78a5aa3.done"
	])
	t.antitargets = []
	t.run()

	# 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source 
	# containing no osttraces.
	# Trace compiler only runs when there are osttraces code in source. Raptor decides this by
	# checking whether there is a "traces" or "traces_<prj_name>" folder in USERINCLUDE in a mmp file. 
	t.id = "101d"
	t.name = "TC_autorun1"
	# Run - USERINCLUDE ../traces_autorun1
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
			" -p autorun1.mmp"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o",
		"test_/tracecompile_test_exe_00000001.done"
	])
	t.antitargets = [] # Currently unnecessary, but helps the code be robust
	t.run()
	
	t.id = "101e"
	t.name = "TC_autorun2"
	# No run - USERINCLUDE ./tracesnotmatch
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
			" -p autorun2.mmp CLEAN " + \
			"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
			" -p autorun2.mmp"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o",
	])
	t.antitargets = [] # Currently unnecessary, but helps the code be robust
	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"test_/tracecompile_test_exe_00000001.done"
	])
	t.run()

	t.id = "101f"
	t.name = "TC_autorun3"
	# No run - no UID
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
			" -p autorun3.mmp CLEAN " + \
			"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
			" -p autorun3.mmp"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o",
	])
	t.antitargets = []
	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"test_/tracecompile_test_exe_00000001.done"
	])
	t.run()

	# Test trace compiler doesn't run when it is switched off
	# Trace compiler switch is off by default. To turn it on use variant ".tracecompiler". 
	t.id = "101g"
	t.name = "TC_switch_off"
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
			" -p autorun1.mmp CLEAN " + \
			"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5 -p autorun1.mmp"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		]
	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o"
	])
	t.antitargets = []
	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
		"test_/tracecompile_test_exe_00000001.done"
	])
	t.run()


	t.id = "101"
	t.name = "tracecompiler_general"
	t.print_result()
	return t