Beispiel #1
0
def run():
    t = AntiTargetSmokeTest()
    t.description = "Test the filter_exes filter"

    log = "< smoke_suite/test_resources/logexamples/filter_exes.log"

    t.usebash = True
    t.name = "filter_exes_all_exes"
    t.id = "999a"
    t.command = "sbs_filter --filter=filter_exes[] " + log + " -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && cat one_armv5_urel.txt"
    t.mustmatch = [
        "Wrote 1 file\(s\) into one_armv5_urel\.txt",
        "Wrote 1 file\(s\) into two_winscw_udeb\.txt", "^one\.exe$"
    ]
    t.targets = ["one_armv5_urel.txt", "two_winscw_udeb.txt"]
    t.antitargets = ["ignore_armv5_udeb.txt", "ignore_armv5_urel.txt"]
    t.run()

    t.name = "filter_exes_by_layer"
    t.id = "999b"
    t.usebash = False
    t.command = "sbs_filter --filter=filter_exes[layer=two] " + log
    t.mustmatch = ["Wrote 1 file\(s\) into two_winscw_udeb\.txt"]
    t.mustnotmatch = ["Wrote 1 file\(s\) into one_armv5_urel\.txt"]
    t.targets = ["two_winscw_udeb.txt"]
    t.antitargets = [
        "ignore_armv5_udeb.txt", "ignore_armv5_urel.txt", "one_armv5_urel.txt"
    ]
    t.run()

    t.name = "filter_exes_by_config"
    t.id = "999c"
    t.command = "sbs_filter --filter=filter_exes[config=armv5_urel] " + log
    t.mustmatch = ["Wrote 1 file\(s\) into one_armv5_urel\.txt"]
    t.mustnotmatch = ["Wrote 1 file\(s\) into two_winscw_udeb\.txt"]
    t.targets = ["one_armv5_urel.txt"]
    t.antitargets = [
        "ignore_armv5_udeb.txt", "ignore_armv5_urel.txt", "two_winscw_udeb.txt"
    ]
    t.run()

    t.clean()

    t.name = "filter_exes_specified_output"
    t.id = "999d"
    t.command = "sbs_filter --filter=filter_exes[output=$(EPOCROOT)/epoc32/build/filter_exes_test] " + log
    t.mustmatch = [
        "Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]one_armv5_urel\.txt",
        "Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]two_winscw_udeb\.txt"
    ]
    t.targets = [
        "$(EPOCROOT)/epoc32/build/filter_exes_test/one_armv5_urel.txt",
        "$(EPOCROOT)/epoc32/build/filter_exes_test/two_winscw_udeb.txt"
    ]
    t.run()

    t.id = "999"
    t.name = "filter_exes"
    return t
Beispiel #2
0
def run():
	t = AntiTargetSmokeTest()
	t.description = "Test the filter_exes filter"

	log = "< smoke_suite/test_resources/logexamples/filter_exes.log"

	t.usebash = True
	t.name = "filter_exes_all_exes"
	t.id = "999a"
	t.command = "sbs_filter --filter=filter_exes[] "+log+" -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && cat one_armv5_urel.txt"
	t.mustmatch = [ "Wrote 1 file\(s\) into one_armv5_urel\.txt",
		"Wrote 1 file\(s\) into two_winscw_udeb\.txt",
		"^one\.exe$" ]
	t.targets = [ "one_armv5_urel.txt",
		"two_winscw_udeb.txt" ]
	t.antitargets = [ "ignore_armv5_udeb.txt",
		"ignore_armv5_urel.txt" ]
	t.run()

	t.name = "filter_exes_by_layer"
	t.id = "999b"
	t.usebash = False
	t.command = "sbs_filter --filter=filter_exes[layer=two] "+log
	t.mustmatch = [ "Wrote 1 file\(s\) into two_winscw_udeb\.txt" ]
	t.mustnotmatch = [ "Wrote 1 file\(s\) into one_armv5_urel\.txt" ]
	t.targets = [ "two_winscw_udeb.txt" ]
	t.antitargets = [ "ignore_armv5_udeb.txt",
		"ignore_armv5_urel.txt",
		"one_armv5_urel.txt" ]
	t.run()

	t.name = "filter_exes_by_config"
	t.id = "999c"
	t.command = "sbs_filter --filter=filter_exes[config=armv5_urel] "+log
	t.mustmatch = [ "Wrote 1 file\(s\) into one_armv5_urel\.txt" ]
	t.mustnotmatch = [ "Wrote 1 file\(s\) into two_winscw_udeb\.txt" ]
	t.targets = [ "one_armv5_urel.txt" ]
	t.antitargets = [ "ignore_armv5_udeb.txt",
		"ignore_armv5_urel.txt",
		"two_winscw_udeb.txt" ]
	t.run()
	
	t.clean()

	t.name = "filter_exes_specified_output"
	t.id = "999d"
	t.command = "sbs_filter --filter=filter_exes[output=$(EPOCROOT)/epoc32/build/filter_exes_test] "+log
	t.mustmatch = [ "Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]one_armv5_urel\.txt",
		"Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]two_winscw_udeb\.txt" ]
	t.targets = [ "$(EPOCROOT)/epoc32/build/filter_exes_test/one_armv5_urel.txt",
		"$(EPOCROOT)/epoc32/build/filter_exes_test/two_winscw_udeb.txt"]
	t.run()

	t.id = "999"
	t.name = "filter_exes"
	return t
Beispiel #3
0
def run():
    t = AntiTargetSmokeTest()
    t.id = "19"
    t.name = "extension_reallyclean"
    t.description = "These 2 sets of tests are for testing REALLYCLEAN on TEM" \
      + " files"
    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf " \
      + "-c armv5_urel -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; ls " \
      + "$(EPOCROOT)/epoc32/build/tem_export_test; sbs -b " \
      + "smoke_suite/test_resources/simple_extension/bld.inf -c " \
      + "armv5_urel REALLYCLEAN -m ${SBSMAKEFILE}_2 -f ${SBSLOGFILE}_2"
    t.mustnotmatch = [
        "ls.*/epoc32/build/tem_export_test: No such file or directory"
    ]
    t.antitargets = [
        "$(EPOCROOT)/epoc32/build/tem_export_test",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.meta",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.mk",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.meta",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple_extension.txt"
    ]
    t.run()
    return t
def run():
	t = AntiTargetSmokeTest()
	t.id = "19"
	t.name = "extension_reallyclean"
	t.description = "These 2 sets of tests are for testing REALLYCLEAN on TEM" \
			+ " files"
	t.usebash = True
	t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf " \
			+ "-c armv5_urel -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; ls " \
			+ "$(EPOCROOT)/epoc32/build/tem_export_test; sbs -b " \
			+ "smoke_suite/test_resources/simple_extension/bld.inf -c " \
			+ "armv5_urel REALLYCLEAN -m ${SBSMAKEFILE}_2 -f ${SBSLOGFILE}_2"
	t.mustnotmatch = [
		"ls.*/epoc32/build/tem_export_test: No such file or directory"
	]
	t.antitargets = [
		"$(EPOCROOT)/epoc32/build/tem_export_test",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.meta",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.mk",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.meta",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple_extension.txt"
	]
	t.run()
	return t
Beispiel #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():
	t = AntiTargetSmokeTest()
	t.usebash = True

	t.name = "plugin_armv5_winscw_freeze"
	t.description = """Builds several ECOM plugins, with and without explicit DEFFILE statements, confirming
		the correct FREEZE behaviour in each case.  The correct behaviour for a PLUGIN/PLUGIN3 is
		indicative of all TARGETTYPEs where the build system defines known exports: FREEZE should do nothing
		unless an explicit DEFFILE statement is present in the .mmp file.
		Also confirms:
		i) default UID2 settings for PLUGIN3 TARGETTYPEs and default resource generation locations
		   for both PLUGIN and PLUGIN3
		ii) non-generation of an import library where EXPORTUNFROZEN is used without a DEFFILE statement"""
	
	t.command = """
		sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel CLEAN > /dev/null &&
		sbs -f- -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel &&
		sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel FREEZE -m ${SBSMAKEFILE} -f ${SBSLOGFILE}"""

	t.targets = [
		"smoke_suite/test_resources/simple_plugin/bwins/plugin2u.def",
		"smoke_suite/test_resources/simple_plugin/eabi/plugin2u.def",
		"$(EPOCROOT)/epoc32/data/z/resource/plugins/plugin.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/plugins/plugin.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/plugins/plugin.rsc",
		"$(EPOCROOT)/epoc32/data/z/resource/plugins/plugin3.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/plugins/plugin3.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/plugins/plugin3.rsc"	
		]
	
	t.antitargets = [
		"smoke_suite/test_resources/simple_plugin/bwins/pluginu.def",
		"smoke_suite/test_resources/simple_plugin/eabi/pluginu.def",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/plugin4.lib",
		"$(EPOCROOT)/epoc32/release/armv5/lib/plugin4.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/plugin4{000a0000}.dso"
		]
	
	t.mustmatch = [
		".*EFREEZE: Appending 3 New Export\(s\) to .*/test/smoke_suite/test_resources/simple_plugin/eabi/plugin2u.def.*",
		".*EFREEZE: Appending 1 New Export\(s\) to .*/test/smoke_suite/test_resources/simple_plugin/bwins/plugin2u.def.*",
		".*__EMULATOR_IMAGE_HEADER2\(0x10000079,0x10009D93,0x00000000.*",
		".*elf2e32.*--targettype=PLUGIN3.*--output=.*plugin3.dll.*--uid2=0x10009D93.*"
		
		]

	t.mustnotmatch = [
		".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/eabi/pluginu.def.*",
		".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/bwins/pluginu.def.*"
		]
	
	t.warnings = 4	
	t.run()
	return t
