llvm.org GIT mirror llvm / b3593a6
[tests] Remove some remaining DejaGNU related cruft. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156393 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 8 years ago
4 changed file(s) with 15 addition(s) and 241 deletion(s). Raw diff Collapse all Expand all
10251025 AC_PATH_PROG(BZIP2, [bzip2])
10261026 AC_PATH_PROG(CAT, [cat])
10271027 AC_PATH_PROG(DOXYGEN, [doxygen])
1028 AC_PATH_PROG(GROFF, [groff])
10291028 AC_PATH_PROG(GZIPBIN, [gzip])
1030 AC_PATH_PROG(PDFROFF, [pdfroff])
1031 AC_PATH_PROG(RUNTEST, [runtest])
10321029 DJ_AC_PATH_TCLSH
10331030 AC_PATH_PROG(ZIP, [zip])
10341031 AC_PATH_PROGS(OCAMLC, [ocamlc])
10351032 AC_PATH_PROGS(OCAMLOPT, [ocamlopt])
10361033 AC_PATH_PROGS(OCAMLDEP, [ocamldep])
10371034 AC_PATH_PROGS(OCAMLDOC, [ocamldoc])
1038 AC_PATH_PROGS(GAS, [gas as])
10391035
10401036 dnl Get the version of the linker in use.
10411037 AC_LINK_GET_VERSION
740740 BZIP2
741741 CAT
742742 DOXYGEN
743 GROFF
744743 GZIPBIN
745 PDFROFF
746 RUNTEST
747744 TCLSH
748745 ZIP
749746 OCAMLC
750747 OCAMLOPT
751748 OCAMLDEP
752749 OCAMLDOC
753 GAS
754750 HAVE_LINK_VERSION_SCRIPT
755751 INSTALL_LTDL_TRUE
756752 INSTALL_LTDL_FALSE
71167112 fi
71177113
71187114
7119 # Extract the first word of "groff", so it can be a program name with args.
7120 set dummy groff; ac_word=$2
7121 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7123 if test "${ac_cv_path_GROFF+set}" = set; then
7124 echo $ECHO_N "(cached) $ECHO_C" >&6
7125 else
7126 case $GROFF in
7127 [\\/]* | ?:[\\/]*)
7128 ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
7129 ;;
7130 *)
7131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132 for as_dir in $PATH
7133 do
7134 IFS=$as_save_IFS
7135 test -z "$as_dir" && as_dir=.
7136 for ac_exec_ext in '' $ac_executable_extensions; do
7137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
7138 ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
7139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7140 break 2
7141 fi
7142 done
7143 done
7144 IFS=$as_save_IFS
7145
7146 ;;
7147 esac
7148 fi
7149 GROFF=$ac_cv_path_GROFF
7150 if test -n "$GROFF"; then
7151 { echo "$as_me:$LINENO: result: $GROFF" >&5
7152 echo "${ECHO_T}$GROFF" >&6; }
7153 else
7154 { echo "$as_me:$LINENO: result: no" >&5
7155 echo "${ECHO_T}no" >&6; }
7156 fi
7157
7158
71597115 # Extract the first word of "gzip", so it can be a program name with args.
71607116 set dummy gzip; ac_word=$2
71617117 { echo "$as_me:$LINENO: checking for $ac_word" >&5
71967152 fi
71977153
71987154
7199 # Extract the first word of "pdfroff", so it can be a program name with args.
7200 set dummy pdfroff; ac_word=$2
7201 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7202 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7203 if test "${ac_cv_path_PDFROFF+set}" = set; then
7204 echo $ECHO_N "(cached) $ECHO_C" >&6
7205 else
7206 case $PDFROFF in
7207 [\\/]* | ?:[\\/]*)
7208 ac_cv_path_PDFROFF="$PDFROFF" # Let the user override the test with a path.
7209 ;;
7210 *)
7211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212 for as_dir in $PATH
7213 do
7214 IFS=$as_save_IFS
7215 test -z "$as_dir" && as_dir=.
7216 for ac_exec_ext in '' $ac_executable_extensions; do
7217 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
7218 ac_cv_path_PDFROFF="$as_dir/$ac_word$ac_exec_ext"
7219 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7220 break 2
7221 fi
7222 done
7223 done
7224 IFS=$as_save_IFS
7225
7226 ;;
7227 esac
7228 fi
7229 PDFROFF=$ac_cv_path_PDFROFF
7230 if test -n "$PDFROFF"; then
7231 { echo "$as_me:$LINENO: result: $PDFROFF" >&5
7232 echo "${ECHO_T}$PDFROFF" >&6; }
7233 else
7234 { echo "$as_me:$LINENO: result: no" >&5
7235 echo "${ECHO_T}no" >&6; }
7236 fi
7237
7238
7239 # Extract the first word of "runtest", so it can be a program name with args.
7240 set dummy runtest; ac_word=$2
7241 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7243 if test "${ac_cv_path_RUNTEST+set}" = set; then
7244 echo $ECHO_N "(cached) $ECHO_C" >&6
7245 else
7246 case $RUNTEST in
7247 [\\/]* | ?:[\\/]*)
7248 ac_cv_path_RUNTEST="$RUNTEST" # Let the user override the test with a path.
7249 ;;
7250 *)
7251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7252 for as_dir in $PATH
7253 do
7254 IFS=$as_save_IFS
7255 test -z "$as_dir" && as_dir=.
7256 for ac_exec_ext in '' $ac_executable_extensions; do
7257 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
7258 ac_cv_path_RUNTEST="$as_dir/$ac_word$ac_exec_ext"
7259 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7260 break 2
7261 fi
7262 done
7263 done
7264 IFS=$as_save_IFS
7265
7266 ;;
7267 esac
7268 fi
7269 RUNTEST=$ac_cv_path_RUNTEST
7270 if test -n "$RUNTEST"; then
7271 { echo "$as_me:$LINENO: result: $RUNTEST" >&5
7272 echo "${ECHO_T}$RUNTEST" >&6; }
7273 else
7274 { echo "$as_me:$LINENO: result: no" >&5
7275 echo "${ECHO_T}no" >&6; }
7276 fi
7277
7278
72797155
72807156 no_itcl=true
72817157 { echo "$as_me:$LINENO: checking for the tclsh program in tclinclude directory" >&5
75847460
75857461
75867462 test -n "$OCAMLDOC" && break
7587 done
7588
7589 for ac_prog in gas as
7590 do
7591 # Extract the first word of "$ac_prog", so it can be a program name with args.
7592 set dummy $ac_prog; ac_word=$2
7593 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7595 if test "${ac_cv_path_GAS+set}" = set; then
7596 echo $ECHO_N "(cached) $ECHO_C" >&6
7597 else
7598 case $GAS in
7599 [\\/]* | ?:[\\/]*)
7600 ac_cv_path_GAS="$GAS" # Let the user override the test with a path.
7601 ;;
7602 *)
7603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7604 for as_dir in $PATH
7605 do
7606 IFS=$as_save_IFS
7607 test -z "$as_dir" && as_dir=.
7608 for ac_exec_ext in '' $ac_executable_extensions; do
7609 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
7610 ac_cv_path_GAS="$as_dir/$ac_word$ac_exec_ext"
7611 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7612 break 2
7613 fi
7614 done
7615 done
7616 IFS=$as_save_IFS
7617
7618 ;;
7619 esac
7620 fi
7621 GAS=$ac_cv_path_GAS
7622 if test -n "$GAS"; then
7623 { echo "$as_me:$LINENO: result: $GAS" >&5
7624 echo "${ECHO_T}$GAS" >&6; }
7625 else
7626 { echo "$as_me:$LINENO: result: no" >&5
7627 echo "${ECHO_T}no" >&6; }
7628 fi
7629
7630
7631 test -n "$GAS" && break
76327463 done
76337464
76347465
1032310154 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1032410155 lt_status=$lt_dlunknown
1032510156 cat > conftest.$ac_ext <
10326 #line 10327 "configure"
10157 #line 10158 "configure"
1032710158 #include "confdefs.h"
1032810159
1032910160 #if HAVE_DLFCN_H
2214321974 BZIP2!$BZIP2$ac_delim
2214421975 CAT!$CAT$ac_delim
2214521976 DOXYGEN!$DOXYGEN$ac_delim
22146 GROFF!$GROFF$ac_delim
2214721977 GZIPBIN!$GZIPBIN$ac_delim
22148 PDFROFF!$PDFROFF$ac_delim
22149 RUNTEST!$RUNTEST$ac_delim
2215021978 TCLSH!$TCLSH$ac_delim
2215121979 ZIP!$ZIP$ac_delim
2215221980 OCAMLC!$OCAMLC$ac_delim
2215321981 OCAMLOPT!$OCAMLOPT$ac_delim
2215421982 OCAMLDEP!$OCAMLDEP$ac_delim
2215521983 OCAMLDOC!$OCAMLDOC$ac_delim
22156 GAS!$GAS$ac_delim
2215721984 HAVE_LINK_VERSION_SCRIPT!$HAVE_LINK_VERSION_SCRIPT$ac_delim
2215821985 INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim
2215921986 INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim
2219322020 LTLIBOBJS!$LTLIBOBJS$ac_delim
2219422021 _ACEOF
2219522022
22196 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
22023 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then
2219722024 break
2219822025 elif $ac_last_try; then
2219922026 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
308308 Lit documentation for more
309309 information.

