[llvm-commits] [test-suite] r166845 - in /test-suite/trunk: Makefile.programs RunSafely.sh

Daniel Dunbar daniel at zuster.org
Fri Oct 26 17:28:04 PDT 2012


Author: ddunbar
Date: Fri Oct 26 19:28:04 2012
New Revision: 166845

URL: http://llvm.org/viewvc/llvm-project?rev=166845&view=rev
Log:
test-suite: Update TEST=simple to show compile errors in log.

Modified:
    test-suite/trunk/Makefile.programs
    test-suite/trunk/RunSafely.sh

Modified: test-suite/trunk/Makefile.programs
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=166845&r1=166844&r2=166845&view=diff
==============================================================================
--- test-suite/trunk/Makefile.programs (original)
+++ test-suite/trunk/Makefile.programs Fri Oct 26 19:28:04 2012
@@ -129,7 +129,7 @@
 endif
 
 RUNSAFELY := $(RUNSAFELY) -t "$(TIMEIT_TARGET)"
-RUNSAFELYLOCAL := $(RUNSAFELYLOCAL) -t "$(TIMEIT)"
+RUNSAFELYLOCAL := $(RUNSAFELYLOCAL) --show-errors -t "$(TIMEIT)"
 
 ifdef NO_WATCHDOG
 $(warning "NO_WATCHDOG make variable is no longer needed, please remove!")

Modified: test-suite/trunk/RunSafely.sh
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/RunSafely.sh?rev=166845&r1=166844&r2=166845&view=diff
==============================================================================
--- test-suite/trunk/RunSafely.sh (original)
+++ test-suite/trunk/RunSafely.sh Fri Oct 26 19:28:04 2012
@@ -25,7 +25,7 @@
 # Syntax:
 #
 #   RunSafely.sh [-r <rhost>] [-l <ruser>] [-rc <client>] [-rp <port>]
-#                [-u <under>] -t <timeit>
+#                [-u <under>] [--show-errors] -t <timeit>
 #                <timeout> <exitok> <infile> <outfile> <program> <args...>
 #
 #   where:
@@ -42,6 +42,9 @@
 #     <program> is the path to the program to run
 #     <args...> are the arguments to pass to the program.
 #
+# If --show-errors is given, then the output file will be printed if the command
+# fails.
+
 if [ $# -lt 4 ]; then
   echo "./RunSafely.sh [-t <PATH>] <timeout> <exitok> <infile> <outfile>" \
        "<program> <args...>"
@@ -60,6 +63,7 @@
 RPORT=
 RUN_UNDER=
 TIMEIT=
+SHOW_ERRORS=0
 if [ $1 = "-r" ]; then
   RHOST=$2
   shift 2
@@ -80,6 +84,10 @@
   RUN_UNDER=$2
   shift 2
 fi
+if [ $1 = "--show-errors" ]; then
+  SHOW_ERRORS=1
+  shift 1
+fi
 if [ $1 = "-t" ]; then
   TIMEIT=$2
   shift 2
@@ -185,6 +193,12 @@
 if [ "${fail}" != "no" ]; then
   echo "RunSafely.sh detected a failure with these command-line arguments: " \
        "$ORIG_ARGS" >> $OUTFILE
+  if [ "$SHOW_ERRORS" = "1" ]; then
+      echo "error: command failed while generating $OUTFILE"
+      echo "---"
+      cat $OUTFILE
+      echo "---"
+  fi
 fi
 
 # Always return "successful" so that tests will continue to be run.





More information about the llvm-commits mailing list