--noexport option wip
authortnmurphy@4GBL06592.nokia.com
Sat, 21 Nov 2009 00:59:51 +0000
branchwip
changeset 14 45cdac6e50c6
parent 13 8789c7c7c420
child 15 9d01f1c36469
--noexport option
sbsv2/raptor/python/raptor.py
sbsv2/raptor/python/raptor_cli.py
sbsv2/raptor/python/raptor_meta.py
sbsv2/raptor/test/smoke_suite/export.py
sbsv2/raptor/test/smoke_suite/parallel_parsing.py
--- a/sbsv2/raptor/python/raptor.py	Sat Nov 21 00:36:02 2009 +0000
+++ b/sbsv2/raptor/python/raptor.py	Sat Nov 21 00:59:51 2009 +0000
@@ -578,7 +578,7 @@
 		return True
 
 	def SetNoExport(self, TrueOrFalse):
-		self.doExport = TrueOrFalse
+		self.doExport = not TrueOrFalse
 		return True
 
 	def SetNoBuild(self, TrueOrFalse):
--- a/sbsv2/raptor/python/raptor_cli.py	Sat Nov 21 00:36:02 2009 +0000
+++ b/sbsv2/raptor/python/raptor_cli.py	Sat Nov 21 00:59:51 2009 +0000
@@ -87,7 +87,7 @@
 parser.add_option("--export-only",action="store_true",dest="doExportOnly",
 				help="Generate exports only and do not create any make files.")
 
-parser.add_option("--noexport",action="store_false",dest="doExport",
+parser.add_option("--noexport",action="store_true",dest="doExport",
 				help="Don't export any files - useful in some builds when you know exports have already been done.")
 
 parser.add_option("-f","--logfile",action="store",dest="logfile",
--- a/sbsv2/raptor/python/raptor_meta.py	Sat Nov 21 00:36:02 2009 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py	Sat Nov 21 00:59:51 2009 +0000
@@ -2604,6 +2604,8 @@
 						self.__Raptor.Error("%s",e.Text)
 						if not self.__Raptor.keepGoing:
 							return []
+		else:
+			self.__Raptor.Info("Not Processing Exports (--noexport enabled)")
 
 		# this is a switch to return the function at this point if export
 		# only option is specified in the run
--- a/sbsv2/raptor/test/smoke_suite/export.py	Sat Nov 21 00:36:02 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/export.py	Sat Nov 21 00:59:51 2009 +0000
@@ -21,8 +21,9 @@
 	result = SmokeTest.PASS
 	
 	# This .inf file is created for clean_simple_export and
-	# reallyclean_simple_export tests to use, because of $$USER problem occuring
-	# at the front end.
+	# reallyclean_simple_export tests to use so that we can put the
+	# username into the output filenames - which helps a lot when
+	# several people run tests on the same computer (e.g. linux machines)
 	bld = open('smoke_suite/test_resources/simple_export/expbld.inf', 'w')
 	bld.write("PRJ_PLATFORMS\n"
 		"ARMV5 WINSCW\n\n"
@@ -69,7 +70,7 @@
 	t.id = "0023b"
 	t.name = "export_clean" 
 	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
-			+ "-c armv5 CLEAN"
+			+ "-c armv5 clean"
 	t.targets = [
 		"$(EPOCROOT)/epoc32/include/exported_1.h",
 		"$(EPOCROOT)/epoc32/include/exported_2.h",
@@ -89,7 +90,28 @@
 	t.id = "0023c"
 	t.name = "export_reallyclean" 
 	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
-			+ "-c armv5 REALLYCLEAN"
+			+ "-c armv5 reallyclean"
+	t.antitargets = [
+		'$(EPOCROOT)/epoc32/include/exported_1.h',
+		'$(EPOCROOT)/epoc32/include/exported_2.h',
+		'$(EPOCROOT)/epoc32/include/exported_3.h',
+		'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc',
+		'$(EPOCROOT)/epoc32/include/exported file with a space.doc',
+		'/tmp/$(USER)/simple_exp1.h',
+		'/tmp/$(USER)/simple_exp2.h',
+		'/tmp/$(USER)/simple_exp3.h',
+		'$(EPOCROOT)/epoc32/include/simple_exp4.h'
+	]
+	t.run()
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
+
+	# Check that the --noexport feature really does prevent exports from happening
+	t = AntiTargetSmokeTest()
+	t.id = "0023d"
+	t.name = "export_noexport" 
+	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
+			+ "-c armv5 --noexport -n"
 	t.antitargets = [
 		'$(EPOCROOT)/epoc32/include/exported_1.h',
 		'$(EPOCROOT)/epoc32/include/exported_2.h',
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/parallel_parsing.py	Sat Nov 21 00:59:51 2009 +0000
@@ -0,0 +1,70 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+from raptor_tests import SmokeTest
+
+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 = "103"
+	t.name = "parallelparsing"
+	t.description = description
+	t.command = command 
+	t.targets = targets
+	t.mustmatch = mustmatch
+	t.mustnotmatch = mustnotmatch
+	t.warnings = warnings
+	t.run()
+	if t.result == SmokeTest.FAIL:
+	        result = SmokeTest.FAIL
+	
+	t.result = result
+	t.print_result()
+	return t