Exemplo n.º 1
0
def run():
	premarkerfile = sanitise(ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip"))
	markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped"
	
	t = CheckWhatSmokeTest()
	t.id = "25"
	t.name = "zip_export_what"
	t.command = "sbs --what -b smoke_suite/test_resources/simple_zip_export/bld.inf"
	t.stdout = [
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt',
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt',
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt',
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt',
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt"
	]
	
	t.targets = [
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt',
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt',
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt',
		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt',
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
		"$(EPOCROOT)/epoc32/build/" + markerfile
	]
	t.run()
	return t
Exemplo n.º 2
0
	def AddSourceTarget(self, filename):
		# source targets are sanitised and then added as if they were a "normal" makefile target
		# in addition they have a default, empty, top-level target assigned in order that they can
		# be presented to any generated makefile without error
		sourceTarget = generic_path.Path(filename).Absolute()
		sourceTarget = 'SOURCETARGET_' + raptor_utilities.sanitise(str(sourceTarget))
		self.AddTarget(sourceTarget)
		self.defaultTargets.append(sourceTarget)
		return True
def run():
	premarkerfile = sanitise(ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip"))
	markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped"
	
	t = CheckWhatSmokeTest()
	t.id = "0069a"
	t.name = "stringtable_zip_whatlog"
	t.command = "sbs -b smoke_suite/test_resources/simple_stringtable/bld.inf -b smoke_suite/test_resources/simple_zip_export/bld.inf -f - -m ${SBSMAKEFILE} -c armv5_udeb.whatlog EXPORT"
	componentpath1 = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/simple_stringtable"))
	componentpath2 = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/simple_zip_export"))
	t.regexlinefilter = re.compile("^<(whatlog|archive|stringtable>|member>|zipmarker>)")
	t.hostossensitive = False
	t.usebash = True
	t.targets = [
		"$(EPOCROOT)/epoc32/include/strconsts.h",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
		"$(EPOCROOT)/epoc32/build/" + markerfile
		]
	t.addbuildtargets('smoke_suite/test_resources/simple_stringtable/bld.inf', [
		"stringtabletest_/strconsts.cpp",
		"stringtabletest_/strconsts.h",
		"stringtabletest_/strconsts.st"
	])
	t.stdout = [
		"<whatlog bldinf='"+componentpath1+"/bld.inf' mmp='"+componentpath1+"/simple_stringtable.mmp' config='armv5_udeb.whatlog'>",
		"<stringtable>$(EPOCROOT)/epoc32/include/strconsts.h</stringtable>",
		"<whatlog bldinf='"+componentpath2+"/bld.inf' mmp='' config=''>",
		"<archive zipfile='"+componentpath2+"/archive.zip'>",
		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt</member>",
		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt</member>",
		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt</member>",
		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt</member>",
		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin</member>",
		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt</member>",
		"<zipmarker>$(EPOCROOT)/epoc32/build/" + markerfile + "</zipmarker>"
	]
	t.run()
	
	"Tests to check that up-to-date zip exports are reported"
	t.id = "0069b"
	t.name = "stringtable_zip_whatlog_rebuild"
	t.targets = []
	t.run()
	
	t.id = "69"
	t.name = "stringtable_zip_whatlog"	
	t.print_result()
	return t
def run():
	premarkerfile = sanitise(ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip"))
	markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped"
	
	t = AntiTargetSmokeTest()

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

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

	# Confirm reallyclean deletes all exports, including those that were read-only
	# as source (and so should now be removable at their destination)	
	t.name = "zip_export_reallyclean"
	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf reallyclean"
	t.mustmatch = []
	t.antitargets = [
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
		"$(EPOCROOT)/epoc32/build/" + markerfile
	]
	t.run()
	
	t.name = "zip_export_plus_clean"
	t.print_result()
	return t
Exemplo n.º 5
0
	def realise_makefile(self, build, specs):
		makefilename_base = build.topMakefile
		if self.name is not None:
			makefile = generic_path.Path(str(makefilename_base) + "_" + raptor_utilities.sanitise(self.name))
		else:
			makefile = generic_path.Path(str(makefilename_base))

		# insert the start time into the Makefile name?
		makefile.path = makefile.path.replace("%TIME", build.timestring)

		build.InfoDiscovery(object_type = "layers", count = 1)
		build.InfoStartTime(object_type = "layer", task = "parse",
				key = str(makefile.path))
		makefileset = build.maker.Write(makefile, specs, build.buildUnitsToBuild)
		build.InfoEndTime(object_type = "layer", task = "parse",
				key = str(makefile.path))

		return makefileset