Пример #1
0
def run():
	t = SmokeTest()
	t.description = "Check that ARM toolchain specific macros are used in both metadata and source processing."
	t.warnings = -1

	toolchains = {
				'rvct2_2':   ['ARMCC', 'ARMCC_2', 'ARMCC_2_2', '__ARMCC__', '__ARMCC_2__',  '__ARMCC_2_2__'],
				'rvct4_0':   ['ARMCC', 'ARMCC_4', 'ARMCC_4_0', '__ARMCC__', '__ARMCC_4__' , '__ARMCC_4_0__'],
				'gcce4_3_2': ['GCCE', 'GCCE_4', 'GCCE_4_3', '__GCCE__', '__GCCE_4__' , '__GCCE_4_3__'],
				'gcce4_3_3': ['GCCE', 'GCCE_4', 'GCCE_4_3', '__GCCE__', '__GCCE_4__' , '__GCCE_4_3__'],
				'gcce4_4_1': ['GCCE', 'GCCE_4', 'GCCE_4_4', '__GCCE__', '__GCCE_4__' , '__GCCE_4_4__'],
				'gcce4_5_1': ['GCCE', 'GCCE_4', 'GCCE_4_5', '__GCCE__', '__GCCE_4__' , '__GCCE_4_5__']
				}

	rootname = "toolchain_macros_armv5_{0}_{1}"
	rootcommand = "sbs -b smoke_suite/test_resources/toolchain_macros/bld.inf -c arm.v5.urel."
	macromatch = ": #warning( directive:)? {0}( \[-Wcpp\])?(</warning>)?$"

	for toolchain in sorted(toolchains.keys()):
		t.name = rootname.format(toolchain, "clean")
		t.command = rootcommand + toolchain + " clean"
		t.mustmatch_singleline = []
		t.run()

		t.name = rootname.format(toolchain, "build")
		t.command = rootcommand + toolchain
		mustmatch = []
		for macro in toolchains[toolchain]:
			mustmatch.append(macromatch.format(macro))
		t.mustmatch_singleline = mustmatch
		t.run()

	t.name = "toolchain_macros"
	t.print_result()
	return t
Пример #2
0
def run():
	t = SmokeTest()
	t.usebash = True
	
	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c arm.v5.udeb.rvct4_0.linkerfeedback -c arm.v5.urel.rvct4_0.linkerfeedback -f-"

	gen_fdb_match = [
		".*armlink.*-o.*epoc32/release/armv5/udeb/createstaticdll.dll.sym.*--feedback=.*createstaticdll_dll/armv5/udeb/createstaticdll_udeb_feedback.fdb.*",
		".*armlink.*-o.*epoc32/release/armv5/urel/createstaticdll.dll.sym.*--feedback=.*createstaticdll_dll/armv5/urel/createstaticdll_urel_feedback.fdb.*"
		]
	use_fdb_match = [
		".*armcc.*--feedback=.*createstaticdll_dll/armv5/udeb/createstaticdll_udeb_feedback.fdb.*test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.cpp.*",
		".*armcc.*--feedback=.*createstaticdll_dll/armv5/urel/createstaticdll_urel_feedback.fdb.*test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.cpp.*"
		]
	
	t.name = "linkerfeedback_initial_build"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
		]
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [
		"createstaticdll_dll/armv5/udeb/createstaticdll_udeb_feedback.fdb",
		"createstaticdll_dll/armv5/urel/createstaticdll_urel_feedback.fdb",
		"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
		"createstaticdll_dll/armv5/urel/CreateStaticDLL.o"		
		])
	t.mustmatch_singleline = gen_fdb_match
	t.mustnotmatch_singleline = use_fdb_match
	t.run()
	
	# Note: we neutralise the targets in the following in order to ensure
	# that they aren't cleaned from the initial build
	# Instead we confirm that the "right thing" happens in these next builds
	# in terms of tools calls based on the linker feedback files being present
	# and:
	# (a) newer than the object files (triggering re-compile and re-link)
	# (b) older than the object files (nothing to be done)

	t.name = "linkerfeedback_first_rebuild"
	t.targets = []
	t.mustmatch_singleline = gen_fdb_match + use_fdb_match
	t.mustnotmatch_singleline = []
	t.run()
	
	t.name = "linkerfeedback_second_rebuild"
	t.targets = []
	t.mustmatch_singleline = []
	t.mustnotmatch_singleline = gen_fdb_match + use_fdb_match
	t.run()
	
	t.name = "linkerfeedback"
	t.print_result()
	return t
Пример #3
0
def run():
    t = SmokeTest()
    t.usebash = True

    t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c arm.v5.udeb.rvct4_0.linkerfeedback -c arm.v5.urel.rvct4_0.linkerfeedback -f-"

    gen_fdb_match = [
        ".*armlink.*-o.*epoc32/release/armv5/udeb/createstaticdll.dll.sym.*--feedback=.*createstaticdll_dll/armv5/udeb/createstaticdll_udeb_feedback.fdb.*",
        ".*armlink.*-o.*epoc32/release/armv5/urel/createstaticdll.dll.sym.*--feedback=.*createstaticdll_dll/armv5/urel/createstaticdll_urel_feedback.fdb.*"
    ]
    use_fdb_match = [
        ".*armcc.*--feedback=.*createstaticdll_dll/armv5/udeb/createstaticdll_udeb_feedback.fdb.*test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.cpp.*",
        ".*armcc.*--feedback=.*createstaticdll_dll/armv5/urel/createstaticdll_urel_feedback.fdb.*test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.cpp.*"
    ]

    t.name = "linkerfeedback_initial_build"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
    ]
    t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [
        "createstaticdll_dll/armv5/udeb/createstaticdll_udeb_feedback.fdb",
        "createstaticdll_dll/armv5/urel/createstaticdll_urel_feedback.fdb",
        "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
        "createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
    ])
    t.mustmatch_singleline = gen_fdb_match
    t.mustnotmatch_singleline = use_fdb_match
    t.run()

    # Note: we neutralise the targets in the following in order to ensure
    # that they aren't cleaned from the initial build
    # Instead we confirm that the "right thing" happens in these next builds
    # in terms of tools calls based on the linker feedback files being present
    # and:
    # (a) newer than the object files (triggering re-compile and re-link)
    # (b) older than the object files (nothing to be done)

    t.name = "linkerfeedback_first_rebuild"
    t.targets = []
    t.mustmatch_singleline = gen_fdb_match + use_fdb_match
    t.mustnotmatch_singleline = []
    t.run()

    t.name = "linkerfeedback_second_rebuild"
    t.targets = []
    t.mustmatch_singleline = []
    t.mustnotmatch_singleline = gen_fdb_match + use_fdb_match
    t.run()

    t.name = "linkerfeedback"
    t.print_result()
    return t
Пример #4
0
def run():
    t = SmokeTest()

    command = "sbs -k -b smoke_suite/test_resources/simple/longcompiles.inf -c armv7_urel{variant} -c winscw_udeb{variant} -c arm.v5.urel.gcce4_4_1{variant}"
    talon_warning = ".*Command line length '\d+' exceeds the shell limit on this system of '\d+'.  If this recipe is a compile, try using the '.use_compilation_command_file' variant to reduce overall command line length."
    targets = [
        "$(EPOCROOT)/epoc32/release/armv7/urel/longcompiles.exe",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/longcompiles.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/longcompiles.exe",
    ]

    t.name = "longcompile_no_command_file"
    t.description = """
		Confirm OS-specific behaviour on massive compilation command lines.
		On Linux, all should be well, but on Windows the compile will fail
		together with a talon warning with some potentially useful advice.
		"""
    t.command = command.format(variant="")
    if t.onWindows:
        t.targets = []
        t.mustmatch_singleline = [talon_warning]
        t.warnings = 24
        t.errors = 1
        t.returncode = 1
    else:
        t.targets = targets
        t.mustnotmatch_singleline = [talon_warning]
    t.run()

    t.name = "longcompile_command_file"
    t.description = """
		Confirm that a command file is used with the .use_compilation_command_file
		variant, and that the build succeeds on all host OS platforms.
		"""
    t.command = command.format(variant=".use_compilation_command_file")
    t.targets = targets
    t.addbuildtargets(
        "smoke_suite/test_resources/simple/longcompiles.inf",
        [
            "longcompiles_exe/armv7/urel/cc.cmdfile",
            "longcompiles_exe/winscw/udeb/cc.cmdfile",
            "longcompiles_exe/armv5/urel/cc.cmdfile",
        ],
    )
    t.mustmatch_singleline = []
    t.mustnotmatch_singleline = []
    t.warnings = 0
    t.errors = 0
    t.returncode = 0
    t.run()

    t.name = "longcompiles"
    t.print_result()
    return t
Пример #5
0
def run():
	t = SmokeTest()
	
	command = "sbs -k -b smoke_suite/test_resources/simple/longcompiles.inf -c armv7_urel{variant} -c winscw_udeb{variant} -c arm.v5.urel.gcce4_4_1{variant}"
	talon_warning = ".*Command line length '\d+' exceeds the shell limit on this system of '\d+'.  If this recipe is a compile, try using the '.use_compilation_command_file' variant to reduce overall command line length."
	targets = [
				"$(EPOCROOT)/epoc32/release/armv7/urel/longcompiles.exe",
				"$(EPOCROOT)/epoc32/release/winscw/udeb/longcompiles.exe",
				"$(EPOCROOT)/epoc32/release/armv5/urel/longcompiles.exe"		
		]

	t.name = "longcompile_no_command_file"	
	t.description = """
		Confirm OS-specific behaviour on massive compilation command lines.
		On Linux, all should be well, but on Windows the compile will fail
		together with a talon warning with some potentially useful advice.
		"""			
	t.command = command.format(variant="")
	if t.onWindows:
		t.targets = []
		t.mustmatch_singleline = [talon_warning]
		t.warnings = 24
		t.errors = 1
		t.returncode = 1
	else:	
		t.targets = targets
		t.mustnotmatch_singleline = [talon_warning]
	t.run()
	
	
	t.name = "longcompile_command_file"	
	t.description = """
		Confirm that a command file is used with the .use_compilation_command_file
		variant, and that the build succeeds on all host OS platforms.
		"""
	t.command = command.format(variant=".use_compilation_command_file")
	t.targets = targets
	t.addbuildtargets('smoke_suite/test_resources/simple/longcompiles.inf', [
		"longcompiles_exe/armv7/urel/cc.cmdfile",
		"longcompiles_exe/winscw/udeb/cc.cmdfile",
		"longcompiles_exe/armv5/urel/cc.cmdfile"
		])
	t.mustmatch_singleline = []
	t.mustnotmatch_singleline = []
	t.warnings = 0
	t.errors = 0
	t.returncode = 0
	t.run()
	
	t.name = "longcompiles"
	t.print_result()
	return t
Пример #6
0
def run():
	t = SmokeTest()
	t.name = "slim_debug"
	t.description = """Exercise the slim_debug variant, checking that command line arguments
		are applied selectively."""
	t.usebash = True
	
	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5.slimdebug -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
		]
	t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', 
		[
		"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
		"createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
		])
	t.mustnotmatch_singleline = ["\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*--DNDEBUG"]	
	t.mustmatch_singleline =    ["\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*-D_DEBUG"]

	t.run()	
	return t
Пример #7
0
def run():
    t = SmokeTest()
    t.name = "slim_debug"
    t.description = """Exercise the slim_debug variant, checking that command line arguments
		are applied selectively."""
    t.usebash = True

    t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5.slimdebug -f-"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
    ]
    t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [
        "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
        "createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
    ])
    t.mustnotmatch_singleline = [
        "\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*--DNDEBUG"
    ]
    t.mustmatch_singleline = [
        "\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*-D_DEBUG"
    ]

    t.run()
    return t
