示例#1
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
示例#2
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
def run():
	t = SmokeTest()
	t.description = "Trace Compiler Whatlog Clean"
	t.id = "112a"
	t.name = "tracecompiler_whatlog_clean"
	t.usebash = True
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf -c armv5.tracecompiler CLEAN"
	t.run()

	t = CheckWhatSmokeTest()
	t.description = "Trace Compiler Whatlog test"
	t.id = "112b"
	t.name = "tracecompiler_whatlog"
	t.usebash = True
	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf -c armv5.tracecompiler -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && cat ${SBSLOGFILE}"
	t.hostossensitive = False
	t.regexlinefilter = re.compile("^<(whatlog|export|build>|resource>|bitmap>)")
	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso",
		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
		"$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml",
		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
		]
	t.stdout = [
		"<whatlog bldinf='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf' mmp='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/test.TC.mmp' config='armv5_urel.tracecompiler'>",
		"<whatlog bldinf='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf' mmp='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/test.TC.mmp' config='armv5_udeb.tracecompiler'>",
		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso</build>",
		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso</build>",
		"<build>$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll</build>",
		"<build>$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map</build>",
		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll</build>",
		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map</build>",
		"<build>$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml</build>",
		"<build>$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h</build>"
		]		
	t.run("linux")
	if t.result == CheckWhatSmokeTest.SKIP:
		t.run("windows")

	t.id = "112"

	return t
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
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 ../python/plugins/testfilter.py " \
				"&& chmod 600 ../python/plugins/testfilter.py " \
				"&& sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 --filters=TestFilter " \
				"&& rm -f ../python/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 = "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.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
示例#8
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
示例#9
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
示例#10
0
def run():
	t = SmokeTest()
	t.id = "33"
	t.name = "exe_winscw"
	t.usebash = True
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c winscw -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; grep -E \"mwldsym2\" ${SBSLOGFILE}"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test.exe",
		"$(EPOCROOT)/epoc32/release/winscw/urel/test.exe.map"
		]
	t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [
		"test_/winscw/udeb/test.o",
		"test_/winscw/udeb/test_.o",
		"test_/winscw/udeb/test_UID_.o",
		"test_/winscw/udeb/test.UID.CPP",
		"test_/winscw/urel/test.o",
		"test_/winscw/urel/test_.o",
		"test_/winscw/urel/test_UID_.o",
		"test_/winscw/urel/test.UID.CPP"
	])
	# Check that the default operator new library is used
	t.mustmatch = [
		'.*mwldsym2.*scppnwdl.lib.*test.exe.*'
		]
	t.run()
	return t
示例#11
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
示例#12
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
示例#13
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
示例#14
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
示例#15
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
示例#16
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
示例#17
0
def run():
	t = SmokeTest()
	t.usebash = True
	
	t.description = "Test that a timing log is created and contains total parse and build durations"

	t.id = "0103b"
	t.name = "timing_on"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf" + \
			" --filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \
			"grep progress:duration ${SBSLOGFILE}.timings"
	t.mustmatch = [
			"^<progress:duration object_type='layer' task='parse' key='.*' duration='\d+.\d+' />$",
			"^<progress:duration object_type='layer' task='build' key='.*' duration='\d+.\d+' />$",
			"^<progress:duration object_type='all' task='all' key='all' duration='\d+.\d+' />$"
			]
	t.mustnotmatch = []
	t.run()


	t.id = "103"
	t.name = "timing"
	t.print_result()
	
	return t
示例#18
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
示例#19
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
示例#20
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
示例#21
0
def run():
	t = SmokeTest()
	t.id = "0096"
	t.name = "kdll_armv5"
	t.usebash = 1

	t.command = "sbs -b smoke_suite/test_resources/simple_kdll/bld.inf -c armv5_urel -f-"

	t.targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll.sym"
		]

	t.mustmatch = [
		r".*\bksrt\d_\d\.lib\b.*",
		r".*\bekll\.lib\b.*"
		]

	t.mustnotmatch = [
		r".*usrt.*",
		r".*scppnwdl.*"
		]

	t.run()
	return t
