Prevent attempts to run impossible configurations.

Some configurations, such as --regalloc_gc --prebuild are
fundamentally incompatible and will always fail. Add support for
specifying a list of these impossible configurations and automatically
skipping them.

Test: ./test/testrunner/testrunner.py --host -t 001-HelloWorld --all-compiler --all-prebuild
Change-Id: I54ddac3e5c762cd9209e788fe2ab7d6b863b286c
diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py
index 5540544..f114fe3 100755
--- a/test/testrunner/testrunner.py
+++ b/test/testrunner/testrunner.py
@@ -92,6 +92,9 @@
 # the test name given as the argument to run.
 VARIANT_TYPE_DICT = {}
 
+# The set of all variant sets that are incompatible and will always be skipped.
+NONFUNCTIONAL_VARIANT_SETS = set()
+
 # The set contains all the variants of each time.
 TOTAL_VARIANTS_SET = set()
 
@@ -155,7 +158,11 @@
   VARIANT_TYPE_DICT['jvmti'] = {'no-jvmti', 'jvmti-stress', 'redefine-stress', 'trace-stress',
                                 'field-stress', 'step-stress'}
   VARIANT_TYPE_DICT['compiler'] = {'interp-ac', 'interpreter', 'jit', 'jit-on-first-use',
-                                   'optimizing', 'regalloc_gc', 'speed-profile', 'baseline'}
+                                   'optimizing', 'regalloc_gc',
+                                   'speed-profile', 'baseline'}
+
+  # Regalloc_GC cannot work with prebuild.
+  NONFUNCTIONAL_VARIANT_SETS.add(frozenset({'regalloc_gc', 'prebuild'}))
 
   for v_type in VARIANT_TYPE_DICT:
     TOTAL_VARIANTS_SET = TOTAL_VARIANTS_SET.union(VARIANT_TYPE_DICT.get(v_type))
@@ -760,6 +767,9 @@
         break
     if variants_present:
       return True
+  for bad_combo in NONFUNCTIONAL_VARIANT_SETS:
+    if bad_combo.issubset(variant_set):
+      return True
   return False