diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-01-13 18:30:12 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-01-20 14:46:52 +0000 |
commit | 8a460a94c6a442e22187e8b5b3560bed34460f4b (patch) | |
tree | e8f8684388fdee7b3b969667f4016f3d5b434628 | |
parent | aa9d6e30f6581f8b1a803e1e459a2ef3f3dbb697 (diff) | |
download | klee-8a460a94c6a442e22187e8b5b3560bed34460f4b.tar.gz |
Remove the last remnants (I think) of DejaGNU. Goodbye!
Say hello to our new friend, llvm-lit :)
-rw-r--r-- | autoconf/configure.ac | 5 | ||||
-rw-r--r-- | autoconf/m4/path_tclsh.m4 | 39 | ||||
-rwxr-xr-x | configure | 132 | ||||
-rw-r--r-- | test/CXX/dg.exp | 3 | ||||
-rw-r--r-- | test/Coverage/dg.exp | 3 | ||||
-rw-r--r-- | test/Dogfood/dg.exp | 3 | ||||
-rw-r--r-- | test/Expr/Lexer/dg.exp | 3 | ||||
-rw-r--r-- | test/Expr/Parser/dg.exp | 3 | ||||
-rw-r--r-- | test/Expr/dg.exp | 3 | ||||
-rw-r--r-- | test/Feature/dg.exp | 3 | ||||
-rw-r--r-- | test/Makefile | 66 | ||||
-rw-r--r-- | test/Programs/dg.exp | 3 | ||||
-rw-r--r-- | test/Runtime/POSIX/dg.exp | 5 | ||||
-rw-r--r-- | test/Runtime/Uclibc/dg.exp | 5 | ||||
-rw-r--r-- | test/Solver/dg.exp | 3 | ||||
-rwxr-xr-x | test/TestRunner.sh | 37 | ||||
-rw-r--r-- | test/lib/llvm.exp | 199 | ||||
-rw-r--r-- | test/regression/dg.exp | 3 |
18 files changed, 10 insertions, 508 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 5a47e924..af5affc0 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -564,11 +564,6 @@ else AC_SUBST(REQUIRES_RTTI,[[1]]) fi -dnl ************************************************************************** -dnl * Check for dejagnu -dnl ************************************************************************** -AC_PATH_PROG(RUNTEST, [runtest]) -DJ_AC_PATH_TCLSH dnl ************************************************************************** dnl * Create the output files diff --git a/autoconf/m4/path_tclsh.m4 b/autoconf/m4/path_tclsh.m4 deleted file mode 100644 index 85433de7..00000000 --- a/autoconf/m4/path_tclsh.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl This macro checks for tclsh which is required to run dejagnu. On some -dnl platforms (notably FreeBSD), tclsh is named tclshX.Y - this handles -dnl that for us so we can get the latest installed tclsh version. -dnl -AC_DEFUN([DJ_AC_PATH_TCLSH], [ -no_itcl=true -AC_MSG_CHECKING(for the tclsh program in tclinclude directory) -AC_ARG_WITH(tclinclude, - AS_HELP_STRING([--with-tclinclude], - [directory where tcl headers are]), - [with_tclinclude=${withval}],[with_tclinclude='']) -AC_CACHE_VAL(ac_cv_path_tclsh,[ -dnl first check to see if --with-itclinclude was specified -if test x"${with_tclinclude}" != x ; then - if test -f ${with_tclinclude}/tclsh ; then - ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` - elif test -f ${with_tclinclude}/src/tclsh ; then - ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` - else - AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh]) - fi -fi]) - -dnl see if one is installed -if test x"${ac_cv_path_tclsh}" = x ; then - AC_MSG_RESULT(none) - AC_PATH_PROGS([TCLSH],[tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh]) - if test x"${TCLSH}" = x ; then - ac_cv_path_tclsh=''; - else - ac_cv_path_tclsh="${TCLSH}"; - fi -else - AC_MSG_RESULT(${ac_cv_path_tclsh}) - TCLSH="${ac_cv_path_tclsh}" - AC_SUBST(TCLSH) -fi -]) - diff --git a/configure b/configure index 85e7fec2..d343ac69 100755 --- a/configure +++ b/configure @@ -624,8 +624,6 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS -TCLSH -RUNTEST METASMT_ROOT ENABLE_METASMT STP_ROOT @@ -728,7 +726,6 @@ enable_posix_runtime with_runtime with_stp with_metasmt -with_tclinclude ' ac_precious_vars='build_alias host_alias @@ -1379,7 +1376,6 @@ Optional Packages: (default [Release+Asserts]) --with-stp Location of STP installation directory --with-metasmt Location of metaSMT installation directory - --with-tclinclude directory where tcl headers are Some influential environment variables: CC C compiler command @@ -4994,134 +4990,6 @@ $as_echo "#define SUPPORT_METASMT 1" >>confdefs.h fi -# Extract the first word of "runtest", so it can be a program name with args. -set dummy runtest; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_RUNTEST+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $RUNTEST in - [\\/]* | ?:[\\/]*) - ac_cv_path_RUNTEST="$RUNTEST" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_RUNTEST="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -RUNTEST=$ac_cv_path_RUNTEST -if test -n "$RUNTEST"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNTEST" >&5 -$as_echo "$RUNTEST" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -no_itcl=true -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the tclsh program in tclinclude directory" >&5 -$as_echo_n "checking for the tclsh program in tclinclude directory... " >&6; } - -# Check whether --with-tclinclude was given. -if test "${with_tclinclude+set}" = set; then : - withval=$with_tclinclude; with_tclinclude=${withval} -else - with_tclinclude='' -fi - -if ${ac_cv_path_tclsh+:} false; then : - $as_echo_n "(cached) " >&6 -else - -if test x"${with_tclinclude}" != x ; then - if test -f ${with_tclinclude}/tclsh ; then - ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` - elif test -f ${with_tclinclude}/src/tclsh ; then - ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` - else - as_fn_error $? "${with_tclinclude} directory doesn't contain tclsh" "$LINENO" 5 - fi -fi -fi - - -if test x"${ac_cv_path_tclsh}" = x ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - for ac_prog in tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TCLSH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $TCLSH in - [\\/]* | ?:[\\/]*) - ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -TCLSH=$ac_cv_path_TCLSH -if test -n "$TCLSH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5 -$as_echo "$TCLSH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$TCLSH" && break -done - - if test x"${TCLSH}" = x ; then - ac_cv_path_tclsh=''; - else - ac_cv_path_tclsh="${TCLSH}"; - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_path_tclsh}" >&5 -$as_echo "${ac_cv_path_tclsh}" >&6; } - TCLSH="${ac_cv_path_tclsh}" - -fi - ac_config_commands="$ac_config_commands Makefile" diff --git a/test/CXX/dg.exp b/test/CXX/dg.exp deleted file mode 100644 index 879685ca..00000000 --- a/test/CXX/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] diff --git a/test/Coverage/dg.exp b/test/Coverage/dg.exp deleted file mode 100644 index 879685ca..00000000 --- a/test/Coverage/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] diff --git a/test/Dogfood/dg.exp b/test/Dogfood/dg.exp deleted file mode 100644 index 879685ca..00000000 --- a/test/Dogfood/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] diff --git a/test/Expr/Lexer/dg.exp b/test/Expr/Lexer/dg.exp deleted file mode 100644 index 94fc4df8..00000000 --- a/test/Expr/Lexer/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{pc}]] diff --git a/test/Expr/Parser/dg.exp b/test/Expr/Parser/dg.exp deleted file mode 100644 index 94fc4df8..00000000 --- a/test/Expr/Parser/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{pc}]] diff --git a/test/Expr/dg.exp b/test/Expr/dg.exp deleted file mode 100644 index 94fc4df8..00000000 --- a/test/Expr/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{pc}]] diff --git a/test/Feature/dg.exp b/test/Feature/dg.exp deleted file mode 100644 index 879685ca..00000000 --- a/test/Feature/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] diff --git a/test/Makefile b/test/Makefile index 23c891e4..c27ffad3 100644 --- a/test/Makefile +++ b/test/Makefile @@ -11,7 +11,7 @@ LEVEL = .. DIRS = # -# Make Dejagnu the default for testing +# Make llvm-lit the default for testing # all:: check-local @@ -19,12 +19,12 @@ all:: check-local include Makefile.tests #===------------------------------------------------------------------------===# -# DejaGNU testing support +# llvm-lit testing support #===------------------------------------------------------------------------===# +ULIMIT = ulimit -t 600 ; ulimit -d 512000 ; # FIXME: Fix test suite so we can run lit in parallel. ifdef VERBOSE -RUNTESTFLAGS := $(VERBOSE) LIT_ARGS := -j1 -v else LIT_ARGS := -j1 -s -v @@ -32,25 +32,14 @@ endif ifdef TESTSUITE LIT_TESTSUITE := $(TESTSUITE) -CLEANED_TESTSUITE := $(patsubst %/,%,$(TESTSUITE)) -CLEANED_TESTSUITE := $(patsubst test/%,%,$(CLEANED_TESTSUITE)) -RUNTESTFLAGS := --tool $(CLEANED_TESTSUITE) else LIT_TESTSUITE := . endif -ifneq ($(RUNTEST),) -check-local:: site.exp - ( ulimit -t 600 ; ulimit -d 512000 ; \ - PATH="$(ToolDir):$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \ - $(RUNTEST) $(RUNTESTFLAGS) ; \ - ! grep FAIL testrun.log; ! grep -q ^FAIL testrun.log; ) -else -check-local:: site.exp - @echo "*** dejagnu not found. Make sure runtest is in your PATH, then reconfigure llvm." -endif +# Potential support in the future for multiple test suites +LIT_ALL_TESTSUITES := $(LIT_TESTSUITE) -check-local-lit:: lit.site.cfg +check-local:: lit.site.cfg # FIXME: Detect python at configure time ( $(ULIMIT) \ python2 $(LLVM_SRC_ROOT)/utils/lit/lit.py $(LIT_ARGS) $(LIT_TESTSUITE) ) @@ -58,26 +47,7 @@ check-local-lit:: lit.site.cfg check-local-all:: lit.site.cfg # FIXME: Detect python at configure time ( $(ULIMIT) \ - python2 $(LLVM_SRC_ROOT)/utils/lit/lit.py $(LIT_ARGS) $(LIT_TESTSUITE) ) - -ifdef TESTONE -CLEANED_TESTONE := $(patsubst %/,%,$(TESTONE)) -CLEANED_TESTONE := $(patsubst test/%,%,$(CLEANED_TESTONE)) -SUBDIR := $(shell dirname $(CLEANED_TESTONE)) -TESTPATH := $(PROJ_SRC_ROOT)/test/$(CLEANED_TESTONE) -check-one: site.exp $(TCLSH) - $(Verb)( echo "source $(PROJ_OBJ_ROOT)/test/site.exp" ; \ - echo "set subdir $(SUBDIR)" ; \ - echo "proc pass { msg } { puts \"PASS: \$$msg\" } "; \ - echo "proc fail { msg } { puts \"FAIL: \$$msg\" }" ; \ - echo "proc xfail { msg } { puts \"XFAIL: \$$msg\" }" ; \ - echo "proc xpass { msg } { puts \"XPASS: \$$msg\" }" ; \ - echo "source $(PROJ_SRC_ROOT)/test/lib/llvm.exp" ; \ - echo "RunLLVMTests $(TESTPATH)" ) | \ - ( ulimit -t 600 ; ulimit -d 512000 ; \ - PATH="$(ToolDir):$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \ - $(TCLSH) ) -endif + python2 $(LLVM_SRC_ROOT)/utils/lit/lit.py $(LIT_ARGS) $(LIT_ALL_TESTSUITES) ) clean:: $(RM) -rf `find $(PROJ_OBJ_ROOT)/test -name Output -type d -print` @@ -89,28 +59,6 @@ clean:: $(RM) -rf `find $(PROJ_OBJ_ROOT)/test -name test.log` rm -f site.exp -site.exp: Makefile $(LEVEL)/Makefile.config - @echo 'Making a new site.exp file...' - @echo '## these variables are automatically generated by make ##' >site.tmp - @echo '# Do not edit here. If you wish to override these values' >>site.tmp - @echo '# edit the last section' >>site.tmp - @echo 'set target_triplet "$(TARGET_TRIPLE)"' >> site.tmp - @echo 'set ENABLE_UCLIBC "$(ENABLE_UCLIBC)"' >> site.tmp - @echo 'set ENABLE_POSIX_RUNTIME "$(ENABLE_POSIX_RUNTIME)"' >> site.tmp - @echo 'set TEST_FEATURE_LIST "$(TEST_FEATURE_LIST)"' >> site.tmp - @echo 'set srcroot "$(PROJ_SRC_ROOT)"' >>site.tmp - @echo 'set objroot "$(PROJ_OBJ_ROOT)"' >>site.tmp - @echo 'set srcdir "$(PROJ_SRC_ROOT)/test"' >>site.tmp - @echo 'set objdir "$(PROJ_OBJ_ROOT)/test"' >>site.tmp - @echo 'set llvmgcc "$(LLVMCC) -I$(PROJ_SRC_ROOT)/include"' >> site.tmp - @echo 'set llvmgxx "$(LLVMCXX) -I$(PROJ_SRC_ROOT)/include"' >> site.tmp - @echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp - @test ! -f site.exp || \ - sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp - @-rm -f site.bak - @test ! -f site.exp || mv site.exp site.bak - @mv site.tmp site.exp - lit.site.cfg: lit.site.cfg.in @echo "Making KLEE 'lit.site.cfg' file..." @sed -e "s#@KLEE_SOURCE_DIR@#$(PROJ_SRC_ROOT)#g" \ diff --git a/test/Programs/dg.exp b/test/Programs/dg.exp deleted file mode 100644 index 879685ca..00000000 --- a/test/Programs/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] diff --git a/test/Runtime/POSIX/dg.exp b/test/Runtime/POSIX/dg.exp deleted file mode 100644 index 88406208..00000000 --- a/test/Runtime/POSIX/dg.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_lib llvm.exp - -if { [klee_supports_posix_runtime] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] -} diff --git a/test/Runtime/Uclibc/dg.exp b/test/Runtime/Uclibc/dg.exp deleted file mode 100644 index 9c1663c3..00000000 --- a/test/Runtime/Uclibc/dg.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_lib llvm.exp - -if { [klee_supports_uclibc] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] -} diff --git a/test/Solver/dg.exp b/test/Solver/dg.exp deleted file mode 100644 index 94fc4df8..00000000 --- a/test/Solver/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{pc}]] diff --git a/test/TestRunner.sh b/test/TestRunner.sh index 3e2cace4..ab50856a 100755 --- a/test/TestRunner.sh +++ b/test/TestRunner.sh @@ -1,36 +1,5 @@ #!/bin/sh -# -# TestRunner.sh - This script is used to run the deja-gnu tests exactly like -# deja-gnu does, by executing the Tcl script specified in the test case's -# RUN: lines. This is made possible by a simple make target supported by the -# test/Makefile. All this script does is invoke that make target. -# -# Usage: -# TestRunner.sh {script_names} -# -# This script is typically used by cd'ing to a test directory and then -# running TestRunner.sh with a list of test file names you want to run. -# -TESTPATH=`pwd` -SUBDIR="" -if test `dirname $1` = "." ; then - while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do - tmp=`basename $TESTPATH` - SUBDIR="$tmp/$SUBDIR" - TESTPATH=`dirname $TESTPATH` - done -fi +# Deprecated, use 'llvm-lit'. -for TESTFILE in "$@" ; do - if test `dirname $TESTFILE` = . ; then - if test -d "$TESTPATH" ; then - cd $TESTPATH - make check-one TESTONE="$SUBDIR$TESTFILE" - cd $PWD - else - echo "Can't find klee/test directory in " `pwd` - fi - else - make check-one TESTONE=$TESTFILE - fi -done +echo "warning: '$0' is deprecated, use 'llvm-lit' instead." +exec llvm-lit "$@" diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp deleted file mode 100644 index ce52c4b5..00000000 --- a/test/lib/llvm.exp +++ /dev/null @@ -1,199 +0,0 @@ -# This procedure executes one line of a test case's execution script. -proc execOneLine { test PRS outcome lineno line } { - set status 0 - set resultmsg "" - set retval [ catch { eval exec -keepnewline -- $line } errmsg ] - if { $retval != 0 } { - set code [lindex $::errorCode 0] - set lineno [expr $lineno + 1] - if { $PRS != ""} { - set PRS " for $PRS" - } - set errmsg " at line $lineno\nwhile running: $line\n$errmsg" - switch "$code" { - CHILDSTATUS { - set status [lindex $::errorCode 2] - if { $status != 0 } { - set resultmsg "$test$PRS\nFailed with exit($status)$errmsg" - } - } - CHILDKILLED { - set signal [lindex $::errorCode 2] - set resultmsg "$test$PRS\nFailed with signal($signal)$errmsg" - } - CHILDSUSP { - set signal [lindex $::errorCode 2] - set resultmsg "$test$PRS\nFailed with suspend($signal)$errmsg" - } - POSIX { - set posixNum [lindex $::errorCode 1] - set posixMsg [lindex $::errorCode 2] - set resultmsg "$test$PRS\nFailed with posix($posixNum,$posixMsg)$errmsg" - } - NONE { - } - default { - } - } - } - return $resultmsg -} - -# This procedure performs variable substitutions on the RUN: lines of a test -# cases. -proc substitute { line test tmpFile } { - global srcroot objroot srcdir objdir subdir target_triplet - global llvmgcc llvmgxx llvmgcc_version - set path [file join $srcdir $subdir] - - # Substitute all Tcl variables. - set new_line [subst $line ] - - #replace %llvmgcc with actual path to llvmgcc - regsub -all {%llvmgcc} $new_line "$llvmgcc -emit-llvm" new_line - #replace %llvmgxx with actual path to llvmg++ - regsub -all {%llvmgxx} $new_line "$llvmgxx -emit-llvm" new_line - #replace %klee with klee binary - regsub -all {%klee} $new_line "klee" new_line - #replace %kleaver with kleaver binary - regsub -all {%kleaver} $new_line "kleaver" new_line - #replace %p with path to source, - regsub -all {%p} $new_line [file join $srcdir $subdir] new_line - #replace %s with filename - regsub -all {%s} $new_line $test new_line - #replace %t with temp filenames - regsub -all {%t} $new_line $tmpFile new_line - #replace %% with % - regsub -all {%%} $new_line % new_line - return $new_line -} - -# This procedure runs the set of tests for the test_source_files array. -proc RunLLVMTests { test_source_files } { - global srcroot objroot srcdir objdir subdir TEST_FEATURE_LIST target_triplet - set timeout 60 - - set path [file join $objdir $subdir] - - #Make Output Directory if it does not exist already - if { [file exists path] } { - cd $path - } else { - file mkdir $path - cd $path - } - - file mkdir Output - cd Output - - foreach test $test_source_files { - #Should figure out best way to set the timeout - #set timeout 40 - - set filename [file tail $test] - set outcome PASS - set tmpFile "$filename.tmp" - - #set hasRunline bool to check if testcase has a runline - set numLines 0 - - # Open the test file and start reading lines - set testFileId [ open $test r] - set runline "" - set PRNUMS "" - foreach line [split [read $testFileId] \n] { - - # if its the END. line then stop parsing (optimization for big files) - if {[regexp {END.[ *]$} $line match endofscript]} { - break - - # if the line is continued, concatenate and continue the loop - } elseif {[regexp {RUN: *(.+)(\\)$} $line match oneline suffix]} { - set runline "$runline$oneline " - - # if its a terminating RUN: line then do substitution on the whole line - # and then save the line. - } elseif {[regexp {RUN: *([^&]+)(&&)?} $line match oneline suffix]} { - set runline "$runline$oneline" - set runline [ substitute $runline $test $tmpFile ] - set lines($numLines) $runline - set numLines [expr $numLines + 1] - set runline "" - - # if its an PR line, save the problem report number - } elseif {[regexp {PR([0-9]+)} $line match prnum]} { - if {$PRNUMS == ""} { - set PRNUMS "PR$prnum" - } else { - set PRNUMS "$PRNUMS,$prnum" - } - # if its an XFAIL line, see if we should be XFAILing or not. - } elseif {[regexp {XFAIL:[ *](.+)} $line match features]} { - set features - - foreach feature [split $features ,] { - if { [regexp {\*} $feature match] } { - set outcome XFAIL - } elseif { [regexp $feature $target_triplet match] } { - set outcome XFAIL - } elseif { [regexp $feature $TEST_FEATURE_LIST match] } { - set outcome XFAIL - } - } - } - } - - # Done reading the script - close $testFileId - - - if { $numLines == 0 } { - fail "$test: \nDoes not have a RUN line\n" - } else { - set failed 0 - for { set i 0 } { $i < $numLines } { set i [ expr $i + 1 ] } { - regsub ^.*RUN:(.*) $lines($i) \1 theLine - set resultmsg [execOneLine $test $PRNUMS $outcome $i $theLine ] - if { $resultmsg != "" } { - if { $outcome == "XFAIL" } { - xfail "$resultmsg" - } else { - fail "$resultmsg" - } - set failed 1 - break - } - } - if { $failed } { - continue - } else { - if { $PRNUMS != "" } { - set PRNUMS " for $PRNUMS" - } - if { $outcome == "XFAIL" } { - xpass "$test$PRNUMS" - } else { - pass "$test$PRNUMS" - } - } - } - } -} - -# Check if klee was configured with POSIX runtime support. -proc klee_supports_posix_runtime { } { - global ENABLE_POSIX_RUNTIME - if { $ENABLE_POSIX_RUNTIME == "1" } { - return 1 - } - return 0 -} - -# Check if klee was configured with uclibc support. -proc klee_supports_uclibc { } { - global ENABLE_UCLIBC - if { $ENABLE_UCLIBC == "1" } { - return 1 - } - return 0 -} diff --git a/test/regression/dg.exp b/test/regression/dg.exp deleted file mode 100644 index 879685ca..00000000 --- a/test/regression/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] |