Пример #8
0
def run():
    t = SmokeTest()
    t.description = "Check that ARM toolchain specific macros are used in both metadata and source processing."
    t.warnings = -1

    toolchains = {
        "rvct2_2": ["ARMCC", "ARMCC_2", "ARMCC_2_2", "__ARMCC__", "__ARMCC_2__", "__ARMCC_2_2__"],
        "rvct3_1": ["ARMCC", "ARMCC_3", "ARMCC_3_1", "__ARMCC__", "__ARMCC_3__", "__ARMCC_3_1__"],
        "rvct4_0": ["ARMCC", "ARMCC_4", "ARMCC_4_0", "__ARMCC__", "__ARMCC_4__", "__ARMCC_4_0__"],
        "gcce4_3_2": ["GCCE", "GCCE_4", "GCCE_4_3", "__GCCE__", "__GCCE_4__", "__GCCE_4_3__"],
        "gcce4_3_3": ["GCCE", "GCCE_4", "GCCE_4_3", "__GCCE__", "__GCCE_4__", "__GCCE_4_3__"],
        "gcce4_4_1": ["GCCE", "GCCE_4", "GCCE_4_4", "__GCCE__", "__GCCE_4__", "__GCCE_4_4__"],
    }

    rootname = "toolchain_macros_armv5_%s_%s"
    rootcommand = "sbs -b smoke_suite/test_resources/toolchain_macros/bld.inf -c arm.v5.urel."
    macromatch = ": #warning( directive:)? %s(</warning>)?$"

    count = 0
    for toolchain in sorted(toolchains.keys()):
        t.id = "0095" + string.ascii_lowercase[count]
        t.name = rootname % (toolchain, "clean")
        t.command = rootcommand + toolchain + " clean"
        t.mustmatch_singleline = []
        t.run()
        count += 1

        t.id = "0095" + string.ascii_lowercase[count]
        t.name = rootname % (toolchain, "build")
        t.command = rootcommand + toolchain
        mustmatch = []
        for macro in toolchains[toolchain]:
            mustmatch.append(macromatch % macro)
        t.mustmatch_singleline = mustmatch
        t.run()
        count += 1

    t.id = "95"
    t.name = "toolchain_macros"
    t.print_result()
    return t
Пример #9
0
def run():
    t = SmokeTest()
    t.description = "test that long commands time out and get retried"

    exitCode = "128"

    t.id = "60a"
    t.name = "timeout"
    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f -"

    t.mustmatch_singleline = [
        "status exit='failed' code='" + exitCode +
        "' attempt='1' reason='timeout'",
    ]
    t.errors = -1
    t.returncode = 1
    t.run()

    t.id = "60b"
    t.name = "timeout with retries"
    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f -"

    t.mustmatch_singleline = [
        "status exit='retry' code='" + exitCode +
        "' attempt='1' reason='timeout'",
        "status exit='retry' code='" + exitCode +
        "' attempt='2' reason='timeout'",
        "status exit='failed' code='" + exitCode +
        "' attempt='3' reason='timeout'",
    ]
    t.errors = -1
    t.returncode = 1
    t.run()

    t.id = "60"
    t.name = "timeout"
    t.print_result()
    return t
Пример #10
0
def run():
	t = SmokeTest()
	t.name = "missing_keywords"

	t.command = "sbs -b smoke_suite/test_resources/invalid_metadata/bld.inf -c armv5"

	t.mustmatch_singleline = [
		"sbs: error: required keyword TARGET is missing"
		]

	t.errors = 1
	t.returncode = 1
	t.run()
	return t
Пример #11
0
def run():
	t = SmokeTest()
	t.description = "test that long commands time out and get retried"
	
	exitCode = "128"

	t.id = "60a"
	t.name = "timeout"
	t.usebash = True
	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f -"

	t.mustmatch_singleline = [
		"status exit='failed' code='" + exitCode + "' attempt='1' reason='timeout'",
	]
	t.errors = -1
	t.returncode = 1
	t.run()
	
	t.id = "60b"
	t.name = "timeout with retries"
	t.usebash = True
	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f -"

	t.mustmatch_singleline = [
		"status exit='retry' code='" + exitCode + "' attempt='1' reason='timeout'",
		"status exit='retry' code='" + exitCode + "' attempt='2' reason='timeout'",
		"status exit='failed' code='" + exitCode + "' attempt='3' reason='timeout'",
	]
	t.errors = -1
	t.returncode = 1
	t.run()
	
	t.id = "60"
	t.name = "timeout"
	t.print_result()
	return t
Пример #12
0
def run():
	t = SmokeTest()
	t.name = "exe_checksource"
	t.description = "Build a exe with a checksource filter"
	t.usebash = True
	
	bldinf = "smoke_suite/test_resources/checksource/helloworld/bld.inf"
	cmd1 = "sbs -b {0} REALLYCLEAN -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(bldinf)
	cmd2 = "sbs -b {0} --filter=FilterCheckSource -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(bldinf)
	cmd3 = "grep -i '.*checksource errors found.*' ${SBSLOGFILE}"
	t.command = cmd1 + " && " + cmd2 + " && " + cmd3

	t.mustmatch_singleline = ["[1-9] checksource errors found"]
	
	t.returncode = 1
	t.run("windows")
	return t
Пример #13
0
def run():
    t = SmokeTest()
    t.name = "exe_checksource"
    t.description = "Build a exe with a checksource filter"
    t.usebash = True

    bldinf = "smoke_suite/test_resources/checksource/helloworld/bld.inf"
    cmd1 = "sbs -b {0} REALLYCLEAN -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(
        bldinf)
    cmd2 = "sbs -b {0} --filter=FilterCheckSource -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(
        bldinf)
    cmd3 = "grep -i '.*checksource errors found.*' ${SBSLOGFILE}"
    t.command = cmd1 + " && " + cmd2 + " && " + cmd3

    t.mustmatch_singleline = ["[1-9] checksource errors found"]

    t.returncode = 1
    t.run("windows")
    return t
Пример #14
0
def run():
	t = SmokeTest()
	t.id = "300"
	t.name = "variantplatforms"
	t.description = "Can all the variant platforms be built at the same time."
	
	variantplatforms = ["armv5", "armv6", "armv7", "arm9e"]
	
	t.usebash = True
	t.command = "sbs -b smoke_suite/test_resources/variantplatforms/bld.inf -f-"
	t.mustmatch_singleline = []
	
	for vp in variantplatforms:
		t.command += " -c " + vp
		t.mustmatch_singleline.append("building variant platform " + vp)

	t.run()
	
	t.print_result()
	return t
Пример #15
0
def run():
    t = SmokeTest()
    t.id = "300"
    t.name = "variantplatforms"
    t.description = "Can all the variant platforms be built at the same time."

    variantplatforms = ["armv5", "armv6", "armv7", "arm9e"]

    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/variantplatforms/bld.inf -f-"
    t.mustmatch_singleline = []

    for vp in variantplatforms:
        t.command += " -c " + vp
        t.mustmatch_singleline.append("building variant platform " + vp)

    t.run()

    t.print_result()
    return t
Пример #16
0
def run():

    t = SmokeTest()
    t.description = "Tests against log files to ensure it 'does the right thing'"

    t.id = "87a"
    t.name = "terminal_filter_tests_log"
    t.command = "$(SBS_HOME)/test/smoke_suite/test_resources/refilter/testfilterterminal"
    t.countmatch = [
        # One of each type of error occurs early in the 'sbs' call where there
        # is a recipe inside another recipe. Then the errors occur in the
        # opposite order where are 2 closing tags next to each other before 2
        # opening tags appear next to each other
        [
            "sbs: error: Opening recipe tag found before closing recipe tag for previous recipe:",
            2
        ],
        ["Discarding previous recipe \(Possible logfile corruption\)", 2],
        ["sbs: error: Closing recipe tag found before opening recipe tag:", 2],
        ["Unable to print recipe data \(Possible logfile corruption\)", 2]
    ]
    t.errors = 4
    t.run()

    t.id = "87b"
    t.name = "terminal_filter_tests_configs"
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf"
    t.countmatch = []
    t.errors = 0
    t.mustmatch_singleline = [
        "built 'armv5_urel'", "built 'armv5_udeb'", "built 'winscw_urel'",
        "built 'winscw_udeb'"
    ]
    t.run()

    t.id = "87"
    t.name = "terminal_filter_tests"
    t.print_result()
    return t
Пример #17
0
def run():
    t = SmokeTest()
    t.id = "113"
    t.name = "make_engine_errors"
    t.description = "Errors reported by gmake and emake should be escaped to ensure that the logs are valid XML"

    t.mustmatch_singleline = [
        "Circular b &lt;- a dependency",
        "non_existent_&amp;_needs_escaping.txt"
    ]

    t.mustnotmatch_singleline = [
        "Circular b <- a dependency", "non_existent_&_needs_escaping.txt"
    ]

    t.usebash = True
    t.errors = 1
    t.returncode = 1
    base_command = "sbs --no-depend-generate -b smoke_suite/test_resources/make_engine_errors/bld.inf -f-"

    t.id = "113a"
    t.name = "gmake_engine_errors"
    t.command = base_command + " -e make"
    t.run()

    t.id = "113b"
    t.name = "emake_engine_errors"
    t.command = base_command + " -e emake"
    t.run()

    t.id = "113c"
    t.name = "emake_engine_errors_with_merged_streams"
    t.command = base_command + " -e emake --mo=--emake-mergestreams=1"
    t.run()

    t.id = "113"
    t.name = "make_engine_errors"
    t.print_result()
    return t
Пример #18
0
def run():

	t = SmokeTest()
	t.description = "Tests against log files to ensure it 'does the right thing'"
	
	t.id = "87a"
	t.name = "terminal_filter_tests_log"
	t.command = "$(SBS_HOME)/test/smoke_suite/test_resources/refilter/testfilterterminal"
	t.countmatch = [
		# One of each type of error occurs early in the 'sbs' call where there
		# is a recipe inside another recipe. Then the errors occur in the
		# opposite order where are 2 closing tags next to each other before 2
		# opening tags appear next to each other
			["sbs: error: Opening recipe tag found before closing recipe tag for previous recipe:", 2],
			["Discarding previous recipe \(Possible logfile corruption\)", 2],
			["sbs: error: Closing recipe tag found before opening recipe tag:", 2],
			["Unable to print recipe data \(Possible logfile corruption\)", 2]
	]
	t.errors = 4
	t.run()
	
	t.id = "87b"
	t.name = "terminal_filter_tests_configs"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf"
	t.countmatch = []
	t.errors = 0
	t.mustmatch_singleline = ["built 'armv5_urel'",
							  "built 'armv5_udeb'",
							  "built 'winscw_urel'",
							  "built 'winscw_udeb'" ]
	t.run()
	
	t.id = "87"
	t.name = "terminal_filter_tests"
	t.print_result()
	return t
Пример #19
0
def run():
	t = SmokeTest()
	t.id = "113"
	t.name = "make_engine_errors"
	t.description = "Errors reported by gmake and emake should be escaped to ensure that the logs are valid XML"
	
	t.mustmatch_singleline = ["Circular b &lt;- a dependency",
							  "non_existent_&amp;_needs_escaping.txt"]
	
	t.mustnotmatch_singleline = ["Circular b <- a dependency",
							     "non_existent_&_needs_escaping.txt"]
	
	t.usebash = True
	t.errors = 1
	t.returncode = 1
	base_command = "sbs --no-depend-generate -b smoke_suite/test_resources/make_engine_errors/bld.inf -f-"
	
	t.id = "113a"
	t.name = "gmake_engine_errors"
	t.command = base_command + " -e make"
	t.run()

	t.id = "113b"
	t.name = "emake_engine_errors"
	t.command = base_command + " -e emake"
	t.run()
	
	t.id = "113c"
	t.name = "emake_engine_errors_with_merged_streams"
	t.command = base_command + " -e emake --mo=--emake-mergestreams=1"
	t.run()
		
	t.id = "113"
	t.name = "make_engine_errors"
	t.print_result()
	return t
