am 9c027619: Merge "Add LaunchControl null build with android must-pass generation."

* commit '9c027619c7dccd689888ba4bce91cd1f3febc5f4':
  Add LaunchControl null build with android must-pass generation.
diff --git a/scripts/build_android_mustpass.py b/scripts/build_android_mustpass.py
index d81362b..e3708c3 100644
--- a/scripts/build_android_mustpass.py
+++ b/scripts/build_android_mustpass.py
@@ -119,13 +119,9 @@
 				cases.append(line[6:].strip())
 	return cases
 
-def getCaseList (mustpass, module):
-	generator	= ANY_GENERATOR
-	buildCfg	= getBuildConfig(DEFAULT_BUILD_DIR, DEFAULT_TARGET, "Debug")
-
+def getCaseList (buildCfg, generator, module):
 	build(buildCfg, generator, [module.binName])
 	genCaseList(buildCfg, generator, module, "txt")
-
 	return readCaseList(getCaseListPath(buildCfg, module, "txt"))
 
 def readPatternList (filename):
@@ -361,14 +357,14 @@
 
 	print "Done!"
 
-def genMustpassLists (mustpassLists):
+def genMustpassLists (mustpassLists, generator, buildCfg):
 	moduleCaseLists = {}
 
 	# Getting case lists involves invoking build, so we want to cache the results
 	for mustpass in mustpassLists:
 		for package in mustpass.packages:
 			if not package.module in moduleCaseLists:
-				moduleCaseLists[package.module] = getCaseList(mustpass, package.module)
+				moduleCaseLists[package.module] = getCaseList(buildCfg, generator, package.module)
 
 	for mustpass in mustpassLists:
 		genMustpass(mustpass, moduleCaseLists)
@@ -542,4 +538,4 @@
 	]
 
 if __name__ == "__main__":
-	genMustpassLists(MUSTPASS_LISTS)
+	genMustpassLists(MUSTPASS_LISTS, ANY_GENERATOR, getBuildConfig(DEFAULT_BUILD_DIR, DEFAULT_TARGET, "Debug"))
diff --git a/scripts/launchcontrol_build.py b/scripts/launchcontrol_build.py
index 06a2d4f..676487a 100644
--- a/scripts/launchcontrol_build.py
+++ b/scripts/launchcontrol_build.py
@@ -25,14 +25,27 @@
 from build.build import *
 from argparse import ArgumentParser
 import multiprocessing
+from build_android_mustpass import *
+
+class LaunchControlConfig:
+	def __init__ (self, buildArgs, checkMustpassLists):
+		self.buildArgs 			= buildArgs
+		self.checkMustpassLists = checkMustpassLists
+
+	def getBuildArgs (self):
+		return self.buildArgs
+
+	def getCheckMustpassLists (self):
+		return self.checkMustpassLists
 
 # This is a bit silly, but CMake needs to know the word width prior to
 # parsing the project files, hence cannot use our own defines.
 X86_64_ARGS = ["-DDE_CPU=DE_CPU_X86_64", "-DCMAKE_C_FLAGS=-m64", "-DCMAKE_CXX_FLAGS=-m64"]
 
 BUILD_CONFIGS = {
-	"gcc-x86_64-x11_glx":   X86_64_ARGS + ["-DDEQP_TARGET=x11_glx"],
-	"clang-x86_64-x11_glx": X86_64_ARGS + ["-DDEQP_TARGET=x11_glx", "-DCMAKE_C_COMPILER=clang", "-DCMAKE_CXX_COMPILER=clang++"]
+	"gcc-x86_64-x11_glx":   LaunchControlConfig(X86_64_ARGS + ["-DDEQP_TARGET=x11_glx"], False),
+	"clang-x86_64-x11_glx": LaunchControlConfig(X86_64_ARGS + ["-DDEQP_TARGET=x11_glx", "-DCMAKE_C_COMPILER=clang", "-DCMAKE_CXX_COMPILER=clang++"], False),
+	"gcc-x86_64-null":		LaunchControlConfig(X86_64_ARGS + ["-DDEQP_TARGET=null"], True)
 }
 
 def buildWithMake (workingDir):
@@ -43,6 +56,12 @@
 	execute(["make", "-j%d" % threadCount])
 	popWorkingDir()
 
+def checkForChanges ():
+	pushWorkingDir(DEQP_DIR)
+	# If there are changed files, exit code will be non-zero and the script terminates immediately.
+	execute(["git", "diff", "--exit-code"])
+	popWorkingDir()
+
 def parseOptions ():
 	parser = ArgumentParser()
 
@@ -72,9 +91,14 @@
 	print "# %s %s BUILD" % (options.config.upper(), options.buildType.upper())
 	print "############################################################\n"
 
+	launchControlConfig = BUILD_CONFIGS[options.config]
 	buildDir = os.path.realpath(os.path.normpath(options.buildDir))
-	config = BuildConfig(buildDir, options.buildType, BUILD_CONFIGS[options.config])
+	config = BuildConfig(buildDir, options.buildType, launchControlConfig.getBuildArgs())
 	initBuildDir(config, MAKEFILE_GENERATOR)
 	buildWithMake(buildDir)
 
+	if launchControlConfig.getCheckMustpassLists():
+		genMustpassLists(MUSTPASS_LISTS, MAKEFILE_GENERATOR, config)
+		checkForChanges()
+
 	print "\n--- BUILD SCRIPT COMPLETE"