Fix failure in --no-dex2oat invocation of 425-invokesuper.

We had two issues:
- dexmerger is broken and sometimes produces invalid dex files,
  thus the test was always failing. b/18051191.
- The reason only no-dex2oat caught it is because it doesn't prebuild,
  and our scripts just do not report an error when the prebuild failed.

I also gave up trying to emit the dex2oat error output in the console.
I clearly don't speak bash.

Change-Id: I34c40902855452ea0f3e0d4733e4149c87236cfe
diff --git a/test/run-test b/test/run-test
index b43668d..843714b 100755
--- a/test/run-test
+++ b/test/run-test
@@ -501,6 +501,8 @@
 fi
 
 good="no"
+good_build="yes"
+good_run="yes"
 if [ "$dev_mode" = "yes" ]; then
     "./${build}" 2>&1
     build_exit="$?"
@@ -548,7 +550,15 @@
     if [ "$build_exit" = '0' ]; then
         echo "${test_dir}: running..." 1>&2
         "./${run}" $run_args "$@" >"$output" 2>&1
+        run_exit="$?"
+        if [ "$run_exit" != "0" ]; then
+            echo "run exit status: $run_exit" 1>&2
+            good_run="no"
+        else
+            good_run="yes"
+        fi
     else
+        good_build="no"
         cp "$build_output" "$output"
         echo "Failed to build in tmpdir=${tmp_dir} from oldwd=${oldwd} and cwd=`pwd`" >> "$output"
         echo "Non-canonical tmpdir was ${noncanonical_tmp_dir}" >> "$output"
@@ -561,9 +571,11 @@
     fi
     ./$check_cmd "$expected" "$output"
     if [ "$?" = "0" ]; then
-        # output == expected
-        good="yes"
-        echo "${test_dir}: succeeded!" 1>&2
+        if [ "$good_build" = "no" -o "$good_run" = "yes" ]; then
+          # output == expected
+          good="yes"
+          echo "${test_dir}: succeeded!" 1>&2
+        fi
     fi
 fi