Пример #1
0
def run():
    t = SmokeTest()
    t.usebash = True

    t.description = "Test that dependency crunching for resource dependency files produces expected output"

    t.id = "43562999"
    t.name = "depcrunch"
    t.command = "python $SBS_HOME/bin/depcrunch.py --extensions mbg,rsg --assume EPOCROOT < smoke_suite/test_resources/depcrunch/dep2.rpp.d"
    t.mustmatch_multiline = [
        r"EPOCROOT/epoc32/build/resource/c_98665870f0168225/dependentresource_/dependentresource_dependentresource_sc.rpp: \\\n"
        + r" EPOCROOT/testresource1.mbg \\\n" +
        r" EPOCROOT/testresource2.rsg \\\n" +
        r" EPOCROOT/testresource3.rsg \\\n" +
        r" EPOCROOT/testresource4.mbg \\\n" +
        r" EPOCROOT/testresource5.rsg \\\n" +
        r" EPOCROOT/testresource6.mbg \\\n" +
        r" EPOCROOT/testresource7.rsg \\\n" +
        r" EPOCROOT/testresource8.mbg \\\n" + r" EPOCROOT/testresource9.rsg \n"
    ]
    t.run()

    t.print_result()

    return t
Пример #2
0
def run():
    t = SmokeTest()
    t.name = "dll_armv5_smp"
    t.id = "63"
    t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c " + \
      "armv5 -c armv5.smp"
    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",
        "$(EPOCROOT)/epoc32/release/armv5smp/udeb/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5smp/urel/createstaticdll.dll.sym",
        "$(EPOCROOT)/epoc32/release/armv5smp/udeb/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/armv5smp/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",
        "createstaticdll_dll/armv5smp/udeb/CreateStaticDLL.o",
        "createstaticdll_dll/armv5smp/urel/CreateStaticDLL.o"
    ])
    t.run()
    return t
Пример #3
0
def run():
    t = SmokeTest()
    t.id = "31"
    t.name = "listing"
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \
      "-c winscw -k listing"
    t.targets = [
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test.armv5.urel.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test.armv5.udeb.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test.WINSCW.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test1.armv5.urel.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test1.armv5.udeb.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test1.WINSCW.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test2.armv5.urel.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test2.armv5.udeb.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test2.WINSCW.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test3.armv5.urel.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test3.armv5.udeb.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test3.WINSCW.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test4.armv5.urel.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test4.armv5.udeb.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test4.WINSCW.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test5.armv5.urel.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test5.armv5.udeb.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test5.WINSCW.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test6.armv5.urel.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test6.armv5.udeb.test.exe.lst",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple/test6.WINSCW.lst"
    ]
    t.run()
    return t
Пример #4
0
def run():
	t = SmokeTest()
	
	t.id = "71a"
	t.name = "implib_implicit_def"
	t.command = "sbs -b smoke_suite/test_resources/simple_implib/nodef/group/bld.inf" \
			+ " -p implib_implicit_def.mmp"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/winscw/udeb/implib_implicit_def.lib"
		]
	t.run()

	t.id = "71b"
	t.name = "implib_no_def"
	t.command = "sbs -b smoke_suite/test_resources/simple_implib/nodef/group/bld.inf" \
			+ " -p implib_no_def.mmp"
	t.targets = []
	t.mustmatch = [
		"No DEF File for IMPLIB target type in"	
		]
	t.errors = 2 # 1 for winscw and 1 for armv5
	t.returncode = 1
	t.run()

	t.id = "71"
	t.name = "implib_nodef"
	t.print_result()

	return t
Пример #5
0
def run():
	t = SmokeTest()
	t.id = "2"
	t.name = "exe_armv5_filtered"
	t.description = "Run exe_armv5 with a customised filter. Will create then" \
			+ " remove filter file"
	t.usebash = True
	t.command = "cp -f smoke_suite/test_resources/filter_test/testfilter.py ../raptor/plugins/testfilter.py " \
				"&& chmod 600 ../raptor/plugins/testfilter.py " \
				"&& sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 --filters=TestFilter " \
				"&& rm -f ../raptor/plugins/testfilter.py*"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map"
		]
	t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [
		"test_/armv5/udeb/test.o",
		"test_/armv5/urel/test.o"
	])
	t.mustmatch = [
		".*Test Passed!.*"
		]
	t.run()
	return t