示例#22
0
def run():
	t = SmokeTest()
	t.usebash = True

	if "SBS_ELF2E32" in os.environ:
		elf2e32 = os.environ["SBS_ELF2E32"]
	elif sys.platform.startswith("win"):
		elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32.exe"
	else:
		elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32"

	description = """This test attempts to check that an exe gets the capabilities that we requested.  It's ARM specific since it uses elf2e32. Tries to demonstrate capabilties being turned off then on in the mmp."""
	command = "sbs -b smoke_suite/test_resources/simple/capability.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \
			  elf2e32 + " --dump=s  --e32input=$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe"
	targets = [
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe.map"
		]	
	buildtargets = [
		]
	mustmatch = [
		"\s*Secure ID: 10003a5c$",
		"\s*Vendor ID: 00000000$",
		"\s*Capabilities: 00000000 000fffbf$",
		"\s*CommDD$",
		"\s*PowerMgmt$",
		"\s*MultimediaDD$",
		"\s*ReadDeviceData$",
		"\s*WriteDeviceData$",
		"\s*TrustedUI$",
		"\s*DiskAdmin$",
		"\s*NetworkControl$",
		"\s*AllFiles$",
		"\s*SwEvent$",
		"\s*NetworkServices$",
		"\s*LocalServices$",
		"\s*ReadUserData$",
		"\s*WriteUserData$",
		"\s*Location$",
		"\s*SurroundingsDD$",
		"\s*UserEnvironment$",
		"\s*TCB$"
	]
	mustnotmatch = [
		"DRM"
	]
	warnings = 0
	
	t.id = "0107"
	t.name = "capability_arm"
	t.description = description
	t.command = command % "arm.v5.urel.gcce4_4_1"
	t.targets = targets
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.warnings = warnings
	t.run()
	return t
示例#23
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
示例#24
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
def run():
	t = SmokeTest()
	t.id = "80"
	t.name = "sbs_with_nonexisting_bldinf"
	t.description = "Test if sbs generates warning if invoked without bld.inf specified i.e. using default bld.inf which doesn't exist"
	t.command = "mkdir ${EPOCROOT}/emptydir; rm ${EPOCROOT}/emptydir/*;  cd ${EPOCROOT}/emptydir; sbs -f ${SBSLOGFILE} -m {SBSMAKEFILE}"
	t.usebash = True
	t.warnings = 1 
	t.run()
	return t
示例#26
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
def run():
	t = SmokeTest()

	t.name = "sbs_with_nonexisting_bldinf"
	t.description = "Test if sbs generates warning if invoked without bld.inf specified i.e. using default bld.inf which doesn't exist"
	t.command = "mkdir ${EPOCROOT}/emptydir; rm ${EPOCROOT}/emptydir/*;  cd ${EPOCROOT}/emptydir; sbs -f ${SBSLOGFILE} -m {SBSMAKEFILE}"
	t.usebash = True
	t.warnings = 1 
	t.run()
	
	t.name = "sbs_with_nonexisting_bldinf_cli"
	t.description = "Test if sbs generates an error if invoked with a bad -b option"
	t.command = "sbs -b none.inf"
	t.usebash = False
	t.errors = 1
	t.warnings = 0
	t.returncode = 1
	t.mustmatch = ["sbs: error: build info file does not exist \(component .*none.inf\)"] 
	t.run()
	
	t.print_result()
	return t
示例#28
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
示例#29
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
示例#30
0
def run():
	t = SmokeTest()
	t.description = "tests that previous crash conditions now generate tidy errors."
	
	# no crash when there are bld.inf lines starting with a slash	
	t.id = "45a"
	t.name = "raptor_crash"
	t.command = "sbs -b smoke_suite/test_resources/simple_crash/bld.inf"
	t.errors = 2
	t.returncode = 1
	t.run()
	
	# should get an error code when running inside cmd
	t.id = "45b"
	t.name = "error_cmd"
	t.usebash = True
	t.command = "cmd /c sbs -s no_such_thing"
	t.mustmatch = ["System Definition file no_such_thing does not exist"]
	t.errors = 1
	t.returncode = 1
	t.run("windows")
	
	# should get an error code when running in bash
	t.id = "45c"
	t.name = "error_bash"
	t.usebash = True
	t.command = "sbs -s no_such_thing"
	t.mustmatch = ["System Definition file no_such_thing does not exist"]
	t.errors = 1
	t.returncode = 1
	t.run()
	
	# print the over all result
	t.id = "45"
	t.name = "raptor_crash"
	t.print_result()
	return t