Пример #20
0
def run():

    t = SmokeTest()
    t.description = "Test the passing of parameters to log filters"

    command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5_urel --filters="

    # no parameters means count all tags
    t.name = "filter_params_all_tags"
    t.command = command + "FilterTagCounter"
    t.mustmatch_singleline = [
        "^info \d+ \d+", "^whatlog \d+ \d+", "^clean \d+ \d+"
    ]
    t.run()

    # empty parameter lists are valid
    t.name = "filter_params_all_tags2"
    t.command = command + "FilterTagCounter[]"
    t.run()

    # parameters mean report only those tags
    t.name = "filter_params_info"
    t.command = command + "FilterTagCounter[info]"
    t.mustmatch_singleline = ["^info \d+ \d+"]
    t.mustnotmatch_singleline = ["^whatlog \d+ \d+", "^clean \d+ \d+"]
    t.run()

    # multiple parameters are valid
    t.name = "filter_params_info_clean"
    t.command = command + "FilterTagCounter[info,clean]"
    t.mustmatch_singleline = ["^info \d+ \d+", "^clean \d+ \d+"]
    t.mustnotmatch_singleline = ["^whatlog \d+ \d+"]
    t.run()

    # using the same filter with different parameters is valid
    t.name = "filter_params_info_clean2"
    t.command = command + "FilterTagCounter[info],FilterTagCounter[clean]"
    t.run()

    # using the same filter with the same parameters is valid too
    t.name = "filter_params_info_clean3"
    t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]"
    t.run()

    # parameters must work with the sbs_filter script as well

    command = "sbs_filter --filters={0} < smoke_suite/test_resources/logexamples/filter_component.log"
    t.logfileOption = lambda: ""
    t.makefileOption = lambda: ""

    # should still work with no parameters
    t.name = "sbs_filter_no_params"
    t.command = command.format("FilterComp")
    t.mustmatch_singleline = []
    t.mustnotmatch_singleline = [
        "[<>]"  # no elements should be printed at all as no bld.inf is selected
    ]
    t.run()

    # should work with an empty parameter list
    t.name = "sbs_filter_no_params2"
    t.command = command.format("FilterComp[]")
    t.run()

    # with a parameter
    t.name = "sbs_filter_one_param"
    t.command = command.format("FilterComp[email]")
    t.stdout = [
        "<error bldinf='y:/src/email/bld.inf'>email error #1</error>",
        "<error bldinf='y:/src/email/bld.inf'>email error #2</error>",
        "<warning bldinf='y:/src/email/bld.inf'>email warning #1</warning>",
        "<warning bldinf='y:/src/email/bld.inf'>email warning #2</warning>",
        "<whatlog bldinf='y:/src/email/bld.inf' config='armv5_urel' mmp='y:/src/email/a.mmp'>",
        "<build>/epoc32/data/email_1</build>",
        "<build>/epoc32/data/email_2</build>", "</whatlog>",
        "<recipe bldinf='y:/src/email/bld.inf' name='dummy'>", "+ make_email",
        "email was made fine", "<status exit='ok'></status>", "</recipe>",
        "<fake bldinf='y:src/email/bld.inf'>", "  <foo>", "   <bar>",
        "     <fb>fb email</fb>", "   </bar>", " </foo>", "</fake>"
    ]
    t.mustmatch_singleline = []
    t.mustnotmatch_singleline = []
    t.warnings = 2
    t.errors = 2
    t.run()

    # with multiple filters
    t.name = "sbs_filter_multi"
    t.command = command.format("FilterComp[txt],FilterTagCounter[file,recipe]")
    t.stdout = []
    t.mustmatch_singleline = ["txt", "^file \d+", "^recipe \d+"]
    t.mustnotmatch_singleline = ["email"]
    t.warnings = 2
    t.errors = 0
    t.run()

    t.name = "filter_params"
    t.print_result()
    return t
Пример #21
0
def run():
    t = SmokeTest()

    t.id = "51a"
    t.name = "tools2_exe_lib"
    t.command = "sbs -b smoke_suite/test_resources/tools2/bld.inf -c tools2"

    t.targets = [
        "$(EPOCROOT)/epoc32/release/tools2/deb/libtool_lib1.a",
        "$(EPOCROOT)/epoc32/release/tools2/deb/libtool_lib2.a",
        "$(EPOCROOT)/epoc32/release/tools2/deb/tool_exe.exe",
        "$(EPOCROOT)/epoc32/release/tools2/rel/libtool_lib1.a",
        "$(EPOCROOT)/epoc32/release/tools2/rel/libtool_lib2.a",
        "$(EPOCROOT)/epoc32/release/tools2/rel/tool_exe.exe",
        "$(EPOCROOT)/epoc32/tools/tool_exe.exe",
    ]
    t.addbuildtargets(
        "smoke_suite/test_resources/tools2/bld.inf",
        [
            "libtool_lib1_a/libtool_lib1_lib/tools2/rel/tool_lib1_b.o",
            "libtool_lib1_a/libtool_lib1_lib/tools2/rel/tool_lib1_a.o",
            "libtool_lib2_a/libtool_lib2_lib/tools2/rel/tool_lib2_b.o",
            "libtool_lib2_a/libtool_lib2_lib/tools2/rel/tool_lib2_a.o",
            "libtool_lib1_a/libtool_lib1_lib/tools2/deb/tool_lib1_b.o",
            "libtool_lib1_a/libtool_lib1_lib/tools2/deb/tool_lib1_a.o",
            "libtool_lib2_a/libtool_lib2_lib/tools2/deb/tool_lib2_a.o",
            "libtool_lib2_a/libtool_lib2_lib/tools2/deb/tool_lib2_b.o",
            "tool_exe_exe/tool_exe_exe/tools2/rel/tool_exe_a.o",
            "tool_exe_exe/tool_exe_exe/tools2/rel/tool_exe_b.o",
            "tool_exe_exe/tool_exe_exe/tools2/deb/tool_exe_b.o",
            "tool_exe_exe/tool_exe_exe/tools2/deb/tool_exe_a.o",
        ],
    )

    t.run("windows")  # tools2 output is platform dependent

    if t.result == SmokeTest.SKIP:
        t.targets = [
            "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)/deb/tool_exe",
            "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)/deb/libtool_lib1.a",
            "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)/deb/libtool_lib2.a",
            "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)/rel/tool_exe",
            "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)/rel/libtool_lib1.a",
            "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)/rel/libtool_lib2.a",
            "$(EPOCROOT)/epoc32/tools/tool_exe",
        ]
        t.addbuildtargets(
            "smoke_suite/test_resources/tools2/bld.inf",
            [
                "libtool_lib1_a/libtool_lib1_lib/tools2/rel/$(HOSTPLATFORM_DIR)/tool_lib1_b.o",
                "libtool_lib1_a/libtool_lib1_lib/tools2/rel/$(HOSTPLATFORM_DIR)/tool_lib1_a.o",
                "libtool_lib2_a/libtool_lib2_lib/tools2/rel/$(HOSTPLATFORM_DIR)/tool_lib2_b.o",
                "libtool_lib2_a/libtool_lib2_lib/tools2/rel/$(HOSTPLATFORM_DIR)/tool_lib2_a.o",
                "libtool_lib1_a/libtool_lib1_lib/tools2/deb/$(HOSTPLATFORM_DIR)/tool_lib1_b.o",
                "libtool_lib1_a/libtool_lib1_lib/tools2/deb/$(HOSTPLATFORM_DIR)/tool_lib1_a.o",
                "libtool_lib2_a/libtool_lib2_lib/tools2/deb/$(HOSTPLATFORM_DIR)/tool_lib2_a.o",
                "libtool_lib2_a/libtool_lib2_lib/tools2/deb/$(HOSTPLATFORM_DIR)/tool_lib2_b.o",
                "tool_exe_exe/tool_exe_exe/tools2/rel/$(HOSTPLATFORM_DIR)/tool_exe_a.o",
                "tool_exe_exe/tool_exe_exe/tools2/rel/$(HOSTPLATFORM_DIR)/tool_exe_b.o",
                "tool_exe_exe/tool_exe_exe/tools2/deb/$(HOSTPLATFORM_DIR)/tool_exe_b.o",
                "tool_exe_exe/tool_exe_exe/tools2/deb/$(HOSTPLATFORM_DIR)/tool_exe_a.o",
            ],
        )
        t.run("linux")  # tools2 output is platform dependent

    t.id = "51b"
    t.name = "tools2_nohrh"
    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/tools2/bootstrap.inf -c tools2.nohrh -f -"
    t.targets = ["$(EPOCROOT)/epoc32/include/bootstrap_header_abc.h"]
    t.mustmatch_singleline = ["empty\.hrh"]
    t.mustnotmatch_singleline = ["Symbian_OS.hrh", "symbian_os.hrh", "feature_settings.hrh"]
    t.run()

    t.id = "51"
    t.name = "tools2"
    t.print_result()
    return t