Пример #6
0
def run():
    t = SmokeTest()
    t.name = "preprocess"
    t.usebash = True
    t.description = "Exercise the global PREPROCESS target"

    # Build component normally first for one config - resource generate  .rsg files are #included in "straight" source
    # The PREPROCESS target does not resolve resource dependencies, but the test component is selected on the basis
    # that it will support the generation of resource .pre files in the future.

    addConfigs = ""
    addTargets = []
    if t.onWindows:
        addConfigs = "-c x86_udeb"
        addTargets = [
            "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.x86.udeb.helloworld.exe.pre",
            "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.x86.udeb.helloworld.exe.pre",
            "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.x86.udeb.helloworld.exe.pre",
            "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.x86.udeb.helloworld.exe.pre",
            "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.x86.udeb.helloworld.exe.pre"
        ]

    t.command = """
		sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5_urel &&
		sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw_urel -c armv7_udeb -c arm.v7.urel.gcce4_4_1 {0} preprocess
		""".format(addConfigs)

    t.targets = [
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv5.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv5.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv5.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv5.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv5.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv5.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv5.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv5.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv5.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv5.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.winscw.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.winscw.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.winscw.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.winscw.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.winscw.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv7.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv7.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv7.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv7.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv7.udeb.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv7.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv7.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv7.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv7.urel.helloworld.exe.pre",
        "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv7.urel.helloworld.exe.pre"
    ] + addTargets

    t.run()

    # Explicit clean-up due to the source tree nature of the generated files
    t.clean()
    return t
Пример #7
0
def run():
    t = SmokeTest()
    t.name = "make_engine_filenames"
    t.description = "Can we pass the makefilename and stage name to emake options like --annofile etc?"

    t.mustmatch = [
        ".*Executing.*emake.*historyfile=.*default\.history.*",
        ".*Executing.*emake.*annofile=.*\.default\.anno.*"
    ]

    t.mustnotmatch = [
        ".*Executing.*emake.*historyfile=.*#STAGE#\.history.*",
        ".*Executing.*emake.*annofile=#MAKEFILE#\.anno.*"
    ]

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

    t.command = base_command + " -e emake --mo=--emake-annofile=#MAKEFILE#.anno --mo=--emake-historyfile=$(EPOCROOT)/epoc32/build/#STAGE#.history -k NOTARGET"
    t.run()

    t.print_result()
    return t
Пример #8
0
def run():
    t = SmokeTest()
    t.id = "78"
    t.name = "dll_winscw_win32resource"
    t.description = """Test the construction of a custom WINSCW DLL containing Windows resources specified by win32_resource."""
    t.command = "sbs -b smoke_suite/test_resources/simple_dll/win32resource/bld.inf -c winscw"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/winscw/udeb/createstaticdll.lib",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/winscw/urel/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/winscw/urel/createstaticdll.dll.map"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/simple_dll/win32resource/bld.inf', [
            "createstaticdll_dll/winscw/udeb/CreateStaticDLL.o",
            "createstaticdll_dll/winscw/udeb/createstaticdll.UID.CPP",
            "createstaticdll_dll/winscw/udeb/createstaticdll_UID_.o",
            "createstaticdll_dll/winscw/udeb/gui.res",
            "createstaticdll_dll/winscw/udeb/gui.res.d",
            "createstaticdll_dll/winscw/urel/CreateStaticDLL.o",
            "createstaticdll_dll/winscw/urel/createstaticdll.UID.CPP",
            "createstaticdll_dll/winscw/urel/createstaticdll_UID_.o",
            "createstaticdll_dll/winscw/urel/gui.res",
            "createstaticdll_dll/winscw/urel/gui.res.d",
        ])
    t.run()
    return t
Пример #9
0
def run():

    t = SmokeTest()

    # Should have returncode of 1 and output 1 error, but not cause a traceback
    t.returncode = 1
    t.errors = 1
    t.mustmatch = [
        "sbs: error: Non-ASCII character in argument or command file"
    ]

    result = SmokeTest.PASS

    t.name = "non_ascii_argument"

    t.usebash = True
    # The dash in "-c" is an en dash, not a normal ASCII dash.
    t.command = r'set -x;sbs -b smoke_suite/test_resources/simple_dll/bld.inf `echo -e "\x96"`c armv5'

    t.run()
    if t.result == SmokeTest.FAIL:
        result = SmokeTest.FAIL

    t.name = "non_ascii_commandfile"

    t.command = "sbs --command=smoke_suite/test_resources/non_ascii/cmd.txt"

    t.run()
    if t.result == SmokeTest.FAIL:
        result = SmokeTest.FAIL

    t.name = "non_ascii"
    t.result = result
    t.print_result()
    return t