示例#31
0
def run():
    t = SmokeTest()
    t.description = "tests that previous crash conditions now generate tidy errors."

    # no crash when there are bld.inf lines starting with a slash
    t.id = "45a"
    t.name = "raptor_crash"
    t.command = "sbs -b smoke_suite/test_resources/simple_crash/bld.inf"
    t.errors = 2
    t.returncode = 1
    t.run()

    # should get an error code when running inside cmd
    t.id = "45b"
    t.name = "error_cmd"
    t.usebash = True
    t.command = "cmd /c sbs -s no_such_thing"
    t.mustmatch = ["System Definition file no_such_thing does not exist"]
    t.errors = 1
    t.returncode = 1
    t.run("windows")

    # should get an error code when running in bash
    t.id = "45c"
    t.name = "error_bash"
    t.usebash = True
    t.command = "sbs -s no_such_thing"
    t.mustmatch = ["System Definition file no_such_thing does not exist"]
    t.errors = 1
    t.returncode = 1
    t.run()

    # print the over all result
    t.id = "45"
    t.name = "raptor_crash"
    t.print_result()
    return t
def run():
	t = SmokeTest()
	t.id = "90"
	t.name = "plugin_armv5_winscw_freeze"
	t.description = """Builds several ECOM plugins, with and without explicit DEFFILE statements, confirming
		the correct FREEZE behaviour in each case.  The correct behaviour for a PLUGIN/PLUGIN3 is
		indicative of all TARGETTYPEs where the build system defines known exports: FREEZE should do nothing
		unless an explicit DEFFILE statement is present in the .mmp file.
		Also confirms default UID2 settings for PLUGIN3 TARGETTYPEs and default resource generation locations
		for both PLUGIN and PLUGIN3."""
	t.usebash = True
	
	t.command = """
		sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel CLEAN > /dev/null &&
		sbs -f- -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel &&
		sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel FREEZE -m ${SBSMAKEFILE} -f ${SBSLOGFILE}"""

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

	t.mustnotmatch = [
		".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/eabi/pluginu.def.*",
		".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/bwins/pluginu.def.*"
		]
	
	t.warnings = 4	
	t.run()
	return t
示例#33
0
def run():

    t = SmokeTest()
    t.description = """Test the 'expgen' stage with different combinations of
				compiler (RVCT and GCC-E) and elf2e32 version (with and without
				--asm option)."""

    t.usebash = True

    bld_inf = "smoke_suite/test_resources/custom_dll/bld.inf"
    old_elf2e32 = "$(SBS_HOME)/test/smoke_suite/test_resources/custom_dll/elf2e32_old"
    if t.onWindows:
        old_elf2e32 += ".exe"

    # Command templates for using the new and the old version of elf2e32,
    # respectively. The new version supports the --asm option.
    new_cmd = "sbs -b " + bld_inf + " -c {0}"
    old_cmd = "SBS_ELF2E32=" + old_elf2e32 + " " + new_cmd

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

    # This ensures that the "expgen" stage is executed for each call to run().
    t.addbuildtargets(bld_inf, [
        "customdll_dll/armv5/customdll{000a0000}.s",
        "customdll_dll/armv5/customdll{000a0000}.exp"
    ])

    t.name = "custom_dll_rvct_new_elf2e32"
    t.command = new_cmd.format("armv5")
    t.run()

    t.name = "custom_dll_rvct_old_elf2e32"
    t.command = old_cmd.format("armv5")
    t.run()

    t.name = "custom_dll_gcce_new_elf2e32"
    t.command = new_cmd.format("gcce_armv5")
    t.run()

    t.name = "custom_dll"
    t.print_result()
    return t
示例#34
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
def run():
    t = SmokeTest()

    t.name = "sbs_with_nonexisting_bldinf"
    t.description = "Test if sbs generates warning if invoked without bld.inf specified i.e. using default bld.inf which doesn't exist"
    t.command = "mkdir ${EPOCROOT}/emptydir; rm ${EPOCROOT}/emptydir/*;  cd ${EPOCROOT}/emptydir; sbs -f ${SBSLOGFILE} -m {SBSMAKEFILE}"
    t.usebash = True
    t.warnings = 1
    t.run()

    t.name = "sbs_with_nonexisting_bldinf_cli"
    t.description = "Test if sbs generates an error if invoked with a bad -b option"
    t.command = "sbs -b none.inf"
    t.usebash = False
    t.errors = 1
    t.warnings = 0
    t.returncode = 1
    t.mustmatch = [
        "sbs: error: build info file does not exist \(component .*none.inf\)"
    ]
    t.run()

    t.print_result()
    return t