Пример #22
0
def run():
	t = SmokeTest()
	t.description = "This testcase tests all mmp keywords including new implementation of 'paged/unpaged code/data'"
	t.usebash = True
	
	t.name = "mmp_paging_keywords"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/shutdownsrv.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/shutdownsrv.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/shutdownsrv.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/shutdownsrv.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/lib/exportlibrary_shutdownsrv.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/exportlibrary_shutdownsrv{000a0000}.dso",
	]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp1/group/bld.inf", [
		"shutdownsrv_dll/armv5/udeb/shutdownsrv.o",
		"shutdownsrv_dll/armv5/urel/shutdownsrv.o",
		"shutdownsrv_dll/armv5/udeb/shutdownsrvpatchdata.o",
		"shutdownsrv_dll/armv5/urel/shutdownsrvpatchdata.o",
		"shutdownsrv_dll/armv5/udeb/shutdowntimer.o",
		"shutdownsrv_dll/armv5/urel/shutdowntimer.o"
		])
	t.mustmatch = [
		".*elf2e32.*(--defaultpaged|--codepaging=default.*--datapaging=default).*",
		".*armlink.*--verbose.*"
	]
	t.run()

	t.name = "mmp_option_armcc_and_armasm"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp2/group/bld.inf -c armv5 -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/imageprocessorperf.lib",
		"$(EPOCROOT)/epoc32/release/armv5/urel/imageprocessorperf.lib"		
	]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp2/group/bld.inf", [
		"imageprocessorperf_lib/armv5/udeb/ColorConverter.o",
		"imageprocessorperf_lib/armv5/urel/ColorConverter.o",
		"imageprocessorperf_lib/armv5/udeb/ImageProcessor.o",
		"imageprocessorperf_lib/armv5/urel/ImageProcessor.o"
		])
	t.mustmatch = [
		".*armcc.*-O0.*-g.*--cpu 6.*-Otime.*",
		".*armcc.*-O3.*--cpu 6.*-Otime.*",
		".*OPTION ARMASM has no effect.*",
		".*OPTION_REPLACE ARMASM has no effect.*"
	]
	t.mustnotmatch = [
		".*armcc.*--export_all_vtbl.*"
	]
	t.warnings = 2
	t.run()
	
	t.name = "mmp_option_gcce_linkeroption_gcce"
	t.command = "sbs -b smoke_suite/test_resources/mmp/options/bld.inf -c arm.v5.urel.gcce4_4_1.release_gcce -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/gcce/urel/test.exe",
	]
	t.mustmatch = []
	t.mustmatch_singleline = [
		".*g\+\+.*-c.*-O3.*-fvisibility-inlines-hidden.*",
		".*g\+\+.* -Wl,--verbose -Wl,-pie .*"
	]
	t.mustnotmatch = [
		".*g\+\+.*-c.* -Wl,--verbose -Wl,-pie .*"
	]
	t.warnings = 0 
	t.run()
	
	# LINKEROPTION CW can impact DLL (and variants), EXE and LIB TARGETTYPEs in different ways
	# We ensure we have enough build coverage to cover all linker calls constructed in the win32 FLM
	t.name = "mmp_option_cw_linkeroption_cw"
	t.command = "sbs -b smoke_suite/test_resources/mmp/options/bld.inf -c winscw_urel -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/winscw/urel/test.exe",
	]
	t.mustmatch = []
	t.mustmatch_singleline = []
	t.countmatch = [
		[".*mwccsym2.*-relax_pointers.*-O2", 5],
		[".*mwldsym2.*-zerobss.*-export none", 2],
		[".*mwldsym2.*-zerobss.*-fold all", 2]
	]	
	t.warnings = 0
	t.run()
	
	t.countmatch = []
	
	t.name = "mmp_debuglibrary"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp3/bld.inf -c armv5 -c winscw -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/tbm.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/tbm.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/tbm.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/tbm.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/t_oom.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/t_oom.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/t_oom.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/t_oom.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dfpaeabi_vfpv2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dfpaeabi_vfpv2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/dfpaeabi_vfpv2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/dfpaeabi_vfpv2.dll.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_oom.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_oom.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/t_oom.exe"
		]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp3/bld.inf", [
		"tbm_exe/armv5/udeb/tbm.o",
		"tbm_exe/armv5/urel/tbm.o",
		"t_oom_exe/armv5/udeb/t_oom.o",
		"t_oom_exe/armv5/urel/t_oom.o",
		"dfpaeabi_vfpv2_dll/armv5/udeb/dfpaeabi.o",
		"dfpaeabi_vfpv2_dll/armv5/urel/dfpaeabi.o",
		"t_oom_exe/winscw/udeb/t_oom.o",
		"t_oom_exe/winscw/udeb/t_oom_UID_.o",
		"t_oom_exe/winscw/urel/t_oom.o",
		"t_oom_exe/winscw/urel/t_oom_UID_.o"
		])
	t.mustmatch = [
		".*armlink.*udeb/eexe.lib.*-o.*armv5/udeb/t_oom.exe.sym.*euser.dso.*efsrv.dso.*estor.dso.*euser.dso.*",
		".*armlink.*urel/eexe.lib.*-o.*armv5/urel/t_oom.exe.sym.*euser.dso.*efsrv.dso.*euser.dso.*",
		".*mwldsym2.*udeb/eexe.lib.*euser.lib.*efsrv.lib.*estor.lib.*euser.lib.*-o.*winscw/udeb/t_oom.exe.*",
		".*mwldsym2.*urel/eexe.lib.*euser.lib.*efsrv.lib.*euser.lib.*-o.*winscw/urel/t_oom.exe.*"
		]
	t.mustnotmatch = []
	t.warnings = 0
	t.run()
	
	t.name = "mmp_basedefault"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp4/group/bld.inf -c winscw"
	t.targets = [			
		"$(EPOCROOT)/epoc32/release/winscw/udeb/d_newldd.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/urel/d_newldd.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/d_lddturnaroundtimertest.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/urel/d_lddturnaroundtimertest.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/urel/d_lddturnaroundtimertest.ldd.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/t_sharedio3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_sharedio3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_sharedio3.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/t_rbuf.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_rbuf.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_rbuf.exe.map"
		]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp4/group/bld.inf", [
		"d_newldd_ldd/winscw/udeb/d_newldd.o",
		"d_newldd_ldd/winscw/udeb/d_newldd.UID.CPP",
		"d_newldd_ldd/winscw/udeb/d_newldd_UID_.o",
		"d_newldd_ldd/winscw/urel/d_newldd.o",
		"d_newldd_ldd/winscw/urel/d_newldd.UID.CPP",
		"d_newldd_ldd/winscw/urel/d_newldd_UID_.o",
		"d_newldd_ldd/winscw/udeb/t_new_classes.o",
		"d_newldd_ldd/winscw/urel/t_new_classes.o",
		"d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest.o",
		"d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest.UID.CPP",
		"d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest_UID_.o",
		"d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest.o",
		"d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest.UID.CPP",
		"d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest_UID_.o",
		"t_sharedio3_exe/winscw/udeb/t_sharedio.o",
		"t_sharedio3_exe/winscw/udeb/t_sharedio3.UID.CPP",
		"t_sharedio3_exe/winscw/udeb/t_sharedio3_UID_.o",
		"t_sharedio3_exe/winscw/urel/t_sharedio.o",
		"t_sharedio3_exe/winscw/urel/t_sharedio3.UID.CPP",
		"t_sharedio3_exe/winscw/urel/t_sharedio3_UID_.o",
		"t_rbuf_exe/winscw/udeb/t_rbuf.o",
		"t_rbuf_exe/winscw/udeb/t_rbuf.UID.CPP",
		"t_rbuf_exe/winscw/udeb/t_rbuf_UID_.o",
		"t_rbuf_exe/winscw/urel/t_rbuf.o",
		"t_rbuf_exe/winscw/urel/t_rbuf.UID.CPP",
		"t_rbuf_exe/winscw/urel/t_rbuf_UID_.o"
		])
	t.mustmatch = []
	t.run()
	
	# Test keywords: version, firstlib, nocompresstarget
	t.name = "mmp_version_firstlib_nocompresstarget"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp5/bld.inf -c armv5"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/fuzzv5.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/fuzzv5.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/fuzzlib.lib",
		"$(EPOCROOT)/epoc32/release/armv5/urel/fuzzlib.lib"
		]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp5/bld.inf", [
		"fuzzv5_exe/armv5/udeb/fuzzv5.o",
		"fuzzv5_exe/armv5/urel/fuzzv5.o",
		"fuzzlib_lib/armv5/udeb/uc_exe_.cpp",
		"fuzzlib_lib/armv5/urel/uc_exe_.cpp",
		"fuzzlib_lib/armv5/udeb/uc_exe_.o",
		"fuzzlib_lib/armv5/urel/uc_exe_.o",
		])
	t.run()

	t.name = "mmp_diagsuppress_armlibs"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp6_7/bld.inf -c armv5 -k -p diagsuppress.mmp -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_test.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_test.dll",
		]
	t.mustmatch = [
					"--diag_suppress 6780",
					"--diag_suppress 6331"
					]
	t.run()
	
	t.name = "mmp_diagsuppress_no_armlibs"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp6_7/bld.inf -c armv5 -k -p diagsuppress_noarmlibs.mmp -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_noarmlibs_test.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_noarmlibs_test.dll"
		]
	t.mustmatch = ["--diag_suppress 6331"]
	t.mustnotmatch = ["--diag_suppress 6780"]
	t.run()

	# Test keyword: version
	t.name = "mmp_version_keyword"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp8/bld.inf"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_mmp_version.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_mmp_version.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_mmp_version.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test_mmp_version.exe"
		]
	t.mustmatch = []
	t.mustnotmatch = []
	t.warnings = 2
	t.run()

	# Test keyword: armfpu softvfp|vfpv2
	# Both armv5 RVCT and GCCE builds are covered, as they differ in behaviour.
	t.name = "mmp_armfpu_softvfp_rvct"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_soft.mmp -c armv5_urel -f-"			
	t.targets = []
	t.mustmatch = ["--fpu softvfp", "--fpu=softvfp"]
	t.mustnotmatch = ["--fpu vfpv2", "--fpu softvfp\+", "--fpu=vfpv2", "--fpu=softvfp\+"]
	t.warnings = 0
	t.run()
		
	t.name = "mmp_armfpu_vfpv2_rvct"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_vfpv2.mmp -c armv5_urel -f-"

	t.mustmatch = ["--fpu vfpv2", "--fpu=vfpv2"]
	t.mustnotmatch = ["--fpu softvfp", "--fpu=softvfp"]	
	t.run()
	
	t.name = "mmp_armfpu_softvfp+vfpv2_rvct"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p \"armfpu_soft+vfpv2.mmp\" -c armv5_urel -f-"

	t.mustmatch = ["--fpu softvfp\+vfpv2", "--fpu=vfpv2"]
	t.mustnotmatch = ["--fpu vfpv2", "--fpu softvfp ", "--fpu=softvfp"]
	t.run()

	t.name = "mmp_armfpu_softvfp+vfpv2_gcce"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf  -c armv5_urel_gcce4_3_2 REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel_gcce4_3_2 -f-"
	t.countmatch = [
		["-mfloat-abi=soft", 3],
		["--fpu=softvfp", 3] # gcce doesn't vary according to ARMFPU currently
	]
	t.mustmatch = []
	t.mustnotmatch = ["--fpu=vfpv2", "--fpu=softvfp\+"]
	t.run()
	
	t.name = "mmp_armfpu_softvfp+vfpv3_rvct"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf -c arm.v5.urel.rvct4_0 REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf -c arm.v5.urel.rvct4_0 -f- --mo=-n"
	t.countmatch = [
		["elf2e32.*--fpu=vfpv3", 1],
		["armcc.*--fpu.softvfp\+vfpv3", 1]
	]
	t.mustmatch = []
	t.mustnotmatch = ["--fpu=vfpv2", "--fpu=softvfp\+"]
	t.run()
	
	t.name = "mmp_armfpu_softvfp+vfpv3_gcce"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf  -c armv5_urel_gcce4_4_1 REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf -c armv5_urel_gcce4_4_1 -f- --mo=-n"
	t.countmatch = [
		["g\+\+.*-mfloat-abi=soft", 1],
		["elf2e32.*--fpu=softvfp", 1] # gcce doesn't vary according to ARMFPU currently
	]
	t.mustmatch = []
	t.mustnotmatch = ["--fpu=vfpv2", "--fpu=softvfp\+"]
	t.run()
	
	# Test keywords: compresstarget, nocompresstarget, bytepaircompresstarget, inflatecompresstarget
	t.name = "mmp_byte_compression_target_keywords"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp11/bld.inf -c armv5_urel -f-"
	t.mustmatch_singleline = [
		"elf2e32.*--output.*\/compress\.exe.*--compressionmethod=inflate",
		"elf2e32.*--output.*\/nocompress\.exe.*--uncompressed",
		"elf2e32.*--output.*\/bytepaircompress\.exe.*--compressionmethod=bytepair",
		"elf2e32.*--output.*\/inflatecompress\.exe.*--compressionmethod=inflate",
		"elf2e32.*--output.*\/combinedcompress\.exe.*--compressionmethod=bytepair",		
		"COMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of NOCOMPRESSTARGET",
		"INFLATECOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of COMPRESSTARGET",
		"BYTEPAIRCOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of INFLATECOMPRESSTARGET"
	]
	t.countmatch = []
	t.mustnotmatch = []
	t.warnings = 3
	t.run()

	# Test keyword: APPLY
	t.name = "mmp_apply"
	t.command = "sbs -b smoke_suite/test_resources/mmp/apply/bld.inf -f- -k --configpath=test/config"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_mmp_apply.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_mmp_apply.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_mmp_apply.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test_mmp_apply.exe"
		]
	t.mustmatch_singleline = ["-DAPPLYTESTEXPORTEDVAR",
	                          "-DAPPLYTESTAPPENDCDEFS",
	                          "-DSINGLE=1",
	                          "-DDOUBLE"]
	t.countmatch = [["<error.*APPLY unknown variant 'no_such_var'", 2],
				    ["<error.*MACRO names cannot start with a digit '2'", 2]]
	t.errors = 2 # no_such_var for armv5 and winscw
	t.errors += 2 # macro '2' error for armv5 and winscw
	t.warnings = 0
	t.returncode = 1
	t.run()

	# Test keyword: EPOCNESTEDEXCEPTIONS
	t.name = "mmp_epocnestedexceptions"
	t.command = "sbs -b smoke_suite/test_resources/mmp/epocnestedexceptions/bld.inf -c armv5_udeb -f-"

	# When EPOCNESTEDEXCEPTIONS is specified in the MMP file, a different static
	# run-time library should be used.
	t.mustmatch_singleline = ["usrt_nx_\d_\d\.lib"]
	t.mustnotmatch = ["usrt._.."]

	t.countmatch = []

	# The new static run-time libraries don't yet exist.
	t.errors = 1
	t.warnings = 1
	t.targets = []

	t.run()
	
	# Test keyword: DOCUMENT
	t.name = "mmp_keyword_document"
	# Note: in t.command, the makefile is cat'd through sed to remove the .DEFAULT double-colon rule's <warning> tag to ensure that t.run succeeds.
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 reallyclean; " + \
				"sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf --no-depend-generate -c armv5_urel -m ${SBSMAKEFILE}; " + \
				"cat ${SBSMAKEFILE}_all.default"
	
	t.mustmatch_singleline = ["DOCUMENT:=.*test/smoke_suite/test_resources/mmp/mmp1/src/file01\.txt\\s+.*test/smoke_suite/test_resources/mmp/mmp1/src/file02\.txt"]
	t.mustnotmatch = []
	t.countmatch = []
	
	t.errors = 0
	t.warnings = 0
	t.returncode = 0
	t.targets = []
	
	t.run()
	
	t.name = "mmp_keywords"
	t.print_result()
	return t