Пример #10
0
def run():
    t = SmokeTest()
    t.id = "71"
    t.name = "metadep"
    t.description = """Tests metadata dependency generation.  Changes 
			to bld.infs and mmps can be detected."""
    t.usebash = True
    t.command = """export SBSLOGFILE SBSMAKEFILE; bash smoke_suite/test_resources/metadep.sh 2>&1"""

    t.targets = []

    t.mustmatch_multiline = [
        """.*Step 1 .*no warnings or errors.*
sbs: build log in.*
\+ sleep 1.*
.*make -rf .*epoc32/build/metadata_all.mk.*
.*make.*epoc32/build/metadata_all.mk. is up to date.*
Step 2 .*
.*RE-RUNNING SBS with previous parameters.*
Step 3 .*
.*RE-RUNNING SBS with previous parameters.*
.*RE-RUNNING SBS with previous parameters.*"""
    ]
    t.mustnotmatch_multiline = [
        """RE-RUNNING SBS with previous parameters.*
RE-RUNNING SBS with previous parameters.*
RE-RUNNING SBS with previous parameters.*
RE-RUNNING SBS with previous parameters.*"""
    ]
    t.run()
    return t
Пример #11
0
def run():
    t = SmokeTest()
    t.name = "resource_once"
    t.description = "Ensure we only generate the resource header once even when there are many languages.  Make sure that the right language (96) is used for the headerfile."
    t.command = "sbs  -b smoke_suite/test_resources/resource/group/simple.inf -c winscw_udeb -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; XX=$?; cat ${SBSLOGFILE}; exit $XX"
    t.usebash = True
    t.targets = [
        "$(EPOCROOT)/epoc32/include/testresource.hrh",
        "$(EPOCROOT)/epoc32/include/testresource_badef.rh",
        "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.rsc",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.rsc",
        "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r37",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r37",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r37",
        "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r94",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r94",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r94",
        "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r96",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r96",
        "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r96",
        "$(EPOCROOT)/epoc32/include/testresource.rsg",
        "$(EPOCROOT)/epoc32/release/winscw/udeb/testresource.exe"
    ]
    t.countmatch = [
        ["rcomp.*-h.*rsg.*r96", 1],  # must see r96 once
        ["rcomp.*-h.*rsg", 1]
    ]  # must not see any other language
    t.run()

    t.print_result()
    return t
Пример #12
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
Пример #13
0
def run():
    t = SmokeTest()
    t.name = "annofile2log_copy_from_log"
    t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
    command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc {test_file_basename}.anno.bz2 ' \
        ' | python testanno2log.py  >"${{FROMANNO}}" && FROMSTDOUT="`mktemp`"; bzip2 -dc {test_file_basename}.stdout.bz2 > ' \
        '"${{FROMSTDOUT}}" && diff -wB "${{FROMANNO}}" "${{FROMSTDOUT}}"; RET=$? ; rm "${{FROMANNO}}" "${{FROMSTDOUT}}"; exit $RET )'

    t.usebash = True
    t.errors = 0
    t.returncode = 0
    t.exceptions = 0
    t.command = command.format(test_file_basename="scrubbed_ncp_dfs_resource")

    t.run()

    t.name = "annofile2log_new_format_annofile"
    t.description = "test new format of annofile"
    t.usebash = True
    t.errors = 0
    t.returncode = 0
    t.exceptions = 0
    t.command = command.format(
        test_file_basename="scrubbed_ncp_dfs_resource_new")

    t.run()

    t.print_result()
    return t
