1 #===- test/Makefile ----------------------------------------*- Makefile -*--===#
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 #===------------------------------------------------------------------------===#
14 # Make Dejagnu the default for testing
18 # Include other test rules
19 include Makefile.tests
21 #===------------------------------------------------------------------------===#
22 # DejaGNU testing support
23 #===------------------------------------------------------------------------===#
26 CLEANED_TESTSUITE := $(patsubst %/,%,$(TESTSUITE))
27 RUNTESTFLAGS := --tool $(CLEANED_TESTSUITE)
30 check-local:: site.exp
31 PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \
32 $(RUNTEST) $(RUNTESTFLAGS)
35 $(RM) -rf `find $(LLVM_OBJ_ROOT)/test/Regression -name Output -type d -print`
36 $(RM) -rf `find $(LLVM_OBJ_ROOT)/test/Feature -name Output -type d -print`
38 site.exp: Makefile $(LLVM_OBJ_ROOT)/Makefile.config
39 @echo 'Making a new site.exp file...'
40 @echo '## these variables are automatically generated by make ##' >site.tmp
41 @echo '# Do not edit here. If you wish to override these values' >>site.tmp
42 @echo '# edit the last section' >>site.tmp
43 @echo "set target_triplet $(TARGET_TRIPLE)" >> site.tmp
44 @echo 'set prcontext "$(TCLSH) $(LLVM_SRC_ROOT)/test/Scripts/prcontext.tcl"' >> site.tmp
45 @echo 'set srcdir $(LLVM_SRC_ROOT)/test' >>site.tmp
46 @echo "set objdir $(LLVM_OBJ_ROOT)/test" >>site.tmp
47 @echo 'set llvmgcc "PATH=$(LLVMToolDir):$(PATH) $(LLVMGCC)"' >> site.tmp
48 @echo 'set llvmgxx "PATH=$(LLVMToolDir):$(PATH) $(LLVMGCC)"' >> site.tmp
49 @echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp
50 @test ! -f site.exp || \
51 sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
53 @test ! -f site.exp || mv site.exp site.bak