示例#36
0
def run():

	t = SmokeTest()
	t.description = """Test the 'expgen' stage with different combinations of
				compiler (RVCT and GCC-E) and elf2e32 version (with and without
				--asm option)."""

	t.usebash = True

	bld_inf = "smoke_suite/test_resources/custom_dll/bld.inf"
	old_elf2e32 = "$(SBS_HOME)/test/smoke_suite/test_resources/custom_dll/elf2e32_old"
	if t.onWindows:
		old_elf2e32 += ".exe"

	# Command templates for using the new and the old version of elf2e32,
	# respectively. The new version supports the --asm option.
	new_cmd = "sbs -b " + bld_inf + " -c {0}"
	old_cmd = "SBS_ELF2E32=" + old_elf2e32 + " " + new_cmd

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

	# This ensures that the "expgen" stage is executed for each call to run().
	t.addbuildtargets(bld_inf, [
		"customdll_dll/armv5/customdll{000a0000}.s",
		"customdll_dll/armv5/customdll{000a0000}.exp"])

	t.name = "custom_dll_rvct_new_elf2e32"
	t.command = new_cmd.format("armv5")
	t.run()

	t.name = "custom_dll_rvct_old_elf2e32"
	t.command = old_cmd.format("armv5")
	t.run()

	t.name = "custom_dll_gcce_new_elf2e32"
	t.command = new_cmd.format("gcce_armv5")
	t.run()

	t.name = "custom_dll"
	t.print_result()
	return t
def run():
	t = SmokeTest()
	t.name = "cli_makevar_overide"
	t.id = "0117"
	t.description = "Attempt to override a makefile var at the command line."
	t.usebash = True
	
	t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf REALLYCLEAN -m ${SBSMAKEFILE} -f ${SBSLOGFILE} HOSTPLATFORM_DIR=unlikelydir"  
	
	t.mustmatch = ["sbs: warning: CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable"]
	
	t.warnings = 1
	t.run()
	
	return t
	
示例#38
0
def run():
	t = SmokeTest()
	t.usebash = True
	result = SmokeTest.PASS

	description = """This test covers parallel parsing."""
	command = "cd $(SBS_HOME)/test/smoke_suite/test_resources/pp/ && sbs --command=$(SBS_HOME)/test/smoke_suite/test_resources/pp/ppbldinf_commandfile -c armv5 -c winscw --pp=on --noexport -m ${SBSMAKEFILE} -f - | grep recipe "

	mmpcount = 10 # how many mmps in this parallel parsing test

	
	target_templ = [
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.map",
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.sym",
		"$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.sym"
	]

	targets = []

	# Build up target list for 10 similar executables
	for num in range(1,mmpcount):
		for atarget in target_templ:
			targets.append(atarget.replace('pp#','pp'+ str(num)))

	mustmatch = [
		".*<recipe .*name='makefile_generation.*",
	]
	mustnotmatch = [
		".*<recipe .*name='makefile_generation_export.*",
		".*<error[^><]*>.*"
	]

	warnings = 0
		
	t.id = "104"
	t.name = "parallel_parsing"
	t.description = description
	t.command = command 
	t.targets = targets
	t.mustmatch = mustmatch
	t.mustnotmatch = mustnotmatch
	t.warnings = warnings
	t.run()
	return t
示例#39
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
示例#40
0
def run():
    t = SmokeTest()
    t.name = "cli_makevar_overide"
    t.id = "0117"
    t.description = "Attempt to override a makefile var at the command line."
    t.usebash = True

    t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf REALLYCLEAN -m ${SBSMAKEFILE} -f ${SBSLOGFILE} HOSTPLATFORM_DIR=unlikelydir"

    t.mustmatch = [
        "sbs: warning: CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable"
    ]

    t.warnings = 1
    t.run()

    return t
