Added rough support for dejagnu testing. Changes need to be made to autoconf to provi...
authorTanya Lattner <tonic@nondot.org>
Sun, 7 Nov 2004 04:59:52 +0000 (04:59 +0000)
committerTanya Lattner <tonic@nondot.org>
Sun, 7 Nov 2004 04:59:52 +0000 (04:59 +0000)
The dejagnu-clean needs to be fixed to use find.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17555 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile
test/Makefile

index d1459a97a3b2ca7636e7a0182cb5ed4ff0021a69..f2dd759c0932131894b7ffe78eaa1ce8c7aee482 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -35,3 +35,6 @@ check ::
        cd test; $(MAKE) 
 
 tools-only: all
+
+check-dejagnu:
+       cd test; $(MAKE) check-dejagnu
\ No newline at end of file
index 466886ea994fd482252e91849b5d9197ef53f7e7..be621518f2ab80acabb31edb59f1e936a74df35d 100644 (file)
@@ -110,3 +110,31 @@ qmtest-clean:
        $(RM) -f $(LLVM_SRC_ROOT)/test/results.qmr \
                $(LLVM_OBJ_ROOT)/test/results.qmr
 
+EXPECT = expect
+RUNTEST = runtest
+
+check-dejagnu: site.exp
+       $(RUNTEST)
+
+dejagnu-clean:
+       cd $(LLVM_OBJ_ROOT)/test/
+       $(RM) -rf Regression/*/Output
+       $(RM) -rf Regression/*/*/Output
+
+site.exp: Makefile $(LLVM_OBJ_ROOT)/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 i686-pc-linux-gnu" >> site.tmp
+       @echo 'set prcontext $(LLVM_SRC_ROOT)/test/Scripts/prcontext.py' >> site.tmp
+       @echo 'set srcdir $(LLVM_SRC_ROOT)/test' >>site.tmp
+       @echo "set objdir $(LLVM_OBJ_ROOT)/test" >>site.tmp
+       @echo 'set llvmgcc $(LLVMGCCDIR)/bin/gcc' >> site.tmp
+       @echo 'set llvmgxx $(LLVMGCCDIR)/bin/g++' >> 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