Пример #14
0
def run():
    t = SmokeTest()
    t.id = "17"
    t.name = "armv7_asmtest"
    t.command = "sbs -b smoke_suite/test_resources/asmtest/bld.inf -c armv7"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv7/udeb/asmtest.exe",
        "$(EPOCROOT)/epoc32/release/armv7/udeb/asmtest.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv7/udeb/asmtest.exe.map",
        "$(EPOCROOT)/epoc32/release/armv7/urel/asmtest.exe",
        "$(EPOCROOT)/epoc32/release/armv7/urel/asmtest.exe.sym",
        "$(EPOCROOT)/epoc32/release/armv7/urel/asmtest.exe.map"
    ]
    t.addbuildtargets('smoke_suite/test_resources/asmtest/bld.inf', [
        "asmtest_/armv7/udeb/asmtest_udeb_objects.via",
        "asmtest_/armv7/udeb/testassembler.o.d",
        "asmtest_/armv7/udeb/testassembler.o",
        "asmtest_/armv7/udeb/testassembler.o",
        "asmtest_/armv7/udeb/testcia_.o", "asmtest_/armv7/udeb/testcia_.cpp",
        "asmtest_/armv7/udeb/testcia_.pre",
        "asmtest_/armv7/udeb/testcia_.pre.d",
        "asmtest_/armv7/udeb/testasm.o.d", "asmtest_/armv7/udeb/testasm.o",
        "asmtest_/armv7/urel/asmtest_urel_objects.via",
        "asmtest_/armv7/urel/testassembler.o.d",
        "asmtest_/armv7/urel/testassembler.o",
        "asmtest_/armv7/urel/testassembler.o",
        "asmtest_/armv7/urel/testcia_.o", "asmtest_/armv7/urel/testcia_.cpp",
        "asmtest_/armv7/urel/testcia_.pre",
        "asmtest_/armv7/urel/testcia_.pre.d",
        "asmtest_/armv7/urel/testasm.o.d", "asmtest_/armv7/urel/testasm.o"
    ])
    t.run()
    return t
Пример #15
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
Пример #16
0
def run():
    t = SmokeTest()
    t.name = "dll_x86"
    t.description = "Build a basic DLL TARGETTYPE for x86"
    t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c x86"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/x86/udeb/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/x86/udeb/createstaticdll.dll.map",
        "$(EPOCROOT)/epoc32/release/x86/urel/createstaticdll.dll",
        "$(EPOCROOT)/epoc32/release/x86/urel/createstaticdll.dll.map",
        "$(EPOCROOT)/epoc32/release/x86/lib/createstaticdll.lib",
        "$(EPOCROOT)/epoc32/release/x86/lib/createstaticdll{000a0000}.lib"
    ]
    t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [
        "createstaticdll_dll/x86/udeb/CreateStaticDLL.o",
        "createstaticdll_dll/x86/udeb/CreateStaticDLL.o.d",
        "createstaticdll_dll/x86/urel/CreateStaticDLL.o",
        "createstaticdll_dll/x86/urel/CreateStaticDLL.o.d",
        "createstaticdll_dll/x86/udeb/createstaticdll_udeb_objects.via",
        "createstaticdll_dll/x86/urel/createstaticdll_urel_objects.via",
        [
            "createstaticdll_dll/x86/udeb/createstaticdll.prep",
            "createstaticdll_dll/x86/urel/createstaticdll.prep"
        ],
        [
            "createstaticdll_dll/x86/udeb/createstaticdll.lib.exp",
            "createstaticdll_dll/x86/urel/createstaticdll.lib.exp"
        ]
    ])

    t.run("windows")
    return t
Пример #17
0
def run():
    t = SmokeTest()
    t.description = "test mmpkeyword: traces"
    t.id = "108a"
    t.name = "traces_mmpkeyword"
    t.command = "sbs -b smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf -c armv5.tracecompiler"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/udeb/traceon.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/traceon.exe",
        "$(EPOCROOT)/epoc32/release/armv5/udeb/traces_keyword.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/traces_keyword.exe",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traceon_exe/traceonTraces.h",
        "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traces_keyword_exe/traces_keywordTraces.h",
        "$(EPOCROOT)/epoc32/ost_dictionaries/traceon_exe_0x11100010_Dictionary.xml",
        "$(EPOCROOT)/epoc32/ost_dictionaries/traces_keyword_exe_0x11100011_Dictionary.xml",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/traceon_exe_0x11100010_TraceDefinitions.h",
        "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/traces_keyword_exe_0x11100011_TraceDefinitions.h"
    ]
    t.addbuildtargets(
        'smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf', [
            "traceon_exe/armv5/udeb/traceon.o",
            "traceon_exe/armv5/urel/traceon.o",
            "traceon_exe/tracecompile_traceon_exe_11100010.done",
            "traces_keyword_exe/armv5/udeb/traces_keyword.o",
            "traces_keyword_exe/armv5/urel/traces_keyword.o",
            "traces_keyword_exe/tracecompile_traces_keyword_exe_11100011.done",
        ])
    t.run()

    t.id = "108"
    t.name = "tracecompiler_new"
    return t
Пример #18
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
Пример #19
0
def run():
    t = SmokeTest()
    t.name = "armv5_stringtable"
    t.command = "sbs -b smoke_suite/test_resources/simple_stringtable/bld.inf -c armv5"
    t.targets = ["$(EPOCROOT)/epoc32/include/strconsts.h"]
    t.addbuildtargets(
        'smoke_suite/test_resources/simple_stringtable/bld.inf',
        ["stringtabletest_/strconsts.h", "stringtabletest_/strconsts.cpp"])
    t.run()
    return t