示例#41
0
def run():
    t = SmokeTest()
    t.id = "8"
    t.name = "bitmap"
    t.description = "This step is for testing BITMAP keyword and MIFCONV support for s60"
    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/bitmap/bld.inf BITMAP && grep -ir 'MIFCONV_TEST:=1' $(EPOCROOT)/epoc32/build"
    t.targets = [
        "$(EPOCROOT)/epoc32/include/testbitmap.mbg",
        "$(EPOCROOT)/epoc32/data/z/resource/apps/testbitmap.mBm",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/test/mifconv.xml",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/test/mifconv.flm"
    ]
    t.addbuildtargets('smoke_suite/test_resources/bitmap/bld.inf',
                      ["testbitmap_dll/testbitmap.mBm_bmconvcommands"])
    t.mustmatch = [".*Makefile.*(_all)?.bitmap:MIFCONV_TEST:=1.*"]
    t.mustnotmatch = [".*Makefile.*(_all)?.default:MIFCONV_TEST.*"]
    t.run()
    return t
示例#42
0
def run():
	t = SmokeTest()
	t.usebash = True
	
	t.name = "start_via_python"
	t.description =  """Test that we can start up raptor from the python script sbs.py without using a batch file or script"""

	python = "python"
	if 'SBS_PYTHON3' in os.environ:
		python = os.environ['SBS_PYTHON3']
	elif 'SBS_PYTHON' in os.environ:
		python = os.environ['SBS_PYTHON']

	python = python.replace("\\","/")
		
	t.command = r"unset SBS_HOME HOSTPLATFORM HOSTPLATFORM_DIR HOSTPLATFORM32_DIR; {0} ../bin/sbs.py -b smoke_suite/test_resources/simple/bld.inf -c armv5 -n".format(python)
	t.warnings = 0
	t.run()
	return t
示例#43
0
def run():
	t = SmokeTest()
	
	t.name = "exported_flm_extension"
	t.command = "sbs -b smoke_suite/test_resources/simple_extension/flm_bld.inf -c armv5"
	t.targets = [
		"$(EPOCROOT)/epoc32/build/flm_test_1_2",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/tools/flm_export.xml",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/tools/flm_export.flm"
		]
	t.run()
	
	t.name = "per_component_flm"
	t.usebash = True
	t.command = "sbs --configpath=test/smoke_suite/test_resources/docs" + \
	            " -b smoke_suite/test_resources/simple_dll/bld.inf" + \
	            " -b smoke_suite/test_resources/simple_lib/bld.inf" + \
	            " -b smoke_suite/test_resources/tools2/bld.inf" + \
	            " -c armv5.documentation -c tools2.documentation -f-"
	t.targets = [         
		"$(EPOCROOT)/epoc32/docs/simple_dll.txt",
		"$(EPOCROOT)/epoc32/docs/CreateStaticDLL.mmp",

		"$(EPOCROOT)/epoc32/docs/simple_lib.txt",
		"$(EPOCROOT)/epoc32/docs/simple.mmp",

		"$(EPOCROOT)/epoc32/docs/tools2.txt",
		"$(EPOCROOT)/epoc32/docs/tool_exe.mmp",
		"$(EPOCROOT)/epoc32/docs/tool_lib1.mmp",
		"$(EPOCROOT)/epoc32/docs/tool_lib2.mmp"
		]
	t.mustmatch = [
		"simple_dll.txt uses " + ReplaceEnvs(t.targets[1]),
		"simple_lib.txt uses " + ReplaceEnvs(t.targets[3]),
		"tools2.txt uses " + ReplaceEnvs(t.targets[5]) + " " + \
		                     ReplaceEnvs(t.targets[6]) + " " + \
		                     ReplaceEnvs(t.targets[7])
		]
	t.run()
		
	t.name = "flm_extension"
	t.print_result()
	return t
示例#44
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
示例#45
0
def run():
    t = SmokeTest()
    t.description = "Set of tests for commandline option validation e.g. checking that the specified make engine exists"

    t.usebash = True
    t.errors = 1
    t.returncode = 1
    t.exceptions = 0
    base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f ${SBSLOGFILE} -m ${SBSMAKEFILE}"

    t.id = "42562a"
    t.name = "validate_makeengine_nonexist"
    t.command = base_command + " -e amakeenginethatdoesnotexist"
    t.mustmatch = [
        "Unable to use make engine: 'amakeenginethatdoesnotexist' does not appear to be a make engine - no settings found for it"
    ]

    t.run()

    t.id = "43562b"
    t.mustmatch = [
        "Unable to use make engine: 'arm' is not a build engine \(it's a variant but it does not extend 'make_engine'"
    ]
    t.name = "validate_makeengine_is_a_non_makengine_variant"
    t.command = base_command + " -e arm"
    t.run()

    # aliases can be of the form name='blah' meaning='x.y.z'  i.e. where the alias is for a sequence of variants
    # this tests that we detect that at least one of these variants has make_engine as a parent
    # it is possible for one of them not to and we mustn't bomb-out just because of that
    t.id = "43562c"
    t.mustmatch = []
    t.name = "validate_real_dfs_modded_makeengine_alias"
    t.command = "export HOME=$SBS_HOME/test/custom_options/dfsconfig;  " + base_command + " -e dfstestmake -c arm.v5.urel.gcce4_4_1"
    t.errors = 0
    t.warnings = 0
    t.returncode = 0
    t.run()

    t.id = "43562"
    t.name = "input_validation"
    t.print_result()
    return t
示例#46
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
示例#47
0
def run():
	t = SmokeTest()
	t.id = "85a"
	t.name = "commandline_nodefaults"
	t.description = """Test that raptor complains if you run it without specifying any components and there is no default bld.inf or system definition in the current directory."""
	t.usebash = True
			
	t.command = """
		TMPDIR="build/commandline_testdefaults";
		cd $(EPOCROOT)/epoc32 && rm -rf "$TMPDIR" 2>/dev/null; mkdir -p "$TMPDIR" && cd "$TMPDIR" &&
		sbs ${SBSLOGFILE} -n ; rm -rf "$TMPDIR"
	""" 
		
	t.mustmatch = [".*warning: No default bld.inf or system definition.*found.* "]
	t.warnings = 1
	t.run()

	t.id = "0085"
	t.name = "commandline"
	return t
示例#48
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
示例#49
0
def run():
	t = SmokeTest()
	t.description = "This testcase tests specific cases of using APPLY"
	t.usebash = True

	# Introduce LINKER_OPTIONS for tools2 linker
	t.id = "0108"
	t.name = "apply_usecases"
	t.command = "sbs -b smoke_suite/test_resources/apply_usecases/linker_options/bld.inf -c tools2 -f -"
	t.targets = [
		"$(EPOCROOT)/epoc32/release/tools2/rel/test_apply_linkeroptions.exe"
		]
	t.addbuildtargets("smoke_suite/test_resources/apply_usecases/linker_options/bld.inf", [
		"test_apply_linkeroptions_/test_apply_linkeroptions_exe/tools2/deb/test_apply_linkeroptions.o",
		"test_apply_linkeroptions_/test_apply_linkeroptions_exe/tools2/rel/test_apply_linkeroptions.o"
	])
	t.mustmatch = ["-lwsock32"]
	t.run("windows")

	return t
示例#50
0
def run():
    t = SmokeTest()
    t.id = "0096"
    t.name = "kdll_armv5"
    t.usebash = 1

    t.command = "sbs -b smoke_suite/test_resources/simple_kdll/bld.inf -c armv5_urel -f-"

    t.targets = [
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll.map",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll.sym"
    ]

    t.mustmatch = [r".*\bksrt\d_\d\.lib\b.*", r".*\bekll\.lib\b.*"]

    t.mustnotmatch = [r".*usrt.*", r".*scppnwdl.*"]

    t.run()
    return t
示例#51
0
def run():
    t = SmokeTest()
    t.id = "0094"
    t.name = "tem_conflicts"
    t.usebash = 1
    t.command = "sbs -b smoke_suite/test_resources/tem_conflict/bld.inf " + \
     "-c armv5 -j 2 -f $SBSLOGFILE; cat $SBSLOGFILE"
    t.targets = [
        "$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_conflicts.mk",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_conflicts.meta",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_conflicts.sh"
    ]
    t.mustnotmatch = [
        "cp: cannot open .* for reading: Permission denied",
        "cp: cannot stat .*: No such file or directory",
        "rm: cannot remove .*: No such file or directory",
        "rm: cannot remove .*: Permission denied"
    ]
    t.run()
    return t
示例#52
0
def run():
	t = SmokeTest()
	t.id = "0094"
	t.name = "tem_conflicts"
	t.usebash = 1
	t.command = "sbs -b smoke_suite/test_resources/tem_conflict/bld.inf " + \
		"-c armv5 -j 2 -f $SBSLOGFILE; cat $SBSLOGFILE"
	t.targets = [
		"$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_conflicts.mk",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_conflicts.meta",
		"$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_conflicts.sh"
		]
	t.mustnotmatch = [
		"cp: cannot open .* for reading: Permission denied",
		"cp: cannot stat .*: No such file or directory",
		"rm: cannot remove .*: No such file or directory",
		"rm: cannot remove .*: Permission denied"
		]
	t.run()
	return t
示例#53
0
def run():
    t = SmokeTest()

    t.name = "exported_flm_extension"
    t.command = "sbs -b smoke_suite/test_resources/simple_extension/flm_bld.inf -c armv5"
    t.targets = [
        "$(EPOCROOT)/epoc32/build/flm_test_1_2",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/tools/flm_export.xml",
        "$(EPOCROOT)/epoc32/tools/makefile_templates/tools/flm_export.flm"
    ]
    t.run()

    t.name = "per_component_flm"
    t.usebash = True
    t.command = "sbs --configpath=test/smoke_suite/test_resources/docs" + \
                " -b smoke_suite/test_resources/simple_dll/bld.inf" + \
                " -b smoke_suite/test_resources/simple_lib/bld.inf" + \
                " -b smoke_suite/test_resources/tools2/bld.inf" + \
                " -c armv5.documentation -c tools2.documentation -f-"
    t.targets = [
        "$(EPOCROOT)/epoc32/docs/simple_dll.txt",
        "$(EPOCROOT)/epoc32/docs/CreateStaticDLL.mmp",
        "$(EPOCROOT)/epoc32/docs/simple_lib.txt",
        "$(EPOCROOT)/epoc32/docs/simple.mmp",
        "$(EPOCROOT)/epoc32/docs/tools2.txt",
        "$(EPOCROOT)/epoc32/docs/tool_exe.mmp",
        "$(EPOCROOT)/epoc32/docs/tool_lib1.mmp",
        "$(EPOCROOT)/epoc32/docs/tool_lib2.mmp"
    ]
    t.mustmatch = [
     "simple_dll.txt uses " + ReplaceEnvs(t.targets[1]),
     "simple_lib.txt uses " + ReplaceEnvs(t.targets[3]),
     "tools2.txt uses " + ReplaceEnvs(t.targets[5]) + " " + \
                          ReplaceEnvs(t.targets[6]) + " " + \
                          ReplaceEnvs(t.targets[7])
     ]
    t.run()

    t.name = "flm_extension"
    t.print_result()
    return t
示例#54
0
def run():
    t = SmokeTest()
    t.name = "environment_native"

    t.description = """Checks that if you set SBS_HOME this is ignored"""

    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c arm.v5.udeb.gcce4_4_1"
    t.targets = ["$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe"]

    t.environ['SBS_HOME'] = '/does/not/exist'
    t.run()

    if t.onWindows:
        t.name = "environment_cygwin_bash"
        t.usebash = True
        t.description = """Checks that if you set SBS_HOME this is ignored on Cygwin"""
        t.run()

    t.name = "environment"
    t.print_result()
    return t
示例#55
0
def run():
    t = SmokeTest()
    t.description = "This testcase tests specific cases of using APPLY"
    t.usebash = True

    # Introduce LINKER_OPTIONS for tools2 linker
    t.id = "0108"
    t.name = "apply_usecases"
    t.command = "sbs -b smoke_suite/test_resources/apply_usecases/linker_options/bld.inf -c tools2 -f -"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/tools2/rel/test_apply_linkeroptions.exe"
    ]
    t.addbuildtargets(
        "smoke_suite/test_resources/apply_usecases/linker_options/bld.inf", [
            "test_apply_linkeroptions_/test_apply_linkeroptions_exe/tools2/deb/test_apply_linkeroptions.o",
            "test_apply_linkeroptions_/test_apply_linkeroptions_exe/tools2/rel/test_apply_linkeroptions.o"
        ])
    t.mustmatch = ["-lwsock32"]
    t.run("windows")

    return t