310310
311

The llvm-runtests function looks at each file that is passed to

312 it and gathers any lines together that match "RUN:". These are the "RUN" lines
313 that specify how the test is to be run. So, each test script must contain
314 RUN lines if it is to do anything. If there are no RUN lines, the
315 llvm-runtests function will issue an error and the test will
316 fail.

311

The lit test runner looks at each file that is passed to it and

312 gathers any lines together that match "RUN:". These are the "RUN" lines that
313 specify how the test is to be run. So, each test script must contain RUN lines
314 if it is to do anything. If there are no RUN lines, lit function will
315 issue an error and the test will fail.

317316
318317

RUN lines are specified in the comments of the test program using the

319318 keyword RUN followed by a colon, and lastly the command (pipeline)
320319 to execute. Together, these lines form the "script" that
321 llvm-runtests executes to run the test case. The syntax of the
322 RUN lines is similar to a shell's syntax for pipelines including I/O
323 redirection and variable substitution. However, even though these lines
324 may look like a shell script, they are not. RUN lines are interpreted
325 directly by the Tcl exec command. They are never executed by a
326 shell. Consequently the syntax differs from normal shell script syntax in a
327 few ways. You can specify as many RUN lines as needed.

320 lit executes to run the test case. The syntax of the RUN lines is
321 similar to a shell's syntax for pipelines including I/O redirection and
322 variable substitution. However, even though these lines may look like
323 a shell script, they are not. RUN lines are interpreted directly by the
324 Tcl exec command. They are never executed by a shell. Consequently
325 the syntax differs from normal shell script syntax in a few ways. You can
326 specify as many RUN lines as needed.

