Index: External/Nurbs/CMakeLists.txt =================================================================== --- External/Nurbs/CMakeLists.txt +++ External/Nurbs/CMakeLists.txt @@ -18,3 +18,5 @@ llvm_multisource() llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS}) + +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: External/Nurbs/lit.local.cfg =================================================================== --- /dev/null +++ External/Nurbs/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: External/Povray/CMakeLists.txt =================================================================== --- External/Povray/CMakeLists.txt +++ External/Povray/CMakeLists.txt @@ -12,3 +12,5 @@ set(RUN_OPTIONS -I${TEST_SUITE_POVRAY_ROOT}/scenes/advanced/chess2.pov -L${TEST_SUITE_POVRAY_ROOT}/include -GA$<.junk -O-) llvm_multisource() + +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: External/Povray/lit.local.cfg =================================================================== --- /dev/null +++ External/Povray/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: External/skidmarks10/CMakeLists.txt =================================================================== --- External/skidmarks10/CMakeLists.txt +++ External/skidmarks10/CMakeLists.txt @@ -19,3 +19,5 @@ llvm_multisource() llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS}) + +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: External/skidmarks10/lit.local.cfg =================================================================== --- /dev/null +++ External/skidmarks10/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: MultiSource/CMakeLists.txt =================================================================== --- MultiSource/CMakeLists.txt +++ MultiSource/CMakeLists.txt @@ -11,3 +11,5 @@ llvm_multisource() llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS}) + +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: MultiSource/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: RunSafely.sh =================================================================== --- RunSafely.sh +++ RunSafely.sh @@ -17,7 +17,7 @@ # Syntax: # # RunSafely.sh [-r ] [-l ] [-rc ] [-rp ] -# [-u ] [--show-errors] -t +# [-u ] [--show-errors] [--omit-exitval] -t # # # where: @@ -35,6 +35,8 @@ # # If --show-errors is given, then the output file will be printed if the command # fails (returns a non-zero exit code). +# Unless --omit-exitval is given the last line of the outfile has the form +# "exit NN" with NN being the exit status number of the program. if [ $# -lt 4 ]; then echo "./RunSafely.sh [-t ] " \ @@ -55,6 +57,11 @@ RUN_UNDER= TIMEIT= SHOW_ERRORS=0 +OMIT_EXITVAL=0 +if [ $1 = "--omit-exitval" ]; then + OMIT_EXITVAL=1 + shift 1 +fi if [ $1 = "-r" ]; then RHOST=$2 shift 2 @@ -168,7 +175,9 @@ else fail=no fi -echo "exit $exitval" >> $OUTFILE +if [ "$OMIT_EXITVAL" -ne 1 ]; then + echo "exit $exitval" >> $OUTFILE +fi # If we detected a failure, print the name of the test executable to the # output file. This will cause it to compare as different with other runs Index: SingleSource/CMakeLists.txt =================================================================== --- SingleSource/CMakeLists.txt +++ SingleSource/CMakeLists.txt @@ -12,3 +12,5 @@ llvm_singlesource() llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS}) + +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: SingleSource/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: lit.cfg =================================================================== --- lit.cfg +++ lit.cfg @@ -118,6 +118,8 @@ timeout = "7200" runsafely_prefix = ["%s/RunSafely.sh" % config.test_suite_root, "-t", timeit, timeout, stdin, outfile] + if not litConfig.output_append_exitstatus: + runsafely_prefix += ["--omit-exitval"] line = " ".join(map(quote, runsafely_prefix + commandline)) return line @@ -172,3 +174,4 @@ config.test_format = TestSuiteTest() config.suffixes = ['.test'] config.excludes = ['ABI-Testsuite'] +config.output_append_exitstatus = False