Beispiel #7
0
def run():
    t = AntiTargetSmokeTest()
    t.usebash = True

    t.name = "plugin_armv5_winscw_freeze"
    t.description = """Builds several ECOM plugins, with and without explicit DEFFILE statements, confirming
		the correct FREEZE behaviour in each case.  The correct behaviour for a PLUGIN/PLUGIN3 is
		indicative of all TARGETTYPEs where the build system defines known exports: FREEZE should do nothing
		unless an explicit DEFFILE statement is present in the .mmp file.
		Also confirms:
		i) default UID2 settings for PLUGIN3 TARGETTYPEs and default resource generation locations
		   for both PLUGIN and PLUGIN3
		ii) non-generation of an import library where EXPORTUNFROZEN is used without a DEFFILE statement"""

    t.command = """
		sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel CLEAN > /dev/null &&
		sbs -f- -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel &&
		sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel FREEZE -m ${SBSMAKEFILE} -f ${SBSLOGFILE}"""

    t.targets = [
        "smoke_suite/test_resources/simple_plugin/bwins/plugin2u.def",
        "smoke_suite/test_resources/simple_plugin/eabi/plugin2u.def",
        "$(EPOCROOT)/epoc32/data/z/resource/plugins/plugin.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/plugins/plugin.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/plugins/plugin.rsc",
        "$(EPOCROOT)/epoc32/data/z/resource/plugins/plugin3.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/plugins/plugin3.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/plugins/plugin3.rsc"
    ]

    t.antitargets = [
        "smoke_suite/test_resources/simple_plugin/bwins/pluginu.def",
        "smoke_suite/test_resources/simple_plugin/eabi/pluginu.def",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/plugin4.lib",
        "$(EPOCROOT)/epoc32/release/armv5/lib/plugin4.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/plugin4{000a0000}.dso"
    ]

    t.mustmatch = [
        ".*EFREEZE: Appending 3 New Export\(s\) to .*/test/smoke_suite/test_resources/simple_plugin/eabi/plugin2u.def.*",
        ".*EFREEZE: Appending 1 New Export\(s\) to .*/test/smoke_suite/test_resources/simple_plugin/bwins/plugin2u.def.*",
        ".*__EMULATOR_IMAGE_HEADER2\(0x10000079,0x10009D93,0x00000000.*",
        ".*elf2e32.*--targettype=PLUGIN3.*--output=.*plugin3.dll.*--uid2=0x10009D93.*"
    ]

    t.mustnotmatch = [
        ".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/eabi/pluginu.def.*",
        ".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/bwins/pluginu.def.*"
    ]

    t.warnings = 4
    t.run()
    return t
Beispiel #8
0
def run():
    premarkerfile = sanitise(
        ReplaceEnvs(
            "$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip"
        ))
    markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped"

    t = AntiTargetSmokeTest()

    # Check basic export success
    t.name = "zip_export"
    t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf"
    t.targets = [
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
        "$(EPOCROOT)/epoc32/build/" + markerfile
    ]
    t.run()

    # Confirm executable permissions are retained on Linux
    t.name = "zip_export_execute_permissions"
    t.usebash = True
    t.targets = [
    ]  # prevent auto clean-up up of target files from previous test
    t.command = "ls -l $(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin"
    t.mustmatch = ["-[rw-]{2}x[rw-]{2}x[rw-]{2}x"]
    t.run("linux")

    # Confirm reallyclean deletes all exports, including those that were read-only
    # as source (and so should now be removable at their destination)
    t.name = "zip_export_reallyclean"
    t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf reallyclean"
    t.mustmatch = []
    t.antitargets = [
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
        "$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
        "$(EPOCROOT)/epoc32/build/" + markerfile
    ]
    t.run()

    t.name = "zip_export_plus_clean"
    t.print_result()
    return t
def run():
	premarkerfile = sanitise(ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip"))
	markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped"
	
	t = AntiTargetSmokeTest()

	# Check basic export success	
	t.name = "zip_export"
	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf"
	t.targets = [
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
		"$(EPOCROOT)/epoc32/build/" + markerfile
	]
	t.run()

	# Confirm executable permissions are retained on Linux	
	t.name = "zip_export_execute_permissions"
	t.usebash = True
	t.targets = [] # prevent auto clean-up up of target files from previous test
	t.command = "ls -l $(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin"
	t.mustmatch = ["-[rw-]{2}x[rw-]{2}x[rw-]{2}x"]
	t.run("linux")

	# Confirm reallyclean deletes all exports, including those that were read-only
	# as source (and so should now be removable at their destination)	
	t.name = "zip_export_reallyclean"
	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf reallyclean"
	t.mustmatch = []
	t.antitargets = [
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
		"$(EPOCROOT)/epoc32/build/" + markerfile
	]
	t.run()
	
	t.name = "zip_export_plus_clean"
	t.print_result()
	return t
Beispiel #10
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
Beispiel #11
0
def run():
	t = AntiTargetSmokeTest()
	t.usebash = True

	# Unordered layer logging tests
	unorderedcommand = 'sbs -f- -s smoke_suite/test_resources/sysdef/system_definition_simple.xml'
	unorderedtargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple1.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple2.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple4.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe.map"
		]

	unorderedbuildtargets = [
		"{COMPONENT}_/armv5/udeb/simple.o",
		"{COMPONENT}_/armv5/urel/simple.o",
		"{COMPONENT}_/winscw/udeb/simple.o",
		"{COMPONENT}_/winscw/udeb/{COMPONENT}_UID_.o",
		"{COMPONENT}_/winscw/udeb/{COMPONENT}.UID.CPP",
		"{COMPONENT}_/winscw/urel/simple.o",
		"{COMPONENT}_/winscw/urel/{COMPONENT}_UID_.o",
		"{COMPONENT}_/winscw/urel/{COMPONENT}.UID.CPP"
		]

	t.name = "sysdef_layers"
	t.description = "Test system definition building and layer logging"
	t.command = unorderedcommand
	t.targets = unorderedtargets
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple1/bld.inf',
	  [x.format(COMPONENT="simple1") for x in unorderedbuildtargets])
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple2/bld.inf',
	  [x.format(COMPONENT="simple2") for x in unorderedbuildtargets])
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple3/bld.inf',
	  [x.format(COMPONENT="simple3") for x in unorderedbuildtargets])
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple4/bld.inf',
	  [x.format(COMPONENT="simple4") for x in unorderedbuildtargets])
	t.countmatch = [
		["<recipe .*layer='layer1' .*>", 24],
		["<recipe .*layer='layer2' .*>", 24]
		]
	t.run()

	# System definition layer test with PP on
	t.name = "sysdef_layers_pp"
	t.description = "Test system definition layer building and logging with parallel processing on"
	t.command = unorderedcommand + " --pp on"
	t.countmatch = [
		["<recipe .*layer='layer1' .*>", 24],
		["<recipe .*layer='layer2' .*>", 24]
		]
	t.run()

	# Ordered layer building and logging tests
	orderedcommand = 'sbs -f- -s smoke_suite/test_resources/sysdef/system_definition_order_layer_test.xml ' + \
			'-l "Metadata Export" -l "Build Generated Source" -l "Component with Layer Dependencies" -o'

	t.name = "sysdef_layers_ordered"
	t.description = "Test system definition ordered layer building and logging"
	t.command = orderedcommand
	t.targets = [
		"$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.inf",
		"$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.mmh",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
		"$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/HelloWorld_reg.rsc",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/HelloWorld.rsc",
		"$(EPOCROOT)/epoc32/include/HelloWorld.rsg",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/HelloWorld_reg.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/HelloWorld.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
		"$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/HelloWorld_reg.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/HelloWorld.rsc",
		]
	t.addbuildtargets('smoke_suite/test_resources/sysdef/build_gen_source/bld.inf', [
		"HelloWorld_/HelloWorld_HelloWorld.rsc.rpp",
		"HelloWorld_/HelloWorld_HelloWorld.rsc",
		"HelloWorld_/HelloWorld_HelloWorld.rsc.d"
		])
	t.addbuildtargets('smoke_suite/test_resources/sysdef/dependent/bld.inf', [
		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
		"helloworld_exe/armv5/udeb/HelloWorld_AppView.o",
		"helloworld_exe/armv5/udeb/HelloWorld_Document.o",
		"helloworld_exe/armv5/udeb/HelloWorld_Main.o",
		"helloworld_exe/armv5/urel/HelloWorld_Application.o",
		"helloworld_exe/armv5/urel/HelloWorld_AppUi.o",
		"helloworld_exe/armv5/urel/HelloWorld_AppView.o",
		"helloworld_exe/armv5/urel/HelloWorld_Document.o",
		"helloworld_exe/armv5/urel/HelloWorld_Main.o",
		"helloworld_exe/winscw/udeb/HelloWorld_Application.o",
		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.o",
		"helloworld_exe/winscw/udeb/HelloWorld_AppView.o",
		"helloworld_exe/winscw/udeb/HelloWorld_Document.o",
		"helloworld_exe/winscw/udeb/HelloWorld_Main.o",
		"helloworld_exe/winscw/udeb/helloworld.UID.CPP",
		"helloworld_exe/winscw/udeb/helloworld_UID_.o",
		"helloworld_exe/winscw/urel/HelloWorld_Application.o",
		"helloworld_exe/winscw/urel/HelloWorld_AppUi.o",
		"helloworld_exe/winscw/urel/HelloWorld_AppView.o",
		"helloworld_exe/winscw/urel/HelloWorld_Document.o",
		"helloworld_exe/winscw/urel/HelloWorld_Main.o",
		"helloworld_exe/winscw/urel/helloworld.UID.CPP",
		"helloworld_exe/winscw/urel/helloworld_UID_.o",
		"HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.rpp",
		"HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.d"
		])
	t.countmatch = [
		["<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>", 33],
		["<recipe .*layer='Build Generated Source' component='build generated source'.*>", 3]		
		]
	t.run()

	t.name = "sysdef_layers_ordered_pp"
	t.description = "Test system definition ordered layer building and logging with parallel processing on"
	t.command = orderedcommand + " --pp on"
	t.run()

	# package definition building and logging tests
	packagecommand = 'sbs -f- -s smoke_suite/test_resources/sysdef/package_definition.xml'
	packagetargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple1.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple2.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/simple4.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe.map"
		]

	t.name = "sysdef_layers_pkgdef"
	t.description = "Test package definition building and layer logging"
	t.command = packagecommand
	t.targets = packagetargets
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple1/bld.inf',
	  [x.format(COMPONENT="simple1") for x in unorderedbuildtargets])
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple2/bld.inf',
	  [x.format(COMPONENT="simple2") for x in unorderedbuildtargets])
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple3/bld.inf',
	  [x.format(COMPONENT="simple3") for x in unorderedbuildtargets])
	t.addbuildtargets('smoke_suite/test_resources/sysdef/simple/simple4/bld.inf',
	  [x.format(COMPONENT="simple4") for x in unorderedbuildtargets])
	t.countmatch = [
		["<recipe .*layer='package1' .*>", 24],
		["<recipe .*layer='package2' .*>", 24]
		]
	t.run()

	t.name = "sysdef_layers_pkgdef_pp"
	t.description = "Test package definition building and layer logging with parallel processing on"
	t.command = packagecommand + " --pp on"
	t.run()

	t.id = "48"
	t.name = "sysdef_layers"
	return t