Пример #23
0
def run():
    t = SmokeTest()
    t.name = "unfrozen"
    t.description = "Test EXPORTUNFROZEN forced import library generation with both completely unfrozen and part-frozen examples"
    t.command = "sbs -b smoke_suite/test_resources/unfrozen/bld.inf -k -c winscw -c armv5 CLEAN" \
       " && sbs -b smoke_suite/test_resources/unfrozen/bld.inf -k -c winscw -c armv5"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2.dso",
        "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2{000a0000}.dso",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll",
        "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll",
        "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols3.dll",
        "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols3.dll.map",
        "$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.map",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.dll",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.lib",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.dll",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.lib",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols3.dll",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/test_unfrozen.exe"
    ]
    t.addbuildtargets('smoke_suite/test_resources/unfrozen/bld.inf', [
        "unfrozensymbols_dll/armv5/urel/unfrozensymbols{000a0000}.def",
        "unfrozensymbols_dll/armv5/urel/unfrozensymbols{000a0000}.dso",
        "unfrozensymbols_dll/armv5/urel/unfrozensymbols_urel_objects.via",
        "unfrozensymbols_dll/armv5/urel/unfrozensymbols.o.d",
        "unfrozensymbols_dll/armv5/urel/unfrozensymbols.o",
        "unfrozensymbols2_dll/armv5/urel/unfrozensymbols2{000a0000}.def",
        "unfrozensymbols2_dll/armv5/urel/unfrozensymbols2{000a0000}.dso",
        "unfrozensymbols2_dll/armv5/urel/unfrozensymbols2_urel_objects.via",
        "unfrozensymbols3_dll/armv5/urel/unfrozensymbols3{000a0000}.def",
        "unfrozensymbols3_dll/armv5/urel/unfrozensymbols3{000a0000}.dso",
        "unfrozensymbols3_dll/armv5/urel/unfrozensymbols3_urel_objects.via",
        "unfrozensymbols2_dll/armv5/urel/unfrozensymbols.o.d",
        "unfrozensymbols2_dll/armv5/urel/unfrozensymbols.o",
        "unfrozensymbols3_dll/armv5/urel/unfrozensymbols.o.d",
        "unfrozensymbols3_dll/armv5/urel/unfrozensymbols.o",
        "test_unfrozen_/armv5/urel/test_unfrozen_urel_objects.via",
        "test_unfrozen_/armv5/urel/test.o.d",
        "test_unfrozen_/armv5/urel/test.o",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.UID.CPP",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.o",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.o",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.dep",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.dep",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.o.d",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.o.d",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.lib",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.inf",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.dll",
        "unfrozensymbols_dll/winscw/urel/unfrozensymbols.def",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.UID.CPP",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols.o",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.o",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols.dep",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.dep",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols.o.d",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.o.d",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.lib",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.inf",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.dll",
        "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.def",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.UID.CPP",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols.o",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.o",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols.dep",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.dep",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols.o.d",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.o.d",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.lib",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.inf",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.dll",
        "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.def",
        "test_unfrozen_/winscw/urel/test_unfrozen.UID.CPP",
        "test_unfrozen_/winscw/urel/test.o",
        "test_unfrozen_/winscw/urel/test_unfrozen_UID_.o",
        "test_unfrozen_/winscw/urel/test.dep",
        "test_unfrozen_/winscw/urel/test_unfrozen_UID_.dep",
        "test_unfrozen_/winscw/urel/test.o.d",
        "test_unfrozen_/winscw/urel/test_unfrozen_UID_.o.d",
        "unfrozensymbols_dll/armv5/udeb/unfrozensymbols{000a0000}.def",
        "unfrozensymbols_dll/armv5/udeb/unfrozensymbols{000a0000}.dso",
        "unfrozensymbols_dll/armv5/udeb/unfrozensymbols_udeb_objects.via",
        "unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o.d",
        "unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o",
        "unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o",
        "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2{000a0000}.def",
        "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2{000a0000}.dso",
        "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2_udeb_objects.via",
        "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o.d",
        "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o",
        "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o",
        "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3{000a0000}.def",
        "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3{000a0000}.dso",
        "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3_udeb_objects.via",
        "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o.d",
        "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o",
        "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o",
        "test_unfrozen_/armv5/udeb/test_unfrozen_udeb_objects.via",
        "test_unfrozen_/armv5/udeb/test.o.d",
        "test_unfrozen_/armv5/udeb/test.o",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.UID.CPP",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.o",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.o",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.dep",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.dep",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.o.d",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.o.d",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.lib",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.inf",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.dll",
        "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.def",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.UID.CPP",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.o",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.o",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.dep",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.dep",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.o.d",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.o.d",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.lib",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.inf",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.dll",
        "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.def",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.UID.CPP",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.o",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.o",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.dep",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.dep",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.o.d",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.o.d",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.lib",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.inf",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.dll",
        "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.def",
        "test_unfrozen_/winscw/udeb/test_unfrozen.UID.CPP",
        "test_unfrozen_/winscw/udeb/test.o",
        "test_unfrozen_/winscw/udeb/test_unfrozen_UID_.o",
        "test_unfrozen_/winscw/udeb/test.dep",
        "test_unfrozen_/winscw/udeb/test_unfrozen_UID_.dep",
        "test_unfrozen_/winscw/udeb/test.o.d",
        "test_unfrozen_/winscw/udeb/test_unfrozen_UID_.o.d"
    ])
    # Match both ARMV5 (elf2e32) and WINSCW (makedef) unfrozen export warnings and confirm the number found.  Format:
    # Elf2e32: Warning: New Symbol _ZN10CMessenger5NewLCER12CConsoleBaseRK7TDesC16 found, export(s) not yet Frozen
    # F:/path/epocroot/epoc32/build/unfrozen/c_939fe933110ed5aa/unfrozensymbols_dll/winscw/udeb/unfrozensymbols.def(3) : ?NewLC@CMessenger@@SAPAV1@AAVCConsoleBase@@ABVTDesC16@@@Z @1
    # More matches are expected with elf2e32 due to extra build impedimenta in EABI builds.
    t.countmatch = [[
        ".*Elf2e32: Warning: New Symbol .* found, export\(s\) not yet Frozen.*",
        26
    ], [".*\.def\(\d\) : .*@\d.*", 18]]
    t.mustmatch_singleline = [
        "Import library generation suppressed as frozen .def file not present: .*smoke_suite/test_resources/bwins/unfrozensymbols3u.def",
        "Import library generation suppressed as frozen .def file not present: .*smoke_suite/test_resources/eabi/unfrozensymbols3u.def"
    ]
    t.warnings = 8
    # ABIv1 .lib files are not generated on Linux
    t.run()

    return t
Пример #24
0
def run():
    t = SmokeTest()

    t.description = """Test toolcheck works properly, with 3 options: on, off and forced. 
				TOOL 1, 3, 4 and 5 are expected to fail whilst 2, 6 and 7 pass.
				Also test Raptor self version check."""
    toolcheckDir = os.environ["SBS_HOME"].replace(
        "\\", "/") + "/test/smoke_suite/test_resources/toolcheck"

    # toolcheck ON
    t.name = "toolcheck_on"
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
      " -c default.toolcheck --toolcheck=on"

    t.mustmatch = [
        ".*tool 'TOOLCHECK1' from config 'none' did not return version.*",
        ".*tool 'TOOLCHECK3' from config 'none' did not return version.*",
        ".*tool 'TOOLCHECK4' from config 'none' did not return version.*",
        ".*tool 'TOOLCHECK5' from config 'none' did not return version.*"
    ]
    t.mustnotmatch = [".*TOOLCHECK2.*", ".*TOOLCHECK6.*", ".*TOOLCHECK7.*"]
    t.errors = 7
    t.returncode = 1
    t.run()

    # toolcheck OFF
    t.name = "toolcheck_off"
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
      " -c default.toolcheck --toolcheck=off"

    t.mustmatch = []
    t.mustnotmatch = [
        ".*TOOLCHECK1.*", ".*TOOLCHECK3.*", ".*TOOLCHECK4.*", ".*TOOLCHECK5.*",
        ".*TOOLCHECK6.*", ".*TOOLCHECK7.*"
    ]
    t.errors = 0
    t.returncode = 0
    t.run()

    # force toolcheck
    t.name = "toolcheck_force"
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
      " -c default.toolcheck --toolcheck=forced"

    t.mustmatch = [
        ".*tool 'TOOLCHECK1' from config 'none' did not return version.*",
        ".*tool 'TOOLCHECK3' from config 'none' did not return version.*",
        ".*tool 'TOOLCHECK4' from config 'none' did not return version.*",
        ".*tool 'TOOLCHECK5' from config 'none' did not return version.*"
    ]
    t.mustnotmatch = [".*TOOLCHECK2.*", ".*TOOLCHECK6.*", ".*TOOLCHECK7.*"]
    t.errors = 16
    t.returncode = 1
    t.run()

    # Raptor self version check
    t.name = "raptor_self_version_check"
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
      " -c default.self_version_check"
    t.mustmatch = []
    t.mustmatch_singleline = [
        "sbs: error: tool 'SBS' from config 'none' did not return version \'2\\\.99\\\.\[0-9\]\+\' as required\\.",
        "Command '.*sbs.* --version' returned:",
        "Check your environment and configuration: This version of Raptor is not suitable "
        + "for this SDK. Minimum version required is 2.99.0."
    ]
    t.mustnotmatch = []
    t.errors = 1
    t.returncode = 1
    t.run()

    t.name = "toolcheck"
    t.print_result()
    return t
Пример #25
0
def run():
	t = SmokeTest()
	t.name = "unfrozen"
	t.description = "Test EXPORTUNFROZEN forced import library generation with both completely unfrozen and part-frozen examples"
	t.command = "sbs -b smoke_suite/test_resources/unfrozen/bld.inf -k -c winscw -c armv5 CLEAN" \
				" && sbs -b smoke_suite/test_resources/unfrozen/bld.inf -k -c winscw -c armv5"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.map",	
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols3.dll",
		"$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols3.dll.map",	
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.dll",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.lib",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.dll",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.lib",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols3.dll",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test_unfrozen.exe"
		]
	t.addbuildtargets('smoke_suite/test_resources/unfrozen/bld.inf', [
		"unfrozensymbols_dll/armv5/urel/unfrozensymbols{000a0000}.def",
		"unfrozensymbols_dll/armv5/urel/unfrozensymbols{000a0000}.dso",
		"unfrozensymbols_dll/armv5/urel/unfrozensymbols_urel_objects.via",
		"unfrozensymbols_dll/armv5/urel/unfrozensymbols.o.d",
		"unfrozensymbols_dll/armv5/urel/unfrozensymbols.o",
		"unfrozensymbols2_dll/armv5/urel/unfrozensymbols2{000a0000}.def",
		"unfrozensymbols2_dll/armv5/urel/unfrozensymbols2{000a0000}.dso",
		"unfrozensymbols2_dll/armv5/urel/unfrozensymbols2_urel_objects.via",
		"unfrozensymbols3_dll/armv5/urel/unfrozensymbols3{000a0000}.def",
		"unfrozensymbols3_dll/armv5/urel/unfrozensymbols3{000a0000}.dso",
		"unfrozensymbols3_dll/armv5/urel/unfrozensymbols3_urel_objects.via",
		"unfrozensymbols2_dll/armv5/urel/unfrozensymbols.o.d",
		"unfrozensymbols2_dll/armv5/urel/unfrozensymbols.o",
		"unfrozensymbols3_dll/armv5/urel/unfrozensymbols.o.d",
		"unfrozensymbols3_dll/armv5/urel/unfrozensymbols.o",
		"test_unfrozen_/armv5/urel/test_unfrozen_urel_objects.via",
		"test_unfrozen_/armv5/urel/test.o.d",
		"test_unfrozen_/armv5/urel/test.o",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.UID.CPP",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.o",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.o",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.dep",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.dep",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.o.d",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.o.d",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.lib",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.inf",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.dll",
		"unfrozensymbols_dll/winscw/urel/unfrozensymbols.def",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.UID.CPP",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols.o",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.o",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols.dep",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.dep",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols.o.d",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.o.d",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.lib",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.inf",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.dll",
		"unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.def",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.UID.CPP",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols.o",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.o",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols.dep",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.dep",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols.o.d",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.o.d",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.lib",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.inf",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.dll",
		"unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.def",		
		"test_unfrozen_/winscw/urel/test_unfrozen.UID.CPP",
		"test_unfrozen_/winscw/urel/test.o",
		"test_unfrozen_/winscw/urel/test_unfrozen_UID_.o",
		"test_unfrozen_/winscw/urel/test.dep",
		"test_unfrozen_/winscw/urel/test_unfrozen_UID_.dep",
		"test_unfrozen_/winscw/urel/test.o.d",
		"test_unfrozen_/winscw/urel/test_unfrozen_UID_.o.d",
		"unfrozensymbols_dll/armv5/udeb/unfrozensymbols{000a0000}.def",
		"unfrozensymbols_dll/armv5/udeb/unfrozensymbols{000a0000}.dso",
		"unfrozensymbols_dll/armv5/udeb/unfrozensymbols_udeb_objects.via",
		"unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o.d",
		"unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o",
		"unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o",
		"unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2{000a0000}.def",
		"unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2{000a0000}.dso",
		"unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2_udeb_objects.via",
		"unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o.d",
		"unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o",
		"unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o",
		"unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3{000a0000}.def",
		"unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3{000a0000}.dso",
		"unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3_udeb_objects.via",
		"unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o.d",
		"unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o",
		"unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o",					
		"test_unfrozen_/armv5/udeb/test_unfrozen_udeb_objects.via",
		"test_unfrozen_/armv5/udeb/test.o.d",
		"test_unfrozen_/armv5/udeb/test.o",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.UID.CPP",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.o",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.o",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.dep",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.dep",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.o.d",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.o.d",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.lib",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.inf",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.dll",
		"unfrozensymbols_dll/winscw/udeb/unfrozensymbols.def",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.UID.CPP",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.o",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.o",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.dep",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.dep",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.o.d",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.o.d",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.lib",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.inf",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.dll",
		"unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.def",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.UID.CPP",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.o",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.o",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.dep",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.dep",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.o.d",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.o.d",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.lib",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.inf",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.dll",
		"unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.def",						
		"test_unfrozen_/winscw/udeb/test_unfrozen.UID.CPP",
		"test_unfrozen_/winscw/udeb/test.o",
		"test_unfrozen_/winscw/udeb/test_unfrozen_UID_.o",
		"test_unfrozen_/winscw/udeb/test.dep",
		"test_unfrozen_/winscw/udeb/test_unfrozen_UID_.dep",
		"test_unfrozen_/winscw/udeb/test.o.d",
		"test_unfrozen_/winscw/udeb/test_unfrozen_UID_.o.d"
	])
	# Match both ARMV5 (elf2e32) and WINSCW (makedef) unfrozen export warnings and confirm the number found.  Format:
	# Elf2e32: Warning: New Symbol _ZN10CMessenger5NewLCER12CConsoleBaseRK7TDesC16 found, export(s) not yet Frozen
	# F:/path/epocroot/epoc32/build/unfrozen/c_939fe933110ed5aa/unfrozensymbols_dll/winscw/udeb/unfrozensymbols.def(3) : ?NewLC@CMessenger@@SAPAV1@AAVCConsoleBase@@ABVTDesC16@@@Z @1
	# More matches are expected with elf2e32 due to extra build impedimenta in EABI builds.
	t.countmatch = [
				[".*Elf2e32: Warning: New Symbol .* found, export\(s\) not yet Frozen.*", 26],
				[".*\.def\(\d\) : .*@\d.*", 18]
				]
	t.mustmatch_singleline = [
				"Import library generation suppressed as frozen .def file not present: .*smoke_suite/test_resources/bwins/unfrozensymbols3u.def",
				"Import library generation suppressed as frozen .def file not present: .*smoke_suite/test_resources/eabi/unfrozensymbols3u.def"
				]
	t.warnings = 8
	# ABIv1 .lib files are not generated on Linux
	t.run()
	
	return t
Пример #26
0
def run():
	
	t = SmokeTest()
	t.description = "Test the passing of parameters to log filters"
	
	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5_urel --filters="
	
	# no parameters means count all tags	
	t.name = "filter_params_all_tags"
	t.command = command + "FilterTagCounter"
	t.mustmatch_singleline = [
		"^info \d+ \d+",
		"^whatlog \d+ \d+",
		"^clean \d+ \d+"	
		]
	t.run()
	
	# empty parameter lists are valid
	t.name = "filter_params_all_tags2"
	t.command = command + "FilterTagCounter[]"
	t.run()
	
	# parameters mean report only those tags	
	t.name = "filter_params_info"
	t.command = command + "FilterTagCounter[info]"
	t.mustmatch_singleline = [
		"^info \d+ \d+"
		]
	t.mustnotmatch_singleline = [
		"^whatlog \d+ \d+",
		"^clean \d+ \d+"	
		]
	t.run()
	
	# multiple parameters are valid	
	t.name = "filter_params_info_clean"
	t.command = command + "FilterTagCounter[info,clean]"
	t.mustmatch_singleline = [
		"^info \d+ \d+",
		"^clean \d+ \d+"
		]
	t.mustnotmatch_singleline = [
		"^whatlog \d+ \d+"
		]
	t.run()
	
	# using the same filter with different parameters is valid
	t.name = "filter_params_info_clean2"
	t.command = command + "FilterTagCounter[info],FilterTagCounter[clean]"
	t.run()
	
	# using the same filter with the same parameters is valid too
	t.name = "filter_params_info_clean3"
	t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]"
	t.run()
	
	
	# parameters must work with the sbs_filter script as well
	
	command = "sbs_filter --filters=%s < smoke_suite/test_resources/logexamples/filter_component.log"
	t.logfileOption = lambda :""
	t.makefileOption = lambda :""

	# should still work with no parameters
	t.name = "sbs_filter_no_params"
	t.command = command % "FilterComp"
	t.mustmatch_singleline = [
		]
	t.mustnotmatch_singleline = [
		"[<>]" # no elements should be printed at all as no bld.inf is selected
		]
	t.run()
	
	# should work with an empty parameter list
	t.name = "sbs_filter_no_params2"
	t.command = command % "FilterComp[]"
	t.run()
	
	# with a parameter
	t.name = "sbs_filter_one_param"
	t.command = command % "FilterComp[email]"
	t.stdout = [
		"<error bldinf='y:/src/email/bld.inf'>email error #1</error>",
		"<error bldinf='y:/src/email/bld.inf'>email error #2</error>",
		"<warning bldinf='y:/src/email/bld.inf'>email warning #1</warning>",
		"<warning bldinf='y:/src/email/bld.inf'>email warning #2</warning>",
		"<whatlog bldinf='y:/src/email/bld.inf' config='armv5_urel' mmp='y:/src/email/a.mmp'>",
		"<build>/epoc32/data/email_1</build>",
		"<build>/epoc32/data/email_2</build>",
		"</whatlog>",
		"<recipe bldinf='y:/src/email/bld.inf' name='dummy'>",
		"+ make_email",
		"email was made fine",
		"<status exit='ok'></status>",
		"</recipe>",
		"<fake bldinf='y:src/email/bld.inf'>",
		"  <foo>",
		"   <bar>",
		"     <fb>fb email</fb>",
		"   </bar>",
		" </foo>",
		"</fake>"
		]
	t.mustmatch_singleline = []
	t.mustnotmatch_singleline = []
	t.warnings = 2
	t.errors = 2
	t.run()
	
	# with multiple filters
	t.name = "sbs_filter_multi"
	t.command = command % "FilterComp[txt],FilterTagCounter[file,recipe]"
	t.stdout = []
	t.mustmatch_singleline = [ "txt", "^file \d+", "^recipe \d+" ]
	t.mustnotmatch_singleline = [ "email" ]
	t.warnings = 2
	t.errors = 0
	t.run()
	
	t.name = "filter_params"
	t.print_result()
	return t
Пример #27
0
def run():

    t = SmokeTest()
    t.usebash = True

    cmd_prefix = "sbs -b smoke_suite/test_resources/simple_paging/bld.inf -c armv5_urel "
    cmd_suffix = " -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && cat ${SBSLOGFILE} "

    t.name = "paging_default"
    t.command = cmd_prefix + "-p default.mmp" + cmd_suffix
    t.mustmatch_singleline = ["--codepaging=default", "--datapaging=default"]
    t.run()

    t.name = "paging_unpaged"
    t.command = cmd_prefix + "-p unpaged.mmp" + cmd_suffix
    t.mustmatch_singleline = ["--codepaging=unpaged", "--datapaging=unpaged"]
    t.run()

    # these tests have no "compression" keywords so we are testing that the right
    # defaults are used.
    #
    # PAGEDCODE implies BYTEPAIRCOMPRESSTARGET
    # UNPAGEDCODE implies INFLATECOMPRESSTARGET

    t.name = "paging_paged"
    t.command = cmd_prefix + "-p paged.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=paged", "--datapaging=default",
        "--compressionmethod=bytepair"
    ]
    t.mustnotmatch = ["--compressionmethod=inflate", "--uncompressed"]
    t.run()

    t.name = "paging_unpagedcode_pageddata"
    t.command = cmd_prefix + "-p unpagedcode_pageddata.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=unpaged", "--datapaging=paged",
        "--compressionmethod=inflate"
    ]
    t.mustnotmatch = ["--compressionmethod=bytepair", "--uncompressed"]
    t.run()

    t.name = "paging_pagedcode_unpageddata"
    t.command = cmd_prefix + "-p pagedcode_unpageddata.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=paged", "--datapaging=unpaged",
        "--compressionmethod=bytepair"
    ]
    t.mustnotmatch = ["--compressionmethod=inflate", "--uncompressed"]
    t.run()

    t.name = "paging_pagedcode_defaultdata"
    t.command = cmd_prefix + "-p pagedcode_defaultdata.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=paged", "--datapaging=default",
        "--compressionmethod=bytepair"
    ]
    t.mustnotmatch = ["--compressionmethod=inflate", "--uncompressed"]
    t.run()

    t.name = "paging_paged_unpaged_no_bytepair"
    t.command = cmd_prefix + "-p paged_unpaged.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=unpaged", "--datapaging=unpaged",
        "--compressionmethod=inflate"
    ]
    t.mustnotmatch = ["--compressionmethod=bytepair", "--uncompressed"]
    t.warnings = 2  # 1 in the log and 1 on screen
    t.run()

    # now we test that the "compression" keywords interact correctly with
    # the "code paging" keywords.
    #
    # PAGEDCODE can only support BYTEPAIRCOMPRESSTARGET or NOCOMPRESSTARGET

    t.name = "paging_pagedcode_compress"
    t.command = cmd_prefix + "-p pagedcode_compress.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=paged", "--datapaging=default",
        "--compressionmethod=bytepair"
    ]
    t.mustnotmatch = ["--compressionmethod=inflate", "--uncompressed"]
    t.warnings = 2
    t.run()

    t.name = "paging_unpagedcode_compress"
    t.command = cmd_prefix + "-p unpagedcode_compress.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=unpaged", "--datapaging=default",
        "--compressionmethod=inflate"
    ]
    t.mustnotmatch = ["--compressionmethod=bytepair", "--uncompressed"]
    t.warnings = 0
    t.run()

    t.name = "paging_pagedcode_uncompress"
    t.command = cmd_prefix + "-p pagedcode_uncompress.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=paged", "--datapaging=default", "--uncompressed"
    ]
    t.mustnotmatch = [
        "--compressionmethod=bytepair", "--compressionmethod=inflate"
    ]
    t.warnings = 0
    t.run()

    t.name = "paging_unpagedcode_uncompress"
    t.command = cmd_prefix + "-p unpagedcode_uncompress.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=unpaged", "--datapaging=default", "--uncompressed"
    ]
    t.mustnotmatch = [
        "--compressionmethod=bytepair", "--compressionmethod=inflate"
    ]
    t.warnings = 0
    t.run()

    t.name = "paging_pagedcode_bytepair"
    t.command = cmd_prefix + "-p pagedcode_bytepair.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=paged", "--datapaging=default",
        "--compressionmethod=bytepair"
    ]
    t.mustnotmatch = ["--compressionmethod=inflate", "--uncompressed"]
    t.warnings = 0
    t.run()

    t.name = "paging_unpagedcode_bytepair"
    t.command = cmd_prefix + "-p unpagedcode_bytepair.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=unpaged", "--datapaging=default",
        "--compressionmethod=bytepair"
    ]
    t.mustnotmatch = ["--uncompressed", "--compressionmethod=inflate"]
    t.warnings = 0
    t.run()

    t.name = "paging_pagedcode_inflate"
    t.command = cmd_prefix + "-p pagedcode_inflate.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=paged", "--datapaging=default",
        "--compressionmethod=bytepair"
    ]
    t.mustnotmatch = ["--compressionmethod=inflate", "--uncompressed"]
    t.warnings = 2
    t.run()

    t.name = "paging_unpagedcode_inflate"
    t.command = cmd_prefix + "-p unpagedcode_inflate.mmp" + cmd_suffix
    t.mustmatch_singleline = [
        "--codepaging=unpaged", "--datapaging=default",
        "--compressionmethod=inflate"
    ]
    t.mustnotmatch = ["--uncompressed", "--compressionmethod=bytepair"]
    t.warnings = 0
    t.run()

    # test the pre-WDP paging options --paged and --unpaged
    # there is an os_properties.xml file in test/config that
    # turns POSTLINKER_SUPPORTS_WDP off

    t.name = "paging_paged_no_wdp"
    t.command = cmd_prefix + "-p paged.mmp --configpath=test/config" + cmd_suffix
    t.mustmatch_singleline = ["--paged", "--compressionmethod=bytepair"]
    t.mustnotmatch = ["--compressionmethod=inflate"]
    t.warnings = 0
    t.targets = ["$(EPOCROOT)/epoc32/release/armv5/urel/paged.dll"]
    t.run()

    t.name = "paging_unpaged_no_wdp"
    t.command = cmd_prefix + "-p unpaged.mmp --configpath=test/config" + cmd_suffix
    t.mustmatch_singleline = ["--unpaged", "--compressionmethod=inflate"]
    t.mustnotmatch = ["--compressionmethod=bytepair"]
    t.targets = ["$(EPOCROOT)/epoc32/release/armv5/urel/unpaged.dll"]
    t.run()

    t.name = "paging"
    t.print_result()
    return t