Пример #20
0
def run():
    t = SmokeTest()
    t.id = "50"
    t.name = "sysdef_dud"
    t.description = "Test an invalid system_definition.xml file"
    t.command = "sbs -s " + \
      "smoke_suite/test_resources/sysdef/system_definition_dud.xml"
    t.targets = []
    t.errors = 1
    t.returncode = 1
    t.run()
    return t
Пример #21
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
Пример #22
0
def run():
	t = SmokeTest()
	t.name = "filter_html_unit"

	tests = unittest.makeSuite(TestFilterHtml)
	result = unittest.TextTestRunner(verbosity=2).run(tests)

	if result.wasSuccessful():
		t.result = SmokeTest.PASS
	else:
		t.result = SmokeTest.FAIL

	return t
Пример #23
0
def run():
    t = SmokeTest()
    t.name = "raptor_api_unit"

    tests = unittest.makeSuite(TestRaptorApi)
    result = unittest.TextTestRunner(verbosity=2).run(tests)

    if result.wasSuccessful():
        t.result = SmokeTest.PASS
    else:
        t.result = SmokeTest.FAIL

    return t
Пример #24
0
def run():
    t = SmokeTest()
    t.id = "36"
    t.name = "implib_winscw"
    t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf -c " \
      + "winscw LIBRARY"
    t.targets = ["$(EPOCROOT)/epoc32/release/winscw/udeb/simple_implib.lib"]
    t.addbuildtargets('smoke_suite/test_resources/simple_implib/bld.inf', [[
        "simple_implib_lib/winscw/udeb/simple_implib.prep.def",
        "simple_implib_lib/winscw/urel/simple_implib.prep.def"
    ]])
    t.run()
    return t
Пример #25
0
def run():
	t = SmokeTest()
	t.id = "999"
	t.name = "mmpparser_unit"

	tests = unittest.makeSuite(TestMMPParser)
	result = unittest.TextTestRunner(verbosity=2).run(tests)

	if result.wasSuccessful():
		t.result = SmokeTest.PASS
	else:
		t.result = SmokeTest.FAIL

	return t
Пример #26
0
def run():
    t = SmokeTest()
    t.id = "81"
    t.name = "export_multi"
    t.description = "Test that the export section only gets included once even if all platforms are selected (see DPDEF138366)"
    # Note I'm not including 'tools' to avoid a dependency on MSVC6
    # Given this test will not be necessary once the export section is removed from the make files anyway, I'm not too worried.
    t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf -c winscw -c armv5 -c tools2 -c armv7 -c gccxml EXPORT"
    t.mustnotmatch = [
        ".*warning: overriding commands for target.*",
        ".*warning: ignoring old commands for target.*"
    ]
    t.run()
    return t
Пример #27
0
def run():
    t = SmokeTest()
    t.usebash = True

    t.name = "var_test"
    t.command = "sbs -b smoke_suite/test_resources/variable_test/bld.inf -c armv7 -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && cat ${SBSLOGFILE}"
    t.targets = []
    t.mustmatch = ["<debug>SBS=.*/bin/sbs\.bat</debug>"]
    t.run("windows")

    t.mustmatch = ["<debug>SBS=.*/bin/sbs</debug>"]
    t.run("linux")

    return t
Пример #28
0
def run():
    t = SmokeTest()
    t.id = "999"
    t.name = "generic_path_unit"

    tests = unittest.makeSuite(TestGenericPaths)
    result = unittest.TextTestRunner(verbosity=2).run(tests)

    if result.wasSuccessful():
        t.result = SmokeTest.PASS
    else:
        t.result = SmokeTest.FAIL

    return t
Пример #29
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
Пример #30
0
def run():
    t = SmokeTest()
    t.id = "53"
    t.name = "gnumakefile"
    t.command = "sbs -b smoke_suite/test_resources/gnumakefile/bld.inf"
    t.targets = [
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_final_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_final_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_final_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_final_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_lib_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_lib_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_lib_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_lib_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_makmake_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_makmake_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_makmake_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_makmake_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_WINSCW_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_ARMV5_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_ARMV5_UREL.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_WINSCW_UDEB.txt",
        "$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_WINSCW_UREL.txt"
    ]
    t.run("windows")  # we don't have make 3.79 on Linux
    return t