Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 46fa74b

Browse files
committed
test-suite: Eliminate the EXIT_OK RunSafely parameter.
- Exit codes already get compared for tests, and only a few tests actually bother to set this. llvm-svn: 166905
1 parent 1144558 commit 46fa74b

File tree

7 files changed

+8
-36
lines changed

7 files changed

+8
-36
lines changed

LLVMSource/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#
66
LEVEL = ..
77
DISABLE_FOR_LLVM_PROGRAMS := 1
8-
PROGRAM_REQUIRED_TO_EXIT_OK := 1
98
REQUIRES_EH_SUPPORT := 1
109

1110
PROGRAMS_TO_TEST := $(basename $(wildcard *.ll))

Makefile.programs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,6 @@ REFERENCE_OUTPUT_KEY :=
8888
endif
8989
endif
9090

91-
# RUNSAFELY - This program simply runs another program. If the program works
92-
# correctly, this script has no effect, otherwise it will do things like print a
93-
# stack trace of a core dump. It always returns "successful" so that tests will
94-
# continue to be run.
95-
ifdef PROGRAM_REQUIRED_TO_EXIT_OK
96-
EXIT_OK := 1
97-
else
98-
EXIT_OK := 0
99-
endif
100-
10191
RUNSAFELY := $(PROGDIR)/RunSafely.sh
10292
RUNSAFELYLOCAL := $(PROGDIR)/RunSafely.sh
10393

@@ -131,8 +121,8 @@ ifdef NO_WATCHDOG
131121
$(warning "NO_WATCHDOG make variable is no longer needed, please remove!")
132122
endif
133123

134-
RUNSAFELY := $(RUNSAFELY) $(RUNTIMELIMIT) $(EXIT_OK)
135-
RUNSAFELYLOCAL := $(RUNSAFELYLOCAL) $(RUNTIMELIMIT) $(EXIT_OK)
124+
RUNSAFELY := $(RUNSAFELY) $(RUNTIMELIMIT)
125+
RUNSAFELYLOCAL := $(RUNSAFELYLOCAL) $(RUNTIMELIMIT)
136126

137127
ifdef EXECUTION_ENVIRONMENT_OVERRIDES
138128
RUNSAFELY := $(RUNSAFELY) -u 'env $(EXECUTION_ENVIRONMENT_OVERRIDES)' $(RUNSAFELY)

MultiSource/Applications/obsequi/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ endif
1212
LDFLAGS = -lsupc++
1313
LIBS += -lsupc++
1414
STDIN_FILENAME=$(PROJ_SRC_DIR)/input
15-
PROGRAM_REQUIRED_TO_EXIT_OK := 1
1615
include ../../Makefile.multisrc

RunSafely.sh

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,14 @@
1111
# fourth argument specified, and outputs a <outfile>.time file which
1212
# contains a timing of the program and the program's exit code.
1313
#
14-
# The <exitok> parameter specifies how the program's exit status
15-
# is interpreted. If the <exitok> parameter is non-zero, any
16-
# non-zero exit status from the program is considered to indicate
17-
# a test failure. If the <exitok> parameter is zero, only exit
18-
# statuses that indicates that the program could not be executed
19-
# normally or that the program was terminated as a signal are
20-
# considered to indicate a test failure.
21-
#
2214
# If optional parameters -r <remote host> -l <remote user> are
2315
# specified, it execute the program remotely using rsh.
2416
#
2517
# Syntax:
2618
#
2719
# RunSafely.sh [-r <rhost>] [-l <ruser>] [-rc <client>] [-rp <port>]
2820
# [-u <under>] [--show-errors] -t <timeit>
29-
# <timeout> <exitok> <infile> <outfile> <program> <args...>
21+
# <timeout> <infile> <outfile> <program> <args...>
3022
#
3123
# where:
3224
# <rhost> is the remote host to execute the program
@@ -36,7 +28,6 @@
3628
# <under> is a wrapper that the program is run under
3729
# <timeit> is a wrapper that is used to collect timing data
3830
# <timeout> is the maximum number of seconds to let the <program> run
39-
# <exitok> is 1 if the program must exit with 0 return code
4031
# <infile> is a file from which standard input is directed
4132
# <outfile> is a file to which standard output and error are directed
4233
# <program> is the path to the program to run
@@ -46,7 +37,7 @@
4637
# fails.
4738

4839
if [ $# -lt 4 ]; then
49-
echo "./RunSafely.sh [-t <PATH>] <timeout> <exitok> <infile> <outfile>" \
40+
echo "./RunSafely.sh [-t <PATH>] <timeout> <infile> <outfile>" \
5041
"<program> <args...>"
5142
exit 1
5243
fi
@@ -99,11 +90,10 @@ if [ "$TIMEIT" = "" ]; then
9990
fi
10091

10192
TIMELIMIT=$1
102-
EXITOK=$2
103-
INFILE=$3
104-
OUTFILE=$4
105-
PROGRAM=$5
106-
shift 5
93+
INFILE=$2
94+
OUTFILE=$3
95+
PROGRAM=$4
96+
shift 4
10797
SYSTEM=`uname -s`
10898

10999
PROG=${PROGRAM}
@@ -179,8 +169,6 @@ elif test "$exitval" -eq 128 ; then
179169
echo "TEST $PROGRAM FAILED: exit status 128!"
180170
elif test "$exitval" -gt 128 ; then
181171
echo "TEST $PROGRAM FAILED: process terminated by signal (exit status $exitval)!"
182-
elif [ "$EXITOK" -ne 0 -a "$exitval" -ne 0 ] ; then
183-
echo "TEST $PROGRAM FAILED: EXIT != 0"
184172
else
185173
fail=no
186174
fi

SingleSource/UnitTests/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,5 @@ ifneq ($(ARCH),x86_64)
3232
PROGRAMS_TO_SKIP += ms_struct-bitfield-init-1 ms_struct-bitfield-init ms_struct-bitfield ms_struct_pack_layout-1 ms_struct_pack_layout ms_struct-bitfield-1
3333
endif
3434

35-
PROGRAM_REQUIRED_TO_EXIT_OK := 1
36-
3735
LDFLAGS += -lstdc++
3836
include $(LEVEL)/SingleSource/Makefile.singlesrc

SingleSource/UnitTests/ObjC++/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ include $(LEVEL)/Makefile.config
55
DIRS :=
66

77
LDFLAGS += -lstdc++ -lobjc -framework Foundation
8-
PROGRAM_REQUIRED_TO_EXIT_OK := 1
98

109
# This is a known gcc / llvm-gcc miscompilation fixed in clang.
1110
ifdef CC_UNDER_TEST_IS_LLVM_GCC

SingleSource/UnitTests/ObjC/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ DISABLE_JIT := 1
66
DIRS :=
77

88
LDFLAGS += -lobjc -framework Foundation
9-
PROGRAM_REQUIRED_TO_EXIT_OK := 1
109

1110
# This is a known gcc / llvm-gcc miscompilation fixed in clang.
1211
ifdef CC_UNDER_TEST_IS_LLVM_GCC

0 commit comments

Comments
 (0)