Beispiel #12
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
Beispiel #13
0
def run():
	
	# This .inf file is created for clean_simple_export and
	# reallyclean_simple_export tests to use so that we can put the
	# username into the output filenames - which helps a lot when
	# several people run tests on the same computer (e.g. linux machines)
	bld_inf = open('smoke_suite/test_resources/simple_export/expbld.inf', 'w')
	user = os.environ['USER']
	bld_inf.write("""
	
PRJ_PLATFORMS
ARMV5 WINSCW

PRJ_MMPFILES
simple.mmp

PRJ_EXPORTS
#if !defined( WINSCW )
// Exports conditional on build configuration macros aren't actually supported,
// but we confirm that we preprocess in the context of an armv5 build when both
// winscw and armv5 configurations are (implicitly, as there's no "-c" argument)
// used.  This is in order to work around assumptions currently made in the
// source base.
simple_exp1.h exported_1.h
#endif
simple_exp2.h exported_2.h
simple_exp3.h exported_3.h
executable_file executable_file
"file with a space.doc" "exportedfilewithspacesremoved.doc"
"file with a space.doc" "exported file with a space.doc"

simple_exp1.h /tmp/{username}/  //
simple_exp2.h \\tmp\\{username}/  //
simple_exp3.h /tmp/{username}/simple_exp3.h 
simple_exp4.h //
read_only.h was_read_only.h //

// Extended format exports: support for filename wildcards and whole directory copying
:xexport xexport/dir1                                           xexport1
:xexport[invalid_arg=cobblers] xexport/dir1/dir2                +/xexport2
:xexport[recursive=true] xexport/dir1/dir2                      xexport3
:xexport[match="*1dir?.txt"] xexport/dir1/dir2                  +/xexport4
:xexport[match="*1dir?.txt" recursive=true] xexport/dir1/dir2   xexport5/subdir

""".format(username=user))
	bld_inf.close()
	
	exported_files = [
		"$(EPOCROOT)/epoc32/include/exported_1.h",
		"$(EPOCROOT)/epoc32/include/exported_2.h",
		"$(EPOCROOT)/epoc32/include/exported_3.h",
		"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc",
		"$(EPOCROOT)/epoc32/include/exported file with a space.doc",
		"/tmp/$(USER)/simple_exp1.h",
		"/tmp/$(USER)/simple_exp2.h",
		"/tmp/$(USER)/simple_exp3.h",
		"$(EPOCROOT)/epoc32/include/executable_file",
		"$(EPOCROOT)/epoc32/include/simple_exp4.h",
		"$(EPOCROOT)/epoc32/include/was_read_only.h",
		"$(EPOCROOT)/epoc32/include/xexport1/file1dir1.txt",
		"$(EPOCROOT)/epoc32/include/xexport1/file2dir1.txt",
		"$(EPOCROOT)/epoc32/xexport2/file1dir2.txt",
		"$(EPOCROOT)/epoc32/xexport2/file2dir2.txt",
		"$(EPOCROOT)/epoc32/include/xexport3/file1dir2.txt",
		"$(EPOCROOT)/epoc32/include/xexport3/file2dir2.txt",
		"$(EPOCROOT)/epoc32/include/xexport3/dir3/file1dir3.txt",
		"$(EPOCROOT)/epoc32/include/xexport3/dir3/file2dir3.txt",
		"$(EPOCROOT)/epoc32/xexport4/file1dir2.txt",
		"$(EPOCROOT)/epoc32/include/xexport5/subdir/file1dir2.txt",
		"$(EPOCROOT)/epoc32/include/xexport5/subdir/dir3/file1dir3.txt"
		]
	
	warning_match = ".*warning: Unrecognised ':xexport' argument 'invalid_arg=cobblers' ignored.*"

	t = AntiTargetSmokeTest()
	
	# Check basic export success
	t.name = "export_basic"
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf export"
	t.targets = exported_files
	t.antitargets = []
	t.mustmatch_singleline = [warning_match]
	t.warnings = 1
	t.run()
	
	# Confirm executable permissions are retained on Linux
	t.name = "export_executable_permissions"
	t.usebash = True
	t.command = "ls -l ${EPOCROOT}/epoc32/include/executable_file"
	t.mustmatch = [ "^.rwxrwxr.x[\.\+]? .*executable_file.*$" ]
	t.targets = [] # prevent auto clean-up up of target files from previous test
	t.antitargets = []
	t.mustmatch_singleline = []
	t.warnings = 0
	t.run("linux")

	# Check clean does not delete exports
	t.name = "export_clean"
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf clean"
	t.mustmatch = []
	t.targets = exported_files
	t.antitargets = []
	t.mustmatch_singleline = [warning_match]
	t.warnings = 1
	t.run()

	# Confirm reallyclean deletes all exports, including those that were read-only
	# as source (and so should now be removable at their destination)
	t.name = "export_reallyclean" 
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf reallyclean"
	t.targets = []
	t.antitargets = exported_files
	t.mustmatch_singleline = [warning_match]
	t.warnings = 1
	t.run()

	# Check --noexport suppresses exports
	t.name = "export_noexport" 
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf --noexport -n"
	t.targets = []
	t.antitargets = exported_files
	t.mustmatch_singleline = []
	t.warnings = 0
	t.run()
	
	# Clean all exports in a bld.inf with resources
	t.name = "component_with_resource_reallyclean" 
	t.command = "sbs -b smoke_suite/test_resources/resource/group/simple.inf reallyclean"
	t.targets = []
	t.antitargets = []
	t.mustmatch_singleline = []
	t.warnings = 0
	t.run()

	# Ensure that sbs EXPORT does not generate errors
	t.name = "export_generates_no_errors" 
	t.command = "sbs -b smoke_suite/test_resources/resource/group/simple.inf EXPORT"
	t.targets = [ "$(EPOCROOT)/epoc32/include/testresource_badef.rh",
				  "$(EPOCROOT)/epoc32/include/testresource.hrh"]
	t.antitargets = []
	t.errors = 0
	t.warnings = 0
	t.run()
	
	t.name = "export"
	t.print_result()
	return t
