Add LaunchControl null build with android must-pass generation.
Change-Id: I01c1cb2fa90174b9f442e1e98237024f8aed9159
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"