Пример #28
0
def run():

	t = SmokeTest()
	t.usebash = True

	cmd_prefix = "sbs -b smoke_suite/test_resources/simple_paging/bld.inf -c armv5_urel "
	cmd_suffix = " -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && cat ${SBSLOGFILE} "

	t.name = "paging_default"
	t.command = cmd_prefix + "-p default.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=default", 
			"--datapaging=default"
			]
	t.run()

	t.name = "paging_unpaged"
	t.command = cmd_prefix + "-p unpaged.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=unpaged", 
			"--datapaging=unpaged"
			]
	t.run()

	# these tests have no "compression" keywords so we are testing that the right
	# defaults are used.
	#
	# PAGEDCODE implies BYTEPAIRCOMPRESSTARGET
	# UNPAGEDCODE implies INFLATECOMPRESSTARGET
	
	t.name = "paging_paged"
	t.command = cmd_prefix + "-p paged.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=paged", 
			"--datapaging=default",
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--compressionmethod=inflate",
			"--uncompressed"
			]
	t.run()

	t.name = "paging_unpagedcode_pageddata"
	t.command = cmd_prefix + "-p unpagedcode_pageddata.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=unpaged", 
			"--datapaging=paged",
			"--compressionmethod=inflate"
			]
	t.mustnotmatch = [
			"--compressionmethod=bytepair",
			"--uncompressed"
			]
	t.run()

	t.name = "paging_pagedcode_unpageddata"
	t.command = cmd_prefix + "-p pagedcode_unpageddata.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=paged", 
			"--datapaging=unpaged",
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--compressionmethod=inflate",
			"--uncompressed"
			]
	t.run()

	t.name = "paging_pagedcode_defaultdata"
	t.command = cmd_prefix + "-p pagedcode_defaultdata.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=paged", 
			"--datapaging=default",
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--compressionmethod=inflate",
			"--uncompressed"
			]
	t.run()

	t.name = "paging_paged_unpaged_no_bytepair"
	t.command = cmd_prefix + "-p paged_unpaged.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=unpaged", 
			"--datapaging=unpaged",
			"--compressionmethod=inflate"
			]
	t.mustnotmatch = [
			"--compressionmethod=bytepair",
			"--uncompressed"
			]
	t.warnings = 2 # 1 in the log and 1 on screen
	t.run()

	# now we test that the "compression" keywords interact correctly with
	# the "code paging" keywords.
	#
	# PAGEDCODE can only support BYTEPAIRCOMPRESSTARGET or NOCOMPRESSTARGET
	
	t.name = "paging_pagedcode_compress"
	t.command = cmd_prefix + "-p pagedcode_compress.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=paged", 
			"--datapaging=default",
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--compressionmethod=inflate",
			"--uncompressed"
			]
	t.warnings = 2
	t.run()
	
	t.name = "paging_unpagedcode_compress"
	t.command = cmd_prefix + "-p unpagedcode_compress.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=unpaged", 
			"--datapaging=default",
			"--compressionmethod=inflate"
			]
	t.mustnotmatch = [
			"--compressionmethod=bytepair",
			"--uncompressed"
			]
	t.warnings = 0
	t.run()
	
	t.name = "paging_pagedcode_uncompress"
	t.command = cmd_prefix + "-p pagedcode_uncompress.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=paged", 
			"--datapaging=default",
			"--uncompressed"
			]
	t.mustnotmatch = [
			"--compressionmethod=bytepair",
			"--compressionmethod=inflate"
			]
	t.warnings = 0
	t.run()
	
	t.name = "paging_unpagedcode_uncompress"
	t.command = cmd_prefix + "-p unpagedcode_uncompress.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=unpaged", 
			"--datapaging=default",
			"--uncompressed"
			]
	t.mustnotmatch = [
			"--compressionmethod=bytepair",
			"--compressionmethod=inflate"
			]
	t.warnings = 0
	t.run()
	
	t.name = "paging_pagedcode_bytepair"
	t.command = cmd_prefix + "-p pagedcode_bytepair.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=paged", 
			"--datapaging=default",
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--compressionmethod=inflate",
			"--uncompressed"
			]
	t.warnings = 0
	t.run()
	
	t.name = "paging_unpagedcode_bytepair"
	t.command = cmd_prefix + "-p unpagedcode_bytepair.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=unpaged", 
			"--datapaging=default",
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--uncompressed",
			"--compressionmethod=inflate"
			]
	t.warnings = 0
	t.run()
	
	t.name = "paging_pagedcode_inflate"
	t.command = cmd_prefix + "-p pagedcode_inflate.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=paged", 
			"--datapaging=default",
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--compressionmethod=inflate",
			"--uncompressed"
			]
	t.warnings = 2
	t.run()
	
	t.name = "paging_unpagedcode_inflate"
	t.command = cmd_prefix + "-p unpagedcode_inflate.mmp" + cmd_suffix
	t.mustmatch_singleline = [
			"--codepaging=unpaged", 
			"--datapaging=default",
			"--compressionmethod=inflate"
			]
	t.mustnotmatch = [
			"--uncompressed",
			"--compressionmethod=bytepair"
			]
	t.warnings = 0
	t.run()
	
	# test the pre-WDP paging options --paged and --unpaged
	# there is an os_properties.xml file in test/config that
	# turns POSTLINKER_SUPPORTS_WDP off
	
	t.name = "paging_paged_no_wdp"
	t.command = cmd_prefix + "-p paged.mmp --configpath=test/config" + cmd_suffix
	t.mustmatch_singleline = [
			"--paged", 
			"--compressionmethod=bytepair"
			]
	t.mustnotmatch = [
			"--compressionmethod=inflate"	
			]
	t.warnings = 0
	t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/paged.dll" ]
	t.run()
	
	t.name = "paging_unpaged_no_wdp"
	t.command = cmd_prefix + "-p unpaged.mmp --configpath=test/config" + cmd_suffix
	t.mustmatch_singleline = [
			"--unpaged", 
			"--compressionmethod=inflate"
			]
	t.mustnotmatch = [
			"--compressionmethod=bytepair"	
			]
	t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/unpaged.dll" ]
	t.run()
	
	t.name = "paging"
	t.print_result()
	return t