Beispiel #14
0
def run():
    t = AntiTargetSmokeTest()
    t.usebash = True

    genericTargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/dependency.exe",
        "$(EPOCROOT)/epoc32/include/dependency.rsg",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/dependency.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/dependency.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/dependency.rsc",
        "$(EPOCROOT)/epoc32/include/main.rsg",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/main.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/main.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/main.rsc"
    ]
    windowsTargets = [
        "$(EPOCROOT)/epoc32/release/tools2/rel/dependency.exe",
        "$(EPOCROOT)/epoc32/tools/dependency.exe"
    ]
    linuxTargets = [
        "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM32_DIR)/rel/dependency",
        "$(EPOCROOT)/epoc32/tools/dependency"
    ]

    # Set general host platform specifics from first test run, but assume Windows initially
    hostPlatform = "windows"
    hostPlatformTargets = genericTargets + windowsTargets
    hostPlatformOffset = ""

    t.name = "baseline_build"
    t.description = "Build a component with source and resource files that are dependent on header files exported in the build"
    t.command = """
		cp smoke_suite/test_resources/dependencies/src/dependency1.cpp smoke_suite/test_resources/dependencies/dependency.cpp
		cp smoke_suite/test_resources/dependencies/src/dependency1.rss smoke_suite/test_resources/dependencies/dependency.rss
		sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
    t.mustnotmatch = ["<warning>Missing dependency detected: .*</warning>"]
    t.targets = hostPlatformTargets
    t.run(hostPlatform)
    if t.result == AntiTargetSmokeTest.SKIP:
        hostPlatform = "linux"
        hostPlatformTargets = genericTargets + linuxTargets
        hostPlatformOffset = "$(HOSTPLATFORM32_DIR)/"
        t.targets = hostPlatformTargets
        t.run(hostPlatform)

    # Ensure we don't clean up from the previous build in the following two tests
    t.targets = []

    # Core expected outcome for the following two tests
    t.mustmatch = [
        ".*recipe name='compile' target='.*dependency\.o'",
        ".*recipe name='win32compile2object' target='.*dependency\.o'",
        ".*recipe name='compile2object' target='.*dependency\.o'",
        ".*recipe name='resourcecompile' target='.*dependency\.rsc'"
    ]
    t.countmatch = [[".*recipe name='compile'", 2],
                    [".*recipe name='win32compile2object'", 2],
                    [".*recipe name='compile2object'", 1],
                    [".*recipe name='resourcecompile", 2]]

    t.name = "touched_header_dependencies"
    t.description = "Touch the exported header files and check that only the related source and resource files are re-built"
    t.command = """
		sleep 1
		touch $(EPOCROOT)/epoc32/include/dependency.h
		touch $(EPOCROOT)/epoc32/include/dependency.rh
		sbs -f- -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
    t.run()

    t.name = "redundant_header_dependencies"
    t.description = """
		Build the component again, but manipulate it so that (a) it no longer has a dependency on the exported header files and
		(b) the header files have been removed and (c) the header files are no longer exported.  Check that only the related source
		and resource files are re-built"""
    t.command = """
		cp smoke_suite/test_resources/dependencies/src/dependency2.cpp smoke_suite/test_resources/dependencies/dependency.cpp
		cp smoke_suite/test_resources/dependencies/src/dependency2.rss smoke_suite/test_resources/dependencies/dependency.rss
		rm -rf $(EPOCROOT)/epoc32/include/dependency.h
		rm -rf $(EPOCROOT)/epoc32/include/dependency.rh
		sbs -f- --noexport -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
    t.mustnotmatch = []
    # Note that the resource build does not exhibit a missing dependency as its dependency files are generated in a separate stage where
    # the target file isn't actually a target of that stage
    t.mustmatch.extend([
        "<warning>Missing dependency detected: .*/epoc32/include/dependency.h</warning>"
    ])
    t.warnings = 1
    t.run()

    t.name = "invalid_dependency_files"
    t.description = "Invalidate dependency files, then make sure we can clean and re-build successfully"
    buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment(
        'smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
    # use one long bash command so that we can capture
    # the output in a way that isn't messed up with all the ordering confused.
    t.command = " echo \"making directory for logfile ${{SBSLOGFILE}}\" ; mkdir -p `dirname ${{SBSLOGFILE}} 2>/dev/null` ; {{ sleep 1 ; set -x ; \
touch smoke_suite/test_resources/dependencies/dependency.cpp; \
echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> {0}/armv5/urel/dependency.o.d ; \
echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> {0}/winscw/urel/dependency.o.d ;\
echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> {0}/dependency_exe/tools2/rel/{1}/dependency.o.d ;\
echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> {0}/dependency__resource_apps.rsc.d ;\
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ;\
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel clean ;\
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ; }} > ${{SBSLOGFILE}} 2>&1; grep 'missing separator' ${{SBSLOGFILE}} ".format(
        buildLocation, hostPlatformOffset)
    # We expect an error from the first build due to the deliberate dependency file corruption
    t.mustmatch = [".*dependency.o.d:[0-9]+: \*\*\* missing separator"]
    t.countmatch = []
    t.warnings = 0
    t.errors = 0
    t.targets = hostPlatformTargets
    t.run(hostPlatform)

    t.name = "no_depend_include"
    t.description = "Invalidate dependency files in order to confirm they aren't processed when --no-depend-include is used"
    buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment(
        'smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
    t.command = """
		sleep 1
		touch smoke_suite/test_resources/dependencies/dependency.cpp
		echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """ + buildLocation + """/armv5/urel/dependency.o.d
		echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """ + buildLocation + """/winscw/urel/dependency.o.d
		echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """ + buildLocation + """/dependency_exe/tools2/rel/""" + hostPlatformOffset + """dependency.o.d
		sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
    t.mustmatch = []
    t.errors = 0
    t.targets = hostPlatformTargets
    t.run(hostPlatform)

    t.name = "no_depend_generate"
    t.description = "Invalidate and remove dependency files in order to confirm they are neither included nor re-generated when --no-depend-generate is used"
    buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment(
        'smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
    t.command = """
		sleep 1
		touch smoke_suite/test_resources/dependencies/dependency.cpp
		touch smoke_suite/test_resources/dependencies/main.cpp
		echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """ + buildLocation + """/armv5/urel/dependency.o.d
		echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """ + buildLocation + """/winscw/urel/dependency.o.d
		echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """ + buildLocation + """/dependency_exe/tools2/rel/""" + hostPlatformOffset + """dependency.o.d
		sbs --no-depend-generate -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
    t.antitargets = [
        buildLocation + "/armv5/urel/main.o.d",
        buildLocation + "/armv5/udeb/main.o.d",
        buildLocation + "/winscw/urel/main.o.d",
        buildLocation + "/winscw/udeb/main.o.d", buildLocation +
        "/dependency_exe/tools2/rel/" + hostPlatformOffset + "main.o.d"
    ]
    t.targets = hostPlatformTargets
    t.run(hostPlatform)

    # clean-up
    os.remove("smoke_suite/test_resources/dependencies/dependency.cpp")
    os.remove("smoke_suite/test_resources/dependencies/dependency.rss")

    t.name = "dependencies"
    t.print_result()
    return t
Beispiel #15
0
def run():
	t = AntiTargetSmokeTest()
	t.usebash = True
	
	genericTargets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/dependency.exe",
		"$(EPOCROOT)/epoc32/include/dependency.rsg",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/dependency.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/dependency.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/dependency.rsc",
		"$(EPOCROOT)/epoc32/include/main.rsg",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/main.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/main.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/main.rsc"
		]
	windowsTargets = [
		"$(EPOCROOT)/epoc32/release/tools2/rel/dependency.exe",
		"$(EPOCROOT)/epoc32/tools/dependency.exe"
	]
	linuxTargets = [
		"$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM32_DIR)/rel/dependency",
		"$(EPOCROOT)/epoc32/tools/dependency"
	]

	# Set general host platform specifics from first test run, but assume Windows initially
	hostPlatform = "windows"
	hostPlatformTargets = genericTargets + windowsTargets
	hostPlatformOffset = ""

	t.name = "baseline_build"
	t.description = "Build a component with source and resource files that are dependent on header files exported in the build"
	t.command = """
		cp smoke_suite/test_resources/dependencies/src/dependency1.cpp smoke_suite/test_resources/dependencies/dependency.cpp
		cp smoke_suite/test_resources/dependencies/src/dependency1.rss smoke_suite/test_resources/dependencies/dependency.rss
		sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""		
	t.mustnotmatch = [
		"<warning>Missing dependency detected: .*</warning>"
	]
	t.targets = hostPlatformTargets
	t.run(hostPlatform)
	if t.result == AntiTargetSmokeTest.SKIP:
		hostPlatform = "linux"
		hostPlatformTargets = genericTargets + linuxTargets
		hostPlatformOffset = "$(HOSTPLATFORM32_DIR)/"
		t.targets = hostPlatformTargets
		t.run(hostPlatform)
	
	# Ensure we don't clean up from the previous build in the following two tests
	t.targets = []
	
	# Core expected outcome for the following two tests
	t.mustmatch = [
		".*recipe name='compile' target='.*dependency\.o'",
		".*recipe name='win32compile2object' target='.*dependency\.o'",
		".*recipe name='compile2object' target='.*dependency\.o'",
		".*recipe name='resourcecompile' target='.*dependency\.rsc'"
	]
	t.countmatch = [
		[".*recipe name='compile'", 2],
		[".*recipe name='win32compile2object'", 2],
		[".*recipe name='compile2object'", 1],
		[".*recipe name='resourcecompile", 2]
	]

	
	t.name ="touched_header_dependencies"
	t.description = "Touch the exported header files and check that only the related source and resource files are re-built"
	t.command = """
		sleep 1
		touch $(EPOCROOT)/epoc32/include/dependency.h
		touch $(EPOCROOT)/epoc32/include/dependency.rh
		sbs -f- -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
	t.run()

	
	t.name ="redundant_header_dependencies"
	t.description = """
		Build the component again, but manipulate it so that (a) it no longer has a dependency on the exported header files and
		(b) the header files have been removed and (c) the header files are no longer exported.  Check that only the related source
		and resource files are re-built"""
	t.command = """
		cp smoke_suite/test_resources/dependencies/src/dependency2.cpp smoke_suite/test_resources/dependencies/dependency.cpp
		cp smoke_suite/test_resources/dependencies/src/dependency2.rss smoke_suite/test_resources/dependencies/dependency.rss
		rm -rf $(EPOCROOT)/epoc32/include/dependency.h
		rm -rf $(EPOCROOT)/epoc32/include/dependency.rh
		sbs -f- --noexport -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
	t.mustnotmatch = []
	# Note that the resource build does not exhibit a missing dependency as its dependency files are generated in a separate stage where
	# the target file isn't actually a target of that stage
	t.mustmatch.extend([
		"<warning>Missing dependency detected: .*/epoc32/include/dependency.h</warning>"
		])
	t.warnings = 1
	t.run()
	

	t.name ="invalid_dependency_files"
	t.description = "Invalidate dependency files, then make sure we can clean and re-build successfully"
	buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
        # use one long bash command so that we can capture 
	# the output in a way that isn't messed up with all the ordering confused.
	t.command = " echo \"making directory for logfile ${{SBSLOGFILE}}\" ; mkdir -p `dirname ${{SBSLOGFILE}} 2>/dev/null` ; {{ sleep 1 ; set -x ; \
touch smoke_suite/test_resources/dependencies/dependency.cpp; \
echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> {0}/armv5/urel/dependency.o.d ; \
echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> {0}/winscw/urel/dependency.o.d ;\
echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> {0}/dependency_exe/tools2/rel/{1}/dependency.o.d ;\
echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> {0}/dependency__resource_apps.rsc.d ;\
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ;\
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel clean ;\
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ; }} > ${{SBSLOGFILE}} 2>&1; grep 'missing separator' ${{SBSLOGFILE}} ".format(buildLocation, hostPlatformOffset)
	# We expect an error from the first build due to the deliberate dependency file corruption
	t.mustmatch = [
		".*dependency.o.d:[0-9]+: \*\*\* missing separator"
		]
	t.countmatch = []
	t.warnings = 0
	t.errors = 0 
	t.targets = hostPlatformTargets
	t.run(hostPlatform)


	t.name ="no_depend_include"
	t.description = "Invalidate dependency files in order to confirm they aren't processed when --no-depend-include is used"
	buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
	t.command = """
		sleep 1
		touch smoke_suite/test_resources/dependencies/dependency.cpp
		echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d
		echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d
		echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d
		sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
	t.mustmatch = []
	t.errors = 0		
	t.targets = hostPlatformTargets
	t.run(hostPlatform)


	t.name ="no_depend_generate"
	t.description = "Invalidate and remove dependency files in order to confirm they are neither included nor re-generated when --no-depend-generate is used"
	buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
	t.command = """
		sleep 1
		touch smoke_suite/test_resources/dependencies/dependency.cpp
		touch smoke_suite/test_resources/dependencies/main.cpp
		echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d
		echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d
		echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d
		sbs --no-depend-generate -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
	t.antitargets = [
		buildLocation+"/armv5/urel/main.o.d",
		buildLocation+"/armv5/udeb/main.o.d",
		buildLocation+"/winscw/urel/main.o.d",
		buildLocation+"/winscw/udeb/main.o.d",
		buildLocation+"/dependency_exe/tools2/rel/"+hostPlatformOffset+"main.o.d"
		]
	t.targets = hostPlatformTargets
	t.run(hostPlatform)
	
	# clean-up
	os.remove("smoke_suite/test_resources/dependencies/dependency.cpp")
	os.remove("smoke_suite/test_resources/dependencies/dependency.rss")

	t.name = "dependencies"
	t.print_result()
	return t
Beispiel #16
0
def run():
	
	# This .inf file is created for clean_simple_export and
	# reallyclean_simple_export tests to use so that we can put the
	# username into the output filenames - which helps a lot when
	# several people run tests on the same computer (e.g. linux machines)
	bld_inf = open('smoke_suite/test_resources/simple_export/expbld.inf', 'w')
	user = os.environ['USER']
	bld_inf.write("""
	
PRJ_PLATFORMS
ARMV5 WINSCW

PRJ_MMPFILES
simple.mmp

PRJ_EXPORTS
#if !defined( WINSCW )
// Exports conditional on build configuration macros aren't actually supported,
// but we confirm that we preprocess in the context of an armv5 build when both
// winscw and armv5 configurations are (implicitly, as there's no "-c" argument)
// used.  This is in order to work around assumptions currently made in the
// source base.
simple_exp1.h exported_1.h
#endif
simple_exp2.h exported_2.h
simple_exp3.h exported_3.h
executable_file executable_file
"file with a space.doc" "exportedfilewithspacesremoved.doc"
"file with a space.doc" "exported file with a space.doc"

simple_exp1.h /tmp/{0}/  //
simple_exp2.h \\tmp\\{0}/  //
simple_exp3.h /tmp/{0}/simple_exp3.h 
simple_exp4.h //
read_only.h was_read_only.h //

""".format(user))
	bld_inf.close()
	
	exported_files = [
		"$(EPOCROOT)/epoc32/include/exported_1.h",
		"$(EPOCROOT)/epoc32/include/exported_2.h",
		"$(EPOCROOT)/epoc32/include/exported_3.h",
		"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc",
		"$(EPOCROOT)/epoc32/include/exported file with a space.doc",
		"/tmp/$(USER)/simple_exp1.h",
		"/tmp/$(USER)/simple_exp2.h",
		"/tmp/$(USER)/simple_exp3.h",
		"$(EPOCROOT)/epoc32/include/executable_file",
		"$(EPOCROOT)/epoc32/include/simple_exp4.h",
		"$(EPOCROOT)/epoc32/include/was_read_only.h",
		]

	t = AntiTargetSmokeTest()
	
	# Check basic export success
	t.name = "export_basic"
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf export"
	t.targets = exported_files
	t.antitargets = []
	t.run()
	
	# Confirm executable permissions are retained on Linux
	t.name = "export_executable_permissions"
	t.usebash = True
	t.command = "ls -l ${EPOCROOT}/epoc32/include/executable_file"
	t.mustmatch = [ "^.rwxrwxr.x[\.\+]? .*executable_file.*$" ]
	t.targets = [] # prevent auto clean-up up of target files from previous test
	t.antitargets = []
	t.run("linux")

	# Check clean does not delete exports
	t.name = "export_clean"
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf clean"
	t.mustmatch = []
	t.targets = exported_files
	t.antitargets = []
	t.run()

	# Confirm reallyclean deletes all exports, including those that were read-only
	# as source (and so should now be removable at their destination)
	t.name = "export_reallyclean" 
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf reallyclean"
	t.targets = []
	t.antitargets = exported_files
	t.run()

	# Check --noexport suppresses exports
	t.name = "export_noexport" 
	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf --noexport -n"
	t.targets = []
	t.antitargets = exported_files
	t.run()
	
	t.name = "export"
	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
Beispiel #18
0
def run():
	t = AntiTargetSmokeTest()
	t.usebash = True
	
	command = "sbs -b smoke_suite/test_resources/simple_dll/pbld.inf -c {0} -f -"
	maintargets = [
		"$(EPOCROOT)/epoc32/release/{0}/udeb/createstaticpdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/{0}/urel/createstaticpdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/{0}/udeb/createstaticpdll.dll",
		"$(EPOCROOT)/epoc32/release/{0}/urel/createstaticpdll.dll"
		]
	armv5targets = [
		"$(EPOCROOT)/epoc32/release/{0}/lib/createstaticpdll.dso",
		"$(EPOCROOT)/epoc32/release/{0}/lib/createstaticpdll{000a0000}.dso"
		]
	buildtargets =  [
		"createstaticpdll_dll/{0}/udeb/CreateStaticDLL.o",
		"createstaticpdll_dll/{0}/urel/CreateStaticDLL.o"
		]
	mustmatch = [
		r".*\busrt\d_\d\.lib\b.*",
		r".*\bscppnwdl\.dso\b.*"
		]
	mustnotmatch = [
		".*ksrt.*"
		]
	
	t.name = "pdll_armv5_rvct"
	t.command = command.format("armv5")
	t.targets = [p.replace("{0}","armv5") for p in  maintargets + armv5targets][:]	# Shallow, as we optionally extend later and then re-use
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv5") for p in buildtargets])
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()
		
	t.name = "pdll_armv5_clean"
	t.command = command.format("armv5") + " clean"
	t.targets = []
	t.mustmatch = []
	t.mustnotmatch = []
	t.run()
	
	t.name = "pdll_armv5_gcce"
	t.command = command.format("gcce_armv5")
	t.targets = [p.replace("{0}","armv5") for p in maintargets + armv5targets]
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv5") for p in buildtargets])
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()

	t.name = "pdll_armv5_gcce_clean"
	t.command = command.format("gcce_armv5") + " clean"
	t.targets = []
	t.mustmatch = []
	t.mustnotmatch = []
	t.run()

	t.name = "pdll_armv7_rvct"
	t.command = command.format("armv7")
	t.targets = [p.replace("{0}","armv7") for p in maintargets][:]	# Shallow, as we optionally extend later and then re-use
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv7") for p in buildtargets])
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()
	
	t.name = "pdll_armv7_clean"
	t.command = command.format("armv7") + " clean"
	t.targets = []
	t.mustmatch = []
	t.mustnotmatch = []
	t.run()
	
	t.name = "pdll_armv7_gcce"
	t.command = command.format("arm.v7.udeb.gcce4_5_1 -c arm.v7.urel.gcce4_3_2")
	t.targets = [p.replace("{0}","armv7") for p in maintargets]
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv7") for p in buildtargets])
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()

	t.name = "pdll_arm"
	t.print_result()
	return t
Beispiel #19
0
def run():
    t = AntiTargetSmokeTest()
    t.description = """
		Tests the creation and content of .iby romfiles generated for the armv5.test
		configuration. Also tests for creation of relevant test batch files.
		"""
    t.usebash = True
    # Don't allow -m or -f to be appended
    t.logfileOption = lambda: ""
    t.makefileOption = lambda: ""

    # Check correct .iby and batch files are generated
    t.name = "romfile_general"
    t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
      + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE}"

    t.targets = [
        "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby",
        "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby",
        "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat",
        "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat"
    ]
    t.warnings = 0 if t.onWindows else 2
    t.run()

    t.name = "romfile_content_exsymbian"
    t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby"
    t.mustmatch = [
        # The comment that is put at the start of the file.
        r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*",

        # The batch files that are added by the build system.
        r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*",
        r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*",

        # Some normal files.
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*",
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*",
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*",

        # Some files where the MMP file has the PAGED or UNPAGED keywords.
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*",
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*",

        # Some files where the MMP file has the ROMTARGET or RAMTARGET keywords.
        r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*",
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*",
        r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*",
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*",
        r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*",
    ]
    if t.onWindows:
        t.mustmatch.extend([
            # romstuff.mke additions - extension makefile added, so only apply on Windows
            r".*\ndata=..\\..\\f32test\\server\\t_file.cpp\s+Test\\T_file.cpp\n.*",
            r".*\ndata=..\\..\\f32test\\server\\t_findcaptestfile.txt\s+\\sys\\bin\\t_findcaptestfile.txt\n.*"
        ])
    t.mustnotmatch = [
        # Try to detect file paths that contain two or more slashes in a row,
        # without flagging C++ style comments.
        r"\w//+\w",

        # Confirm that no Nokia-format macros are present
        r"ABI_DIR",
        r"BUILD_DIR"
    ]
    t.targets = []
    t.warnings = 0
    t.run()

    t.name = "romfile_content_nokia"
    t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby"
    t.mustmatch = [
        # The comment that is put at the start of the file.
        r".*// epoc32/rom/src/ongoing/group/romfile/armv5testn\.iby\n.*",

        # The batch files that are added by the build system.
        r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*",
        r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*",

        # Some normal files.
        r".*\nfile=ABI_DIR/BUILD_DIR/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*",
        r".*\nfile=ABI_DIR/BUILD_DIR/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*",
        r".*\nfile=ABI_DIR/BUILD_DIR/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*",

        # Some files where the MMP file has the PAGED or UNPAGED keywords.
        r".*\nfile=ABI_DIR/BUILD_DIR/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*",
        r".*\nfile=ABI_DIR/BUILD_DIR/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*",

        # Some files where the MMP file has the ROMTARGET or RAMTARGET keywords.
        r".*\ndata=ABI_DIR/BUILD_DIR/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*",
        r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*",
        r".*\ndata=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*",
        r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*",
        r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*",

        # append_iby.flm additions from multiple START EXTENSION blocks
        r".*\ndata=../../f32test/server/t_file.cpp\s+Test/T_file.cpp\n.*",
        r".*\ndata=../../f32test/server/t_findcaptestfile.txt\s+/sys/bin/t_findcaptestfile.txt\n.*"
    ]
    t.mustnotmatch = [
        # Try to detect file paths that contain two or more slashes in a row,
        # without flagging C++ style comments.
        r"\w//+\w",

        # Confirm that no exSymbian-format macros are present
        r"##MAIN##",
        r"##BUILD##"
    ]
    t.targets = []
    t.warnings = 0
    t.run()

    t.name = "romfile_whatlog"
    t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
      + "-c armv5.test ROMFILE -f -"

    t.mustmatch = [
        # Check whatlog output includes batch files and .iby file
        r".*/epoc32/rom/src/ongoing/group/romfile/armv5test.iby</build>.*",
        r".*/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby</build>.*",
        r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat</build>.*",
        r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat</build>.*"
    ]
    t.mustnotmatch = []
    t.warnings = 0 if t.onWindows else 2
    t.run()

    t.name = "romfile_mmp_include_twice_general"
    t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \
            + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \
      + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} "

    t.targets = [
        "$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby",
        "$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby"
    ]
    t.mustmatch = []
    t.warnings = 0
    t.run()

    t.name = "romfile_mmp_include_twice_content_exsymbian"
    t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby"
    t.targets = []
    t.mustmatch = [
        r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*",
        r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*",
    ]
    t.mustnotmatch = [
        # These two files are from two mmp files that included in both bld.inf
        # They shouldn't be in the ROM
        r".*/d_medch.ldd\s.*"
        r".*/d_dma.ldd\s.*"
    ]
    t.warnings = 0
    t.run()

    t.name = "romfile_mmp_include_twice_content_nokia"
    t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby"
    t.targets = []
    t.mustmatch = [
        r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*",
        r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*",
    ]
    t.mustnotmatch = [
        # These two files are from two mmp files that included in both bld.inf
        # They shouldn't be in the ROM
        r".*/d_medch.ldd\s.*"
        r".*/d_dma.ldd\s.*"
    ]
    t.warnings = 0
    t.run()

    # Check armv5.auto.bat doesn't get generated with -p option
    t.name = "romfile_partial"
    t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
      + "-c armv5.test ROMFILE -p t_rcache.mmp"
    t.antitargets = [
        "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat"
    ]
    t.mustmatch = []
    t.mustnotmatch = []
    t.warnings = 0 if t.onWindows else 2
    t.run()

    t.name = "romfile"
    t.print_result()
    return t
