]> granicus.if.org Git - libvpx/commitdiff
Add script to test all builds.
authorChristian Duvivier <cduvivier@google.com>
Fri, 23 Dec 2011 00:04:15 +0000 (16:04 -0800)
committerChristian Duvivier <cduvivier@google.com>
Fri, 23 Dec 2011 00:05:23 +0000 (16:05 -0800)
Change-Id: I6bbed8bcb2dfa3458ffc59179dfba66c92e18125

all_builds.py [new file with mode: 0755]

diff --git a/all_builds.py b/all_builds.py
new file mode 100755 (executable)
index 0000000..7650865
--- /dev/null
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+
+import subprocess
+import sys
+
+def RunCommand(command):
+  run = subprocess.Popen(command, shell=True)
+  output = run.communicate()
+  if run.returncode:
+    print "Non-zero return code: " + str(run.returncode) + " => exiting!"
+    sys.exit(1)
+
+def list_of_experiments():
+  experiments = []
+  configure_file = open("configure")
+  list_start = False
+  for line in configure_file.read().split("\n"):
+    if line == 'EXPERIMENT_LIST="':
+      list_start = True
+    elif line == '"':
+      list_start = False
+    elif list_start:
+      currently_broken = ["csm"]
+      experiment = line[4:]
+      if experiment not in currently_broken:
+        experiments.append(experiment)
+  return experiments
+
+def main():
+  base_command = "./configure --enable-internal-stats"
+  test_build(base_command)
+  for experiment_name in list_of_experiments():
+    test_build("%s --enable-experimental --enable-%s" % (base_command,
+      experiment_name))
+
+def test_build(configure_command):
+  print "\033[34m\033[47mTesting %s\033[0m" % (configure_command)
+  RunCommand(configure_command)
+  RunCommand("make clean")
+  RunCommand("make")
+
+if __name__ == "__main__":
+  main()