Disable Checker for tests that don't invoke the compiler.

Running tests in no-prebuild mode will resort to running the
interpreter when either dex2oat or patchoat are not available, thus
not producing the CFG dump tested by Checker. This patch disables
Checker under such configurations.

Bug: 22552692

Change-Id: I23c97aa0aa627675861ef84f8c570303b614d9af
diff --git a/test/run-test b/test/run-test
index eabbab3..56ae480 100755
--- a/test/run-test
+++ b/test/run-test
@@ -621,9 +621,13 @@
   USE_JACK="false"
 
   if [ "$runtime" = "art" -a "$image_suffix" = "-optimizing" -a "$target_mode" = "no" -a "$debuggable" = "no" ]; then
-    run_checker="yes"
-    run_args="${run_args} -Xcompiler-option --dump-cfg=$tmp_dir/$cfg_output \
-                          -Xcompiler-option -j1"
+    # In no-prebuild mode, the compiler is only invoked if both dex2oat and
+    # patchoat are available. Disable Checker otherwise (b/22552692).
+    if [ "$prebuild_mode" = "yes" ] || [ "$have_patchoat" = "yes" -a "$have_dex2oat" = "yes" ]; then
+      run_checker="yes"
+      run_args="${run_args} -Xcompiler-option --dump-cfg=$tmp_dir/$cfg_output \
+                            -Xcompiler-option -j1"
+    fi
   fi
 fi