Пример #29
0
def run():
	t = SmokeTest()
	t.description = "This testcase tests all mmp keywords including new implementation of 'paged/unpaged code/data'"
	t.usebash = True
	
	t.id = "75a"
	t.name = "mmp_1"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/shutdownsrv.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/shutdownsrv.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/shutdownsrv.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/shutdownsrv.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/lib/exportlibrary_shutdownsrv.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/exportlibrary_shutdownsrv{000a0000}.dso",
	]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp1/group/bld.inf", [
		"shutdownsrv_dll/armv5/udeb/shutdownsrv.o",
		"shutdownsrv_dll/armv5/urel/shutdownsrv.o",
		"shutdownsrv_dll/armv5/udeb/shutdownsrvpatchdata.o",
		"shutdownsrv_dll/armv5/urel/shutdownsrvpatchdata.o",
		"shutdownsrv_dll/armv5/udeb/shutdowntimer.o",
		"shutdownsrv_dll/armv5/urel/shutdowntimer.o"
		])
	t.mustmatch = [
		".*elf2e32.*(--defaultpaged|--codepaging=default.*--datapaging=default).*",
		".*armlink.*--verbose.*"
	]
	t.run()

	t.id = "75b"
	t.name = "mmp_2"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp2/group/bld.inf -c armv5 -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/imageprocessorperf.lib",
		"$(EPOCROOT)/epoc32/release/armv5/urel/imageprocessorperf.lib"		
	]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp2/group/bld.inf", [
		"imageprocessorperf_lib/armv5/udeb/ColorConverter.o",
		"imageprocessorperf_lib/armv5/urel/ColorConverter.o",
		"imageprocessorperf_lib/armv5/udeb/ImageProcessor.o",
		"imageprocessorperf_lib/armv5/urel/ImageProcessor.o"
		])
	t.mustmatch = [
		".*armcc.*-O0.*-g.*--cpu 6.*-Otime.*",
		".*armcc.*-O3.*--cpu 6.*-Otime.*",
		".*OPTION ARMASM has no effect.*",
		".*OPTION_REPLACE ARMASM has no effect.*"
	]
	t.mustnotmatch = [
		".*armcc.*--export_all_vtbl.*"
	]
	t.warnings = 2
	t.run()
	
	t.id = "75c"
	t.name = "mmp_3"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp3/bld.inf -c armv5 -c winscw -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/tbm.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/tbm.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/tbm.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/tbm.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/t_oom.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/t_oom.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/t_oom.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/t_oom.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dfpaeabi_vfpv2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dfpaeabi_vfpv2.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/dfpaeabi_vfpv2.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/dfpaeabi_vfpv2.dll.map",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_oom.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_oom.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/t_oom.exe"
		]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp3/bld.inf", [
		"tbm_exe/armv5/udeb/tbm.o",
		"tbm_exe/armv5/urel/tbm.o",
		"t_oom_exe/armv5/udeb/t_oom.o",
		"t_oom_exe/armv5/urel/t_oom.o",
		"dfpaeabi_vfpv2_dll/armv5/udeb/dfpaeabi.o",
		"dfpaeabi_vfpv2_dll/armv5/urel/dfpaeabi.o",
		"t_oom_exe/winscw/udeb/t_oom.o",
		"t_oom_exe/winscw/udeb/t_oom_UID_.o",
		"t_oom_exe/winscw/urel/t_oom.o",
		"t_oom_exe/winscw/urel/t_oom_UID_.o"
		])
	t.mustmatch = [
		".*armlink.*udeb/eexe.lib.*-o.*armv5/udeb/t_oom.exe.sym.*euser.dso.*efsrv.dso.*estor.dso.*euser.dso.*",
		".*armlink.*urel/eexe.lib.*-o.*armv5/urel/t_oom.exe.sym.*euser.dso.*efsrv.dso.*euser.dso.*",
		".*mwldsym2.*udeb/eexe.lib.*euser.lib.*efsrv.lib.*estor.lib.*euser.lib.*-o.*winscw/udeb/t_oom.exe.*",
		".*mwldsym2.*urel/eexe.lib.*euser.lib.*efsrv.lib.*euser.lib.*-o.*winscw/urel/t_oom.exe.*"
		]
	t.mustnotmatch = []
	t.warnings = 0
	t.run()
	
	t.id = "75d"
	t.name = "mmp_4"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp4/group/bld.inf -c winscw"
	t.targets = [			
		"$(EPOCROOT)/epoc32/release/winscw/udeb/d_newldd.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/urel/d_newldd.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/d_lddturnaroundtimertest.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/urel/d_lddturnaroundtimertest.ldd",
		"$(EPOCROOT)/epoc32/release/winscw/urel/d_lddturnaroundtimertest.ldd.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/t_sharedio3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_sharedio3.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_sharedio3.exe.map",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/t_rbuf.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_rbuf.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/t_rbuf.exe.map"
		]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp4/group/bld.inf", [
		"d_newldd_ldd/winscw/udeb/d_newldd.o",
		"d_newldd_ldd/winscw/udeb/d_newldd.UID.CPP",
		"d_newldd_ldd/winscw/udeb/d_newldd_UID_.o",
		"d_newldd_ldd/winscw/urel/d_newldd.o",
		"d_newldd_ldd/winscw/urel/d_newldd.UID.CPP",
		"d_newldd_ldd/winscw/urel/d_newldd_UID_.o",
		"d_newldd_ldd/winscw/udeb/t_new_classes.o",
		"d_newldd_ldd/winscw/urel/t_new_classes.o",
		"d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest.o",
		"d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest.UID.CPP",
		"d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest_UID_.o",
		"d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest.o",
		"d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest.UID.CPP",
		"d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest_UID_.o",
		"t_sharedio3_exe/winscw/udeb/t_sharedio.o",
		"t_sharedio3_exe/winscw/udeb/t_sharedio3.UID.CPP",
		"t_sharedio3_exe/winscw/udeb/t_sharedio3_UID_.o",
		"t_sharedio3_exe/winscw/urel/t_sharedio.o",
		"t_sharedio3_exe/winscw/urel/t_sharedio3.UID.CPP",
		"t_sharedio3_exe/winscw/urel/t_sharedio3_UID_.o",
		"t_rbuf_exe/winscw/udeb/t_rbuf.o",
		"t_rbuf_exe/winscw/udeb/t_rbuf.UID.CPP",
		"t_rbuf_exe/winscw/udeb/t_rbuf_UID_.o",
		"t_rbuf_exe/winscw/urel/t_rbuf.o",
		"t_rbuf_exe/winscw/urel/t_rbuf.UID.CPP",
		"t_rbuf_exe/winscw/urel/t_rbuf_UID_.o"
		])
	t.mustmatch = []
	t.run()
	
	# Test keywords: version, firstlib, nocompresstarget
	t.id = "75e"
	t.name = "mmp_5"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp5/bld.inf -c armv5"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/fuzzv5.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/fuzzv5.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/fuzzlib.lib",
		"$(EPOCROOT)/epoc32/release/armv5/urel/fuzzlib.lib"
		]
	t.addbuildtargets("smoke_suite/test_resources/mmp/mmp5/bld.inf", [
		"fuzzv5_exe/armv5/udeb/fuzzv5.o",
		"fuzzv5_exe/armv5/urel/fuzzv5.o",
		"fuzzlib_lib/armv5/udeb/uc_exe_.cpp",
		"fuzzlib_lib/armv5/urel/uc_exe_.cpp",
		"fuzzlib_lib/armv5/udeb/uc_exe_.o",
		"fuzzlib_lib/armv5/urel/uc_exe_.o",
		])
	t.run()

	t.id = "75f"
	t.name = "mmp_6"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp6_7/bld.inf -c armv5 -k -p diagsuppress.mmp -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_test.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_test.dll",
		]
	t.mustmatch = [
					"--diag_suppress 6780",
					"--diag_suppress 6331"
					]
	t.run()
	
	t.id = "75g"
	t.name = "mmp_7"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp6_7/bld.inf -c armv5 -k -p diagsuppress_noarmlibs.mmp -f-"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_noarmlibs_test.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_noarmlibs_test.dll"
		]
	t.mustmatch = ["--diag_suppress 6331"]
	t.mustnotmatch = ["--diag_suppress 6780"]
	t.run()

	# Test keyword: version
	t.id = "75h"
	t.name = "mmp_8"
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp8/bld.inf"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_mmp_version.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_mmp_version.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_mmp_version.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test_mmp_version.exe"
		]
	t.mustmatch = []
	t.mustnotmatch = []
	t.warnings = 2
	t.run()

	# Test keyword: armfpu softvfp|vfpv2
	# Both armv5 RVCT (9a+b) and GCCE (10) builds, as they differ in behaviour.
	t.id = "75i"
	t.name = "mmp_9a"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_soft.mmp -c armv5_urel -f-"			
	t.targets = []
	t.mustmatch = ["--fpu softvfp", "--fpu=softvfp"]
	t.mustnotmatch = ["--fpu vfpv2", "--fpu softvfp\+", "--fpu=vfpv2", "--fpu=softvfp\+"]
	t.warnings = 0
	t.run()
		
	t.id = "75j"
	t.name = "mmp_9b"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_vfpv2.mmp -c armv5_urel -f-"

	t.mustmatch = ["--fpu vfpv2", "--fpu=vfpv2"]
	t.mustnotmatch = ["--fpu softvfp", "--fpu=softvfp"]	
	t.run()
	
	t.id = "75ja"
	t.name = "mmp_9c"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p \"armfpu_soft+vfpv2.mmp\" -c armv5_urel -f-"

	t.mustmatch = ["--fpu softvfp\+vfpv2", "--fpu=vfpv2"]
	t.mustnotmatch = ["--fpu vfpv2", "--fpu softvfp ", "--fpu=softvfp"]
	t.run()

	t.id = "75k"
	t.name = "mmp_10"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf  -c armv5_urel_gcce4_3_2 REALLYCLEAN &&" \
			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel_gcce4_3_2 -f-"
	t.countmatch = [
		["-mfloat-abi=soft", 3],
		["--fpu=softvfp", 3] # gcce doesn't vary according to ARMFPU currently
	]
	t.mustmatch = []
	t.mustnotmatch = ["--fpu=vfpv2", "--fpu=softvfp\+"]
	t.run()
	
	# Test keywords: compresstarget, nocompresstarget, bytepaircompresstarget, inflatecompresstarget
	t.id = "75l"
	t.name = "mmp_11"
	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp11/bld.inf -c armv5_urel -f-"
	t.mustmatch_singleline = [
		"elf2e32.*--output.*\/compress\.exe.*--compressionmethod=inflate",
		"elf2e32.*--output.*\/nocompress\.exe.*--uncompressed",
		"elf2e32.*--output.*\/bytepaircompress\.exe.*--compressionmethod=bytepair",
		"elf2e32.*--output.*\/inflatecompress\.exe.*--compressionmethod=inflate",
		"elf2e32.*--output.*\/combinedcompress\.exe.*--compressionmethod=bytepair",		
		"COMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of NOCOMPRESSTARGET",
		"INFLATECOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of COMPRESSTARGET",
		"BYTEPAIRCOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of INFLATECOMPRESSTARGET"
	]
	t.countmatch = []
	t.mustnotmatch = []
	t.warnings = 3
	t.run()

	# Test keyword: APPLY
	t.id = "75m"
	t.name = "apply"
	t.command = "sbs -b smoke_suite/test_resources/mmp/apply/bld.inf -f- -k --configpath=test/config"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_mmp_apply.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_mmp_apply.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test_mmp_apply.exe",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test_mmp_apply.exe"
		]
	t.mustmatch_singleline = ["-DAPPLYTESTEXPORTEDVAR",
	                          "-DAPPLYTESTAPPENDCDEFS"]
	t.countmatch = [["<error.*APPLY unknown variant 'no_such_var'", 2]]
	t.errors = 2 # no_such_var for armv5 and winscw
	t.warnings = 0
	t.returncode = 1
	t.run()

	# Test keyword: EPOCNESTEDEXCEPTIONS
	t.id = "75n"
	t.name = "epocnestedexceptions"
	t.command = "sbs -b smoke_suite/test_resources/mmp/epocnestedexceptions/bld.inf -c armv5_udeb -f-"

	# When EPOCNESTEDEXCEPTIONS is specified in the MMP file, a different static
	# run-time library should be used.
	t.mustmatch_singleline = ["usrt_nx_\d_\d\.lib"]
	t.mustnotmatch = ["usrt._.."]

	t.countmatch = []

	# The new static run-time libraries don't yet exist.
	t.errors = 1
	t.warnings = 1
	t.targets = []

	t.run()
	
	# Test keyword: DOCUMENT
	t.id = "75o"
	t.name = "mmp_keyword_document"
	# Note: in t.command, the makefile is cat'd through sed to remove the .DEFAULT double-colon rule's <warning> tag to ensure that t.run succeeds.
	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 reallyclean; " + \
				"sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf --no-depend-generate -c armv5_urel -m ${SBSMAKEFILE}; " + \
				"cat ${SBSMAKEFILE}_all.default"
	
	t.mustmatch_singleline = ["DOCUMENT:=.*test/smoke_suite/test_resources/mmp/mmp1/src/file01\.txt\\s+.*test/smoke_suite/test_resources/mmp/mmp1/src/file02\.txt"]
	t.mustnotmatch = []
	t.countmatch = []
	
	t.errors = 0
	t.warnings = 0
	t.returncode = 0
	t.targets = []
	
	t.run()
	
	t.id = "75"
	t.name = "mmp_keywords"
	t.print_result()
	return t
Пример #30
0
def run():
	t = SmokeTest()
	
	t.description = """Test toolcheck works properly, with 3 options: on, off and forced. 
				TOOL 1, 3, 4 and 5 are expected to fail whilst 2, 6 and 7 pass.
				Also test Raptor self version check."""
	toolcheckDir = os.environ["SBS_HOME"].replace("\\","/") + "/test/smoke_suite/test_resources/toolcheck"

	# toolcheck ON
	t.name = "toolcheck_on"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
			" -c default.toolcheck --toolcheck=on"
	
	t.mustmatch = [
		".*tool 'TOOLCHECK1' from config 'none' did not return version.*",
		".*tool 'TOOLCHECK3' from config 'none' did not return version.*",
		".*tool 'TOOLCHECK4' from config 'none' did not return version.*",
		".*tool 'TOOLCHECK5' from config 'none' did not return version.*"
		]
	t.mustnotmatch = [
		".*TOOLCHECK2.*",
		".*TOOLCHECK6.*",
		".*TOOLCHECK7.*"
		]
	t.errors = 7
	t.returncode = 1
	t.run()

	# toolcheck OFF
	t.name = "toolcheck_off"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
			" -c default.toolcheck --toolcheck=off"

	t.mustmatch = []
	t.mustnotmatch = [
		".*TOOLCHECK1.*",
		".*TOOLCHECK3.*",
		".*TOOLCHECK4.*",
		".*TOOLCHECK5.*",
		".*TOOLCHECK6.*",
		".*TOOLCHECK7.*"
		]
	t.errors = 0
	t.returncode = 0
	t.run()

	# force toolcheck
	t.name = "toolcheck_force"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
			" -c default.toolcheck --toolcheck=forced"

	t.mustmatch = [
		".*tool 'TOOLCHECK1' from config 'none' did not return version.*",
		".*tool 'TOOLCHECK3' from config 'none' did not return version.*",
		".*tool 'TOOLCHECK4' from config 'none' did not return version.*",
		".*tool 'TOOLCHECK5' from config 'none' did not return version.*"
		]
	t.mustnotmatch = [
		".*TOOLCHECK2.*",
		".*TOOLCHECK6.*",
		".*TOOLCHECK7.*"
	]
	t.errors = 16
	t.returncode = 1
	t.run()
	
	# Raptor self version check
	t.name = "raptor_self_version_check"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
			" -c default.self_version_check"
	t.mustmatch = []
	t.mustmatch_singleline = [
	"sbs: error: tool 'SBS' from config 'none' did not return version \'2\\\.99\\\.\[0-9\]\+\' as required\\.",
	"Command '.*sbs.* --version' returned:",
	"Check your environment and configuration: This version of Raptor is not suitable " + 
	"for this SDK. Minimum version required is 2.99.0."	
		]
	t.mustnotmatch = [
	]
	t.errors = 1
	t.returncode = 1
	t.run()
	
	t.name ="toolcheck"
	t.print_result()
	return t