示例#56
0
def run():
    t = SmokeTest()
    t.name = "planb"
    t.description = "Basic planb test of the makefile mechanism."

    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/planb/bld.inf -f-"
    t.countmatch = [
        ["\+ echo bitmap-all", 4],  # 2 platforms * 2 variants
        ["\+ echo resource-all", 4],
        ["\+ echo target-all", 4],
        ["\+ echo bitmap-no_var_dep", 2],  # 2 platforms
        ["\+ echo resource-no_var_dep", 2],
        ["\+ echo target-no_var_dep", 2],
        ["\+ echo bitmap-no_plat_dep", 1],  # 1 build
        ["\+ echo resource-no_plat_dep", 1],
        ["\+ echo target-no_plat_dep", 1],
    ]

    t.run()
    return t
示例#57
0
def run():
    t = SmokeTest()
    t.id = "33"
    t.name = "exe_winscw"
    t.usebash = True
    t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c winscw -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; grep -E \"mwldsym2\" ${SBSLOGFILE}"
    t.targets = [
        "$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe",
        "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe.map"
    ]
    t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [
        "test_/winscw/udeb/test.o", "test_/winscw/udeb/test_.o",
        "test_/winscw/udeb/test_UID_.o", "test_/winscw/udeb/test.UID.CPP",
        "test_/winscw/urel/test.o", "test_/winscw/urel/test_.o",
        "test_/winscw/urel/test_UID_.o", "test_/winscw/urel/test.UID.CPP"
    ])
    # Check that the default operator new library is used
    t.mustmatch = ['.*mwldsym2.*scppnwdl.lib.*test.exe.*']
    t.run()
    return t
示例#58
0
def run():
    t = SmokeTest()
    t.usebash = True

    if "SBS_ELF2E32" in os.environ:
        elf2e32 = os.environ["SBS_ELF2E32"]
    elif sys.platform.startswith("win"):
        elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32.exe"
    else:
        elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32"

    description = """This test attempts to check that an exe gets the capabilities that we requested.  It's ARM specific since it uses elf2e32. Tries to demonstrate capabilties being turned off then on in the mmp."""
    command = "sbs -b smoke_suite/test_resources/simple/capability.inf -c {0} -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}} && " + \
        elf2e32 + " --dump=s  --e32input=$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe"
    targets = [
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe",
        "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe.map"
    ]
    buildtargets = []
    mustmatch = [
        "\s*Secure ID: 10003a5c$", "\s*Vendor ID: 00000000$",
        "\s*Capabilities: 00000000 000fffbf$", "\s*CommDD$", "\s*PowerMgmt$",
        "\s*MultimediaDD$", "\s*ReadDeviceData$", "\s*WriteDeviceData$",
        "\s*TrustedUI$", "\s*DiskAdmin$", "\s*NetworkControl$", "\s*AllFiles$",
        "\s*SwEvent$", "\s*NetworkServices$", "\s*LocalServices$",
        "\s*ReadUserData$", "\s*WriteUserData$", "\s*Location$",
        "\s*SurroundingsDD$", "\s*UserEnvironment$", "\s*TCB$"
    ]
    mustnotmatch = ["DRM"]
    warnings = 0

    t.name = "capability_arm"
    t.description = description
    t.command = command.format("arm.v5.urel.gcce4_4_1")
    t.targets = targets
    t.mustmatch = mustmatch
    t.mustnotmatch = mustnotmatch
    t.warnings = warnings
    t.run()
    return t
示例#59
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
示例#60
0
def run():
    t = SmokeTest()
    t.id = "85a"
    t.name = "commandline_nodefaults"
    t.description = """Test that raptor complains if you run it without specifying any components and there is no default bld.inf or system definition in the current directory."""
    t.usebash = True

    t.command = """
		TMPDIR="build/commandline_testdefaults";
		cd $(EPOCROOT)/epoc32 && rm -rf "$TMPDIR" 2>/dev/null; mkdir -p "$TMPDIR" && cd "$TMPDIR" &&
		sbs ${SBSLOGFILE} -n ; rm -rf "$TMPDIR"
	"""

    t.mustmatch = [
        ".*warning: No default bld.inf or system definition.*found.* "
    ]
    t.warnings = 1
    t.run()

    t.id = "0085"
    t.name = "commandline"
    return t