Beispiel #20
0
def run():
	t = AntiTargetSmokeTest()
	t.description = "Test the build, package and clean of Raptor built applications using the createsis FLM"

	t.name = "native_package_vanilla"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/build_and_package.inf -c armv5 -c winscw"
	t.targets = [
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
		"$(EPOCROOT)/epoc32/include/HelloWorld.rsg",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/HelloWorld.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/HelloWorld.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/HelloWorld.rsc",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map",
		"$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/sis/helloworld_armv5.sisx",
		"$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/sis/helloworld_armv5_debug.sis",
		"$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/sis/helloworld_winscw.sisx",
		"$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/sis/helloworld_winscw_debug.sis",
		"$(EPOCROOT)/epoc32/data/z/system/install/helloworld_stub.sis",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/system/install/helloworld_stub.sis"
		]
	t.addbuildtargets('smoke_suite/test_resources/simple_gui/build_and_package.inf', [
		"helloworld_exe/helloworld.mbm_bmconvcommands",
		"HelloWorld_exe/HelloWorld_HelloWorld.rsc.rpp",
		"HelloWorld_exe/HelloWorld_HelloWorld.rsc.d",
		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o.d",
		"helloworld_exe/armv5/udeb/HelloWorld_AppView.o",
		"helloworld_exe/armv5/udeb/HelloWorld_AppView.o.d",
		"helloworld_exe/armv5/udeb/HelloWorld_Document.o",
		"helloworld_exe/armv5/udeb/HelloWorld_Document.o.d",
		"helloworld_exe/armv5/udeb/HelloWorld_Main.o",
		"helloworld_exe/armv5/udeb/HelloWorld_Main.o.d",
		"helloworld_exe/armv5/udeb/helloworld_udeb_objects.via",
		"helloworld_exe/armv5/urel/HelloWorld_Application.o",
		"helloworld_exe/armv5/urel/HelloWorld_Application.o.d",
		"helloworld_exe/armv5/urel/HelloWorld_AppUi.o",
		"helloworld_exe/armv5/urel/HelloWorld_AppUi.o.d",
		"helloworld_exe/armv5/urel/HelloWorld_AppView.o",
		"helloworld_exe/armv5/urel/HelloWorld_AppView.o.d",
		"helloworld_exe/armv5/urel/HelloWorld_Document.o",
		"helloworld_exe/armv5/urel/HelloWorld_Document.o.d",
		"helloworld_exe/armv5/urel/HelloWorld_Main.o",
		"helloworld_exe/armv5/urel/HelloWorld_Main.o.d",
		"helloworld_exe/armv5/urel/helloworld_urel_objects.via",
		"helloworld_exe/winscw/udeb/helloworld.UID.CPP",
		"helloworld_exe/winscw/udeb/HelloWorld_Application.dep",
		"helloworld_exe/winscw/udeb/HelloWorld_Application.o",
		"helloworld_exe/winscw/udeb/HelloWorld_Application.o.d",
		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.dep",
		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.o",
		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.o.d",
		"helloworld_exe/winscw/udeb/HelloWorld_AppView.dep",
		"helloworld_exe/winscw/udeb/HelloWorld_AppView.o",
		"helloworld_exe/winscw/udeb/HelloWorld_AppView.o.d",
		"helloworld_exe/winscw/udeb/HelloWorld_Document.dep",
		"helloworld_exe/winscw/udeb/HelloWorld_Document.o",
		"helloworld_exe/winscw/udeb/HelloWorld_Document.o.d",
		"helloworld_exe/winscw/udeb/HelloWorld_Main.dep",
		"helloworld_exe/winscw/udeb/HelloWorld_Main.o",
		"helloworld_exe/winscw/udeb/HelloWorld_Main.o.d",
		"helloworld_exe/winscw/udeb/helloworld_UID_.dep",
		"helloworld_exe/winscw/udeb/helloworld_UID_.o",
		"helloworld_exe/winscw/udeb/helloworld_UID_.o.d",
		"helloworld_exe/winscw/urel/helloworld.UID.CPP",
		"helloworld_exe/winscw/urel/HelloWorld_Application.dep",
		"helloworld_exe/winscw/urel/HelloWorld_Application.o",
		"helloworld_exe/winscw/urel/HelloWorld_Application.o.d",
		"helloworld_exe/winscw/urel/HelloWorld_AppUi.dep",
		"helloworld_exe/winscw/urel/HelloWorld_AppUi.o",
		"helloworld_exe/winscw/urel/HelloWorld_AppUi.o.d",
		"helloworld_exe/winscw/urel/HelloWorld_AppView.dep",
		"helloworld_exe/winscw/urel/HelloWorld_AppView.o",
		"helloworld_exe/winscw/urel/HelloWorld_AppView.o.d",
		"helloworld_exe/winscw/urel/HelloWorld_Document.dep",
		"helloworld_exe/winscw/urel/HelloWorld_Document.o",
		"helloworld_exe/winscw/urel/HelloWorld_Document.o.d",
		"helloworld_exe/winscw/urel/HelloWorld_Main.dep",
		"helloworld_exe/winscw/urel/HelloWorld_Main.o",
		"helloworld_exe/winscw/urel/HelloWorld_Main.o.d",
		"helloworld_exe/winscw/urel/helloworld_UID_.dep",
		"helloworld_exe/winscw/urel/helloworld_UID_.o",
		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
		"HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.d",
		"helloworld_armv5_debug_sis/armv5/udeb/armv5_udeb.pkg",
		"helloworld_armv5_debug_sis/armv5/udeb/helloworld_armv5_debug.sis",
		"helloworld_armv5_sisx/armv5/urel/armv5_urel.pkg",
		"helloworld_armv5_sisx/armv5/urel/helloworld_armv5.sis",
		"helloworld_winscw_debug_sis/winscw/udeb/winscw_udeb.pkg",
		"helloworld_winscw_debug_sis/winscw/udeb/helloworld_winscw_debug.sis",
		"helloworld_winscw_sisx/winscw/urel/winscw_urel.pkg",
		"helloworld_winscw_sisx/winscw/urel/helloworld_winscw.sis",
		"helloworld_stub_sis/armv5/urel/stub.pkg",
		"helloworld_stub_sis/armv5/urel/helloworld_stub.sis",
		"helloworld_stub_sis/winscw/urel/stub.pkg",
		"helloworld_stub_sis/winscw/urel/helloworld_stub.sis"
	])
	t.run()
	
	# back-up the targets to clean later - we want them as input for the next
	# test without having to re-build the component
	built_targets = t.targets[:]
	
	t.name = "native_package_custom"
	t.targets = [
		"$(EPOCROOT)/epoc32/packaging/helloworld/helloworld_winscw_custom.sis",
		"$(EPOCROOT)/epoc32/packaging/helloworld/helloworld_armv5_custom.sis"
		]
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/custom_package.inf -c armv5 -c winscw"
	t.run()
	
	# confirm clean does as it should, as we know that signsis operation can lead to read-only input files
	t.name = "native_package_clean"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/build_and_package.inf -b $(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/custom_package.inf -c armv5 -c winscw clean"
	t.antitargets = built_targets + t.targets
	t.targets = []
	t.run()

	qmake_call = "$(EPOCROOT)/epoc32/tools/qt/qmake{ext} " + \
		"-spec $(EPOCROOT)/epoc32/tools/qt/mkspecs/symbian-sbsv2 " + \
		"QMAKE_INCDIR_QT=$(EPOCROOT)/epoc32/include/mw " + \
		"QMAKE_MOC=$(EPOCROOT)/epoc32/tools/moc{ext} " + \
		"QMAKE_UIC=$(EPOCROOT)/epoc32/tools/uic{ext} " + \
		"QMAKE_RCC=$(EPOCROOT)/epoc32/tools/rcc{ext} " + \
		"smoke_suite/test_resources/qt/lotto/LottoNumberPicker.pro " + \
		"-o $(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/bld.inf"
	raptor_call = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/bld.inf -c arm.v5.urel.rvct4_0 -c winscw_urel"	
	patch_bldinf= """cat <<__ENDOFPATCH__ >> $(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/bld.inf
	
START EXTENSION utility.createsis
OPTION PKG_FILE lottonumberpicker_template.pkg
#ifdef WINSCW
OPTION SIS_FILE lottonumberpicker_winscw.sis
#else
OPTION SIS_FILE lottonumberpicker_armv5.sis
#endif
OPTION TARGET_FILE lottonumberpicker.exe
OPTION BUILD_TYPE urel
END
__ENDOFPATCH__

"""
	tool_ext = ""
	if t.onWindows:
		tool_ext = ".exe"
	
	t.name= "qt_package"
	t.usebash = True
	t.command = "{qmake} && {patch} {raptor}".format(qmake=qmake_call.format(ext=tool_ext), patch=patch_bldinf, raptor=raptor_call)
	t.antitargets = []
	t.targets = [
		"$(EPOCROOT)/epoc32/data/z/private/10003a3f/import/apps/lottonumberpicker_reg.rsc",
		"$(EPOCROOT)/epoc32/data/z/resource/apps/lottonumberpicker.rsc",
		"$(EPOCROOT)/epoc32/include/lottonumberpicker.rsg",
		"$(EPOCROOT)/epoc32/release/armv5/urel/lottonumberpicker.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/lottonumberpicker.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/lottonumberpicker.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/lottonumberpicker.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/import/apps/lottonumberpicker_reg.rsc",
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/lottonumberpicker.rsc",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/.make.cache",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/LottoNumberPicker_0x20029F39.mmp",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/Makefile",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/bld.inf",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker.loc",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker.rss",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_installer.pkg",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_reg.rss",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_template.pkg",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/moc_lottonumberpicker.cpp",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/moc_lottonumberpicker.cpp",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/ui_lottonumberpicker.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_armv5.sis",
		"$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_winscw.sis",			
		]
	
	t.addbuildtargets('smoke_suite/test_resources/qt/lotto/bld.inf', [
		"lottonumberpicker_exe/armv5/urel/integerpair.o",
		"lottonumberpicker_exe/armv5/urel/integerpair.o.d",
		"lottonumberpicker_exe/armv5/urel/lottonumberpicker.o",
		"lottonumberpicker_exe/armv5/urel/lottonumberpicker.o.d",
		"lottonumberpicker_exe/armv5/urel/lottonumberpicker_urel_objects.via",
		"lottonumberpicker_exe/armv5/urel/main.o",
		"lottonumberpicker_exe/armv5/urel/main.o.d",
		"lottonumberpicker_exe/armv5/urel/moc_lottonumberpicker.o",
		"lottonumberpicker_exe/armv5/urel/moc_lottonumberpicker.o.d",
		"lottonumberpicker_exe/lottonumberpicker_lottonumberpicker.rsc",
		"lottonumberpicker_exe/lottonumberpicker_lottonumberpicker.rsc.d",
		"lottonumberpicker_exe/lottonumberpicker_lottonumberpicker.rsc.rpp",
		"lottonumberpicker_exe/winscw/urel/integerpair.dep",
		"lottonumberpicker_exe/winscw/urel/integerpair.o",
		"lottonumberpicker_exe/winscw/urel/integerpair.o.d",
		"lottonumberpicker_exe/winscw/urel/lottonumberpicker.UID.CPP",
		"lottonumberpicker_exe/winscw/urel/lottonumberpicker.dep",
		"lottonumberpicker_exe/winscw/urel/lottonumberpicker.o",
		"lottonumberpicker_exe/winscw/urel/lottonumberpicker.o.d",
		"lottonumberpicker_exe/winscw/urel/lottonumberpicker_UID_.dep",
		"lottonumberpicker_exe/winscw/urel/lottonumberpicker_UID_.o",
		"lottonumberpicker_exe/winscw/urel/lottonumberpicker_UID_.o.d",
		"lottonumberpicker_exe/winscw/urel/main.dep",
		"lottonumberpicker_exe/winscw/urel/main.o",
		"lottonumberpicker_exe/winscw/urel/main.o.d",
		"lottonumberpicker_exe/winscw/urel/moc_lottonumberpicker.dep",
		"lottonumberpicker_exe/winscw/urel/moc_lottonumberpicker.o",
		"lottonumberpicker_exe/winscw/urel/moc_lottonumberpicker.o.d",
		"lottonumberpicker_reg_exe/lottonumberpicker_reg_lottonumberpicker_reg.rsc",
		"lottonumberpicker_reg_exe/lottonumberpicker_reg_lottonumberpicker_reg.rsc.d",
		"lottonumberpicker_reg_exe/lottonumberpicker_reg_lottonumberpicker_reg.rsc.rpp",
		"lottonumberpicker_armv5_sis/armv5/urel/lottonumberpicker_template.pkg",
		"lottonumberpicker_armv5_sis/armv5/urel/lottonumberpicker_armv5.sis",
		"lottonumberpicker_winscw_sis/winscw/urel/lottonumberpicker_template.pkg",
		"lottonumberpicker_winscw_sis/winscw/urel/lottonumberpicker_winscw.sis"
	])	
	t.run()
	t.clean()
	
	t.name="packaging"
	t.print_result()
	return t
Beispiel #21
0
def run():
    t = AntiTargetSmokeTest()
    t.usebash = True

    # Unordered layer logging tests
    unorderedcommand = 'sbs -f- -s smoke_suite/test_resources/sysdef/system_definition_simple.xml'
    unorderedtargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple1.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple2.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple3.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple4.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe.map"
    ]

    unorderedbuildtargets = [
        "{COMPONENT}_/armv5/udeb/simple.o", "{COMPONENT}_/armv5/urel/simple.o",
        "{COMPONENT}_/winscw/udeb/simple.o",
        "{COMPONENT}_/winscw/udeb/{COMPONENT}_UID_.o",
        "{COMPONENT}_/winscw/udeb/{COMPONENT}.UID.CPP",
        "{COMPONENT}_/winscw/urel/simple.o",
        "{COMPONENT}_/winscw/urel/{COMPONENT}_UID_.o",
        "{COMPONENT}_/winscw/urel/{COMPONENT}.UID.CPP"
    ]

    t.name = "sysdef_layers"
    t.description = "Test system definition building and layer logging"
    t.command = unorderedcommand
    t.targets = unorderedtargets
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple1/bld.inf',
        [x.format(COMPONENT="simple1") for x in unorderedbuildtargets])
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple2/bld.inf',
        [x.format(COMPONENT="simple2") for x in unorderedbuildtargets])
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple3/bld.inf',
        [x.format(COMPONENT="simple3") for x in unorderedbuildtargets])
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple4/bld.inf',
        [x.format(COMPONENT="simple4") for x in unorderedbuildtargets])
    t.countmatch = [["<recipe .*layer='layer1' .*>", 24],
                    ["<recipe .*layer='layer2' .*>", 24]]
    t.run()

    # System definition layer test with PP on
    t.name = "sysdef_layers_pp"
    t.description = "Test system definition layer building and logging with parallel processing on"
    t.command = unorderedcommand + " --pp on"
    t.countmatch = [["<recipe .*layer='layer1' .*>", 24],
                    ["<recipe .*layer='layer2' .*>", 24]]
    t.run()

    # Ordered layer building and logging tests
    orderedcommand = 'sbs -f- -s smoke_suite/test_resources/sysdef/system_definition_order_layer_test.xml ' + \
      '-l "Metadata Export" -l "Build Generated Source" -l "Component with Layer Dependencies" -o'

    t.name = "sysdef_layers_ordered"
    t.description = "Test system definition ordered layer building and logging"
    t.command = orderedcommand
    t.targets = [
        "$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.inf",
        "$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.mmh",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
        "$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/HelloWorld_reg.rsc",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/HelloWorld.rsc",
        "$(EPOCROOT)/epoc32/include/HelloWorld.rsg",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/helloworld.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/HelloWorld_reg.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/HelloWorld.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
        "$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/HelloWorld_reg.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/HelloWorld.rsc",
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/build_gen_source/bld.inf', [
            "HelloWorld_/HelloWorld_HelloWorld.rsc.rpp",
            "HelloWorld_/HelloWorld_HelloWorld.rsc",
            "HelloWorld_/HelloWorld_HelloWorld.rsc.d"
        ])
    t.addbuildtargets('smoke_suite/test_resources/sysdef/dependent/bld.inf', [
        "helloworld_exe/armv5/udeb/HelloWorld_Application.o",
        "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
        "helloworld_exe/armv5/udeb/HelloWorld_AppView.o",
        "helloworld_exe/armv5/udeb/HelloWorld_Document.o",
        "helloworld_exe/armv5/udeb/HelloWorld_Main.o",
        "helloworld_exe/armv5/urel/HelloWorld_Application.o",
        "helloworld_exe/armv5/urel/HelloWorld_AppUi.o",
        "helloworld_exe/armv5/urel/HelloWorld_AppView.o",
        "helloworld_exe/armv5/urel/HelloWorld_Document.o",
        "helloworld_exe/armv5/urel/HelloWorld_Main.o",
        "helloworld_exe/winscw/udeb/HelloWorld_Application.o",
        "helloworld_exe/winscw/udeb/HelloWorld_AppUi.o",
        "helloworld_exe/winscw/udeb/HelloWorld_AppView.o",
        "helloworld_exe/winscw/udeb/HelloWorld_Document.o",
        "helloworld_exe/winscw/udeb/HelloWorld_Main.o",
        "helloworld_exe/winscw/udeb/helloworld.UID.CPP",
        "helloworld_exe/winscw/udeb/helloworld_UID_.o",
        "helloworld_exe/winscw/urel/HelloWorld_Application.o",
        "helloworld_exe/winscw/urel/HelloWorld_AppUi.o",
        "helloworld_exe/winscw/urel/HelloWorld_AppView.o",
        "helloworld_exe/winscw/urel/HelloWorld_Document.o",
        "helloworld_exe/winscw/urel/HelloWorld_Main.o",
        "helloworld_exe/winscw/urel/helloworld.UID.CPP",
        "helloworld_exe/winscw/urel/helloworld_UID_.o",
        "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.rpp",
        "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.d"
    ])
    t.countmatch = [
        [
            "<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>",
            33
        ],
        [
            "<recipe .*layer='Build Generated Source' component='build generated source'.*>",
            3
        ]
    ]
    t.run()

    t.name = "sysdef_layers_ordered_pp"
    t.description = "Test system definition ordered layer building and logging with parallel processing on"
    t.command = orderedcommand + " --pp on"
    t.run()

    # package definition building and logging tests
    packagecommand = 'sbs -f- -s smoke_suite/test_resources/sysdef/package_definition.xml'
    packagetargets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple1.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple2.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/simple4.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple1.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple2.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple3.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/simple4.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple1.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple2.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple3.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/simple4.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple1.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple2.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple3.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/simple4.exe.map"
    ]

    t.name = "sysdef_layers_pkgdef"
    t.description = "Test package definition building and layer logging"
    t.command = packagecommand
    t.targets = packagetargets
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple1/bld.inf',
        [x.format(COMPONENT="simple1") for x in unorderedbuildtargets])
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple2/bld.inf',
        [x.format(COMPONENT="simple2") for x in unorderedbuildtargets])
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple3/bld.inf',
        [x.format(COMPONENT="simple3") for x in unorderedbuildtargets])
    t.addbuildtargets(
        'smoke_suite/test_resources/sysdef/simple/simple4/bld.inf',
        [x.format(COMPONENT="simple4") for x in unorderedbuildtargets])
    t.countmatch = [["<recipe .*layer='package1' .*>", 24],
                    ["<recipe .*layer='package2' .*>", 24]]
    t.run()

    t.name = "sysdef_layers_pkgdef_pp"
    t.description = "Test package definition building and layer logging with parallel processing on"
    t.command = packagecommand + " --pp on"
    t.run()

    t.id = "48"
    t.name = "sysdef_layers"
    return t