328327
329328

lit performs substitution on each RUN line to replace LLVM tool

330329 names with the full paths to the executable built for each tool (in
812811
813812
814813
815

To make the output more useful, the llvm_runtest function wil

816 scan the lines of the test case for ones that contain a pattern that matches
817 PR[0-9]+. This is the syntax for specifying a PR (Problem Report) number that
818 is related to the test case. The number after "PR" specifies the LLVM bugzilla
819 number. When a PR number is specified, it will be used in the pass/fail
820 reporting. This is useful to quickly get some context when a test fails.

821
822814

Finally, any line that contains "END." will cause the special

823815 interpretation of lines to terminate. This is generally done right after the
824816 last RUN: line. This has two side effects: (a) it prevents special
2626 endif
2727
2828 ifdef VERBOSE
29 RUNTESTFLAGS := $(VERBOSE)
3029 LIT_ARGS := -v
3130 else
3231 LIT_ARGS := -s -v
4140 LIT_TESTSUITE := $(TESTSUITE)
4241 CLEANED_TESTSUITE := $(patsubst %/,%,$(TESTSUITE))
4342 CLEANED_TESTSUITE := $(patsubst test/%,%,$(CLEANED_TESTSUITE))
44 RUNTESTFLAGS += --tool $(CLEANED_TESTSUITE)
4543 else
4644 LIT_TESTSUITE := .
4745 endif
7573 IGNORE_TESTS += llvm2cpp.exp
7674 endif
7775
78 ifdef IGNORE_TESTS
79 RUNTESTFLAGS += --ignore "$(strip $(IGNORE_TESTS))"
80 endif
81
8276 # ulimits like these are redundantly enforced by the buildbots, so
8377 # just removing them here won't work.
8478 # Both AuroraUX & Solaris do not have the -m flag for ulimit
9286 ULIMIT=ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -v 1024000 ;
9387 endif # AuroraUX
9488 endif # SunOS
95
96 ifneq ($(RUNTEST),)
97 check-local-dg:: site.exp
98 ( $(ULIMIT) \
99 PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(LLVMGCCDIR)/bin:$(PATH)" \
100 $(RUNTEST) $(RUNTESTFLAGS) )
101 else
102 check-local-dg:: site.exp
103 @echo "*** dejagnu not found. Make sure 'runtest' is in your PATH, then reconfigure LLVM."
104 endif
10589
10690 check-local-lit:: lit.site.cfg Unit/lit.site.cfg
10791 ( $(ULIMIT) \
128112
129113 FORCE:
130114
131 site.exp: FORCE
132 @echo 'Making a new site.exp file...'
133 @echo '## Autogenerated by LLVM configuration.' > site.tmp
134 @echo '# Do not edit!' >> site.tmp
135 @echo 'set target_triplet "$(TARGET_TRIPLE)"' >> site.tmp
136 @echo 'set TARGETS_TO_BUILD "$(TARGETS_TO_BUILD)"' >> site.tmp
137 @echo 'set llvmshlibdir "$(SharedLibDir)"' >>site.tmp
138 @echo 'set llvm_bindings "$(BINDINGS_TO_BUILD)"' >> site.tmp
139 @echo 'set srcroot "$(LLVM_SRC_ROOT)"' >>site.tmp
140 @echo 'set objroot "$(LLVM_OBJ_ROOT)"' >>site.tmp
141 @echo 'set srcdir "$(LLVM_SRC_ROOT)/test"' >>site.tmp
142 @echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp
143 @echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
144 @echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp
145 @echo 'set ocamlopt "$(OCAMLOPT) -cc \"$(CXX_FOR_OCAMLOPT)\" -I $(LibDir)/ocaml"' >> site.tmp
146 @echo 'set valgrind "$(VALGRIND)"' >> site.tmp
147 @echo 'set grep "$(GREP)"' >>site.tmp
148 @echo 'set gas "$(GAS)"' >>site.tmp
149 @echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp
150 @test ! -f site.exp || \
151 sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
152 @-rm -f site.bak
153 @test ! -f site.exp || mv site.exp site.bak
154 @mv site.tmp site.exp
155
156115 ifeq ($(DISABLE_ASSERTIONS),1)
157116 ENABLE_ASSERTIONS=0
158117 else
159118 ENABLE_ASSERTIONS=1
160119 endif
161120
162 lit.site.cfg: site.exp
121 lit.site.cfg: FORCE
163122 @echo "Making LLVM 'lit.site.cfg' file..."
164123 @$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
165124 @$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp