Index: test-suite/trunk/External/Nurbs/CMakeLists.txt =================================================================== --- test-suite/trunk/External/Nurbs/CMakeLists.txt +++ test-suite/trunk/External/Nurbs/CMakeLists.txt @@ -17,3 +17,4 @@ llvm_multisource() endif() +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: test-suite/trunk/External/Nurbs/lit.local.cfg =================================================================== --- test-suite/trunk/External/Nurbs/lit.local.cfg +++ test-suite/trunk/External/Nurbs/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: test-suite/trunk/External/Povray/CMakeLists.txt =================================================================== --- test-suite/trunk/External/Povray/CMakeLists.txt +++ test-suite/trunk/External/Povray/CMakeLists.txt @@ -35,3 +35,4 @@ llvm_multisource() endif() +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: test-suite/trunk/External/Povray/lit.local.cfg =================================================================== --- test-suite/trunk/External/Povray/lit.local.cfg +++ test-suite/trunk/External/Povray/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: test-suite/trunk/External/skidmarks10/CMakeLists.txt =================================================================== --- test-suite/trunk/External/skidmarks10/CMakeLists.txt +++ test-suite/trunk/External/skidmarks10/CMakeLists.txt @@ -15,3 +15,4 @@ ) llvm_multisource() endif() +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") Index: test-suite/trunk/External/skidmarks10/lit.local.cfg =================================================================== --- test-suite/trunk/External/skidmarks10/lit.local.cfg +++ test-suite/trunk/External/skidmarks10/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: test-suite/trunk/MultiSource/CMakeLists.txt =================================================================== --- test-suite/trunk/MultiSource/CMakeLists.txt +++ test-suite/trunk/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: test-suite/trunk/MultiSource/lit.local.cfg =================================================================== --- test-suite/trunk/MultiSource/lit.local.cfg +++ test-suite/trunk/MultiSource/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: test-suite/trunk/RunSafely.sh =================================================================== --- test-suite/trunk/RunSafely.sh +++ test-suite/trunk/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 ] " \ @@ -54,6 +56,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 @@ -172,7 +179,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: test-suite/trunk/SingleSource/CMakeLists.txt =================================================================== --- test-suite/trunk/SingleSource/CMakeLists.txt +++ test-suite/trunk/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: test-suite/trunk/SingleSource/lit.local.cfg =================================================================== --- test-suite/trunk/SingleSource/lit.local.cfg +++ test-suite/trunk/SingleSource/lit.local.cfg @@ -0,0 +1 @@ +config.output_append_exitstatus = True Index: test-suite/trunk/lit.cfg =================================================================== --- test-suite/trunk/lit.cfg +++ test-suite/trunk/lit.cfg @@ -110,6 +110,8 @@ runsafely = "%s/RunSafely.sh" % config.test_suite_root runsafely_prefix = [ runsafely ] + if not config.output_append_exitstatus: + runsafely_prefix += ["--omit-exitval"] if config.remote_host: runsafely_prefix += [ "-r", config.remote_host ] if config.remote_user: @@ -215,5 +217,6 @@ config.test_format = TestSuiteTest() config.suffixes = ['.test'] config.excludes = ['ABI-Testsuite'] +config.output_append_exitstatus = False if 'SSH_AUTH_SOCK' in os.environ: config.environment['SSH_AUTH_SOCK'] = os.environ['SSH_AUTH_SOCK']