ART: Print args in case of run-test build failure

Bug: 17959926
Change-Id: If1a6bf0341248818bef6c2a11e0677803c07ad3f
diff --git a/test/089-many-methods/check b/test/089-many-methods/check
index ec6733d..594626a 100755
--- a/test/089-many-methods/check
+++ b/test/089-many-methods/check
@@ -15,6 +15,6 @@
 # limitations under the License.
 
 # Strip build error debug messages, as they are environment-specific.
-sed -e '/^Failed to build/d' -e '/^Non-canonical tmpdir/d' "$2" > "$2.tmp"
+sed -e '/^Failed to build/d' -e '/^Non-canonical tmpdir/d' -e '/^Args:/d' "$2" > "$2.tmp"
 
 diff --strip-trailing-cr -q "$1" "$2.tmp" >/dev/null
\ No newline at end of file
diff --git a/test/run-test b/test/run-test
index 36288d7..73ffc31 100755
--- a/test/run-test
+++ b/test/run-test
@@ -17,6 +17,7 @@
 # Set up prog to be the path of this script, including following symlinks,
 # and set up progdir to be the fully-qualified pathname of its directory.
 prog="$0"
+args="$@"
 while [ -h "${prog}" ]; do
     newProg=`/bin/ls -ld "${prog}"`
     newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
@@ -528,6 +529,7 @@
         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"
+        echo "Args: ${args}" >> "output"
         echo "build exit status: $build_exit" >> "$output"
     fi
     ./$check_cmd "$expected" "$output"