Beispiel #22
0
def run():
	t = AntiTargetSmokeTest()
	t.description = """
		Tests the creation and content of .iby romfiles generated for the armv5.test
		configuration. Also tests for creation of relevant test batch files.
		"""	
	t.usebash = True
	# Don't allow -m or -f to be appended
	t.logfileOption = lambda :""
	t.makefileOption = lambda :""

	
	# Check correct .iby and batch files are generated
	t.name = "romfile_general"	
	t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
			+ "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE}"
	
	t.targets = [
		"$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby",
		"$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby",
		"$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat",
		"$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat"
		]
	t.warnings = 0 if t.onWindows else 2
	t.run()
	
	t.name = "romfile_content_exsymbian"	
	t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby"
	t.mustmatch = [
		# The comment that is put at the start of the file.
		r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*",

		# The batch files that are added by the build system.
		r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*",
		r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*",

		# Some normal files.
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*",
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*",
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*",

		# Some files where the MMP file has the PAGED or UNPAGED keywords.
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*",
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*",

		# Some files where the MMP file has the ROMTARGET or RAMTARGET keywords.
		r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*",
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*",
		r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*",
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*",
		r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*",
		]
	if t.onWindows:
		t.mustmatch.extend([
		# romstuff.mke additions - extension makefile added, so only apply on Windows
		r".*\ndata=..\\..\\f32test\\server\\t_file.cpp\s+Test\\T_file.cpp\n.*",
		r".*\ndata=..\\..\\f32test\\server\\t_findcaptestfile.txt\s+\\sys\\bin\\t_findcaptestfile.txt\n.*"
		])
	t.mustnotmatch = [
		# Try to detect file paths that contain two or more slashes in a row,
		# without flagging C++ style comments.
		r"\w//+\w",
		
		# Confirm that no Nokia-format macros are present
		r"ABI_DIR",
		r"BUILD_DIR"
		]
	t.targets = []
	t.warnings = 0
	t.run()
	

	t.name = "romfile_content_nokia"	
	t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby"
	t.mustmatch = [
		# The comment that is put at the start of the file.
		r".*// epoc32/rom/src/ongoing/group/romfile/armv5testn\.iby\n.*",

		# The batch files that are added by the build system.
		r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*",
		r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*",

		# Some normal files.
		r".*\nfile=ABI_DIR/BUILD_DIR/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*",
		r".*\nfile=ABI_DIR/BUILD_DIR/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*",
		r".*\nfile=ABI_DIR/BUILD_DIR/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*",

		# Some files where the MMP file has the PAGED or UNPAGED keywords.
		r".*\nfile=ABI_DIR/BUILD_DIR/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*",
		r".*\nfile=ABI_DIR/BUILD_DIR/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*",

		# Some files where the MMP file has the ROMTARGET or RAMTARGET keywords.
		r".*\ndata=ABI_DIR/BUILD_DIR/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*",
		r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*",
		r".*\ndata=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*",
		r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*",
		r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*",
		
		# append_iby.flm additions from multiple START EXTENSION blocks
		r".*\ndata=../../f32test/server/t_file.cpp\s+Test/T_file.cpp\n.*",
		r".*\ndata=../../f32test/server/t_findcaptestfile.txt\s+/sys/bin/t_findcaptestfile.txt\n.*"	
		]
	t.mustnotmatch = [
		# Try to detect file paths that contain two or more slashes in a row,
		# without flagging C++ style comments.
		r"\w//+\w",
				
		# Confirm that no exSymbian-format macros are present
		r"##MAIN##",
		r"##BUILD##"
		]
	t.targets = []
	t.warnings = 0
	t.run()
	

	t.name = "romfile_whatlog"
	t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
			+ "-c armv5.test ROMFILE -f -"
	
	t.mustmatch = [
		# Check whatlog output includes batch files and .iby file
		r".*/epoc32/rom/src/ongoing/group/romfile/armv5test.iby</build>.*",
		r".*/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby</build>.*",
		r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat</build>.*",
		r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat</build>.*"
		]
	t.mustnotmatch = []
	t.warnings = 0 if t.onWindows else 2
	t.run()


	t.name = "romfile_mmp_include_twice_general"
	t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \
	        + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \
			+ "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} "
	
	t.targets = [
		"$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby",
		"$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby"
		]
	t.mustmatch = []
	t.warnings = 0
	t.run()
	

	t.name = "romfile_mmp_include_twice_content_exsymbian"	
	t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby"	
	t.targets = []
	t.mustmatch = [
		r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*",
		r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*",
		]
	t.mustnotmatch = [
		# These two files are from two mmp files that included in both bld.inf
		# They shouldn't be in the ROM
		r".*/d_medch.ldd\s.*"
		r".*/d_dma.ldd\s.*"
		]
	t.warnings = 0
	t.run()

	t.name = "romfile_mmp_include_twice_content_nokia"	
	t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby"	
	t.targets = []
	t.mustmatch = [
		r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*",
		r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*",
		]
	t.mustnotmatch = [
		# These two files are from two mmp files that included in both bld.inf
		# They shouldn't be in the ROM
		r".*/d_medch.ldd\s.*"
		r".*/d_dma.ldd\s.*"
		]
	t.warnings = 0
	t.run()

	# Check armv5.auto.bat doesn't get generated with -p option 
	t.name = "romfile_partial"	
	t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
			+ "-c armv5.test ROMFILE -p t_rcache.mmp" 
	t.antitargets = [
		"$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat"
		]
	t.mustmatch = []
	t.mustnotmatch = []
	t.warnings = 0 if t.onWindows else 2
	t.run()	

	t.name = "romfile"
	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
Beispiel #24
0
def run():
    t = AntiTargetSmokeTest()
    t.usebash = True

    command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c {0} -f-"
    maintargets = [
        "$(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"
    ]
    abiv1libtargets = [
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.lib",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.lib"
    ]
    buildtargets = [
        "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
        "createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
    ]
    mustmatch = [r".*\busrt\d_\d\.lib\b.*", r".*\bscppnwdl\.dso\b.*"]
    mustnotmatch = [".*ksrt.*"]

    # Note that ABIv1 import libraries are only generated for RVCT-based armv5
    # builds on Windows if the kit asks for it (off by default)

    t.name = "dll_armv5_rvct"
    t.command = command.format("armv5")
    t.targets = maintargets[:]  # Shallow, as we optionally extend later and then re-use
    t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf',
                      buildtargets)
    t.mustmatch = mustmatch
    t.mustnotmatch = mustnotmatch
    t.run()

    t.name = "dll_armv5_rvct_abiv1"
    t.command += " --configpath=test/config/abiv1kit"
    t.targets.extend(abiv1libtargets)
    t.run("windows")

    t.name = "dll_armv5_clean"
    t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 clean"
    t.targets = []
    t.mustmatch = []
    t.mustnotmatch = []
    t.run()

    t.name = "dll_armv5_gcce"
    t.command = command.format("gcce_armv5")
    t.targets = maintargets
    t.antitargets = abiv1libtargets
    t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf',
                      buildtargets)
    t.mustmatch = mustmatch
    t.mustmatch.append("-funsigned-bitfields")
    t.mustnotmatch = mustnotmatch
    t.run()

    t.name = "dll_armv5"
    t.print_result()
    return t
Beispiel #25
0
def run():
	t = AntiTargetSmokeTest()
	t.usebash = True
	
	command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c %s -f-"
	maintargets = [
		"$(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"
		]
	abiv1libtargets = [
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.lib",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.lib"
		]	
	buildtargets =  [
		"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
		"createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
		]
	mustmatch = [
		r".*\busrt\d_\d\.lib\b.*",
		r".*\bscppnwdl\.dso\b.*"
			]
	mustnotmatch = [
		".*ksrt.*"
		]
	
	# Note that ABIv1 import libraries are only generated for RVCT-based armv5
	# builds on Windows if the kit asks for it (off by default)
	
	t.id = "0009a"
	t.name = "dll_armv5_rvct"
	t.command = command % "armv5"
	t.targets = maintargets[:]	# Shallow, as we optionally extend later and then re-use
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets)
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()
	
	t.id = "0009b"
	t.name = "dll_armv5_rvct_abiv1"
	t.command += " --configpath=test/config/abiv1kit"
	t.targets.extend(abiv1libtargets)
	t.run("windows")
		
	t.id = "0009c"
	t.name = "dll_armv5_clean"
	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 clean"
	t.targets = []
	t.mustmatch = []
	t.mustnotmatch = []
	t.run()	
		
	t.id = "0009d"
	t.name = "dll_armv5_gcce"
	t.command = command % "gcce_armv5"
	t.targets = maintargets
	t.antitargets = abiv1libtargets
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets)
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()	
	
	t.id = "9"
	t.name = "dll_armv5"
	t.print_result()
	return t
Beispiel #26
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
Beispiel #27
0
def run():
	t = AntiTargetSmokeTest()
	t.usebash = True
	
	command = "sbs -b smoke_suite/test_resources/simple_dll/pbld.inf -c %s -f -"
	maintargets = [
		"$(EPOCROOT)/epoc32/release/%s/udeb/createstaticpdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/%s/urel/createstaticpdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/%s/udeb/createstaticpdll.dll",
		"$(EPOCROOT)/epoc32/release/%s/urel/createstaticpdll.dll"
		]
	armv5targets = [
		"$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.dso",
		"$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.dso"
		]
	buildtargets =  [
		"createstaticpdll_dll/%s/udeb/CreateStaticDLL.o",
		"createstaticpdll_dll/%s/urel/CreateStaticDLL.o"
		]
	mustmatch = [
		r".*\busrt\d_\d\.lib\b.*",
		r".*\bscppnwdl\.dso\b.*"
		]
	mustnotmatch = [
		".*ksrt.*"
		]
	
	t.id = "0109a"
	t.name = "pdll_armv5_rvct"
	t.command = command % "armv5"
	t.targets = map(lambda p: p % "armv5", maintargets + armv5targets)[:]	# Shallow, as we optionally extend later and then re-use
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets))
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()
		
	t.id = "0109b"
	t.name = "pdll_armv5_clean"
	t.command = command % "armv5" + " clean"
	t.targets = []
	t.mustmatch = []
	t.mustnotmatch = []
	t.run()
	
	t.id = "0109c"
	t.name = "pdll_armv5_gcce"
	t.command = command % "gcce_armv5"
	t.targets = map(lambda p: p % "armv5", maintargets + armv5targets)
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets))
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()

	t.id = "0109d"
	t.name = "pdll_armv5_gcce_clean"
	t.command = command % "gcce_armv5" + " clean"
	t.targets = []
	t.mustmatch = []
	t.mustnotmatch = []
	t.run()

	t.id = "0109e"
	t.name = "pdll_armv7_rvct"
	t.command = command % "armv7"
	t.targets = map(lambda p: p % "armv7", maintargets)[:]	# Shallow, as we optionally extend later and then re-use
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv7", buildtargets))
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()
	
	t.id = "0109f"
	t.name = "pdll_armv7_clean"
	t.command = command % "armv7" + " clean"
	t.targets = []
	t.mustmatch = []
	t.mustnotmatch = []
	t.run()
	
	t.id = "0109g"
	t.name = "pdll_armv7_gcce"
	t.command = command % "arm.v7.udeb.gcce4_3_2 -c arm.v7.urel.gcce4_3_2"
	t.targets = map(lambda p: p % "armv7", maintargets)
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv7", buildtargets))
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.run()

	t.id = "109"
	t.name = "pdll_arm"
	t.print_result()
	return t