X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FMakefile;h=29f823666a88cef6cfba210de9a7cbe173211054;hb=e8a63eb78fc38853f951d77d171461e7ff651ad4;hp=4934e414e3b51ef7fa9c894858e7d1226adf9204;hpb=cf8a5f899b9d5ed7a37c45084ef85751d8c7ce05;p=oota-llvm.git diff --git a/test/Makefile b/test/Makefile index 4934e414e3b..29f823666a8 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,32 +1,85 @@ -TESTS := $(wildcard *.ll) +LEVEL = .. +DIRS = Programs +include Makefile.tests -SELECTTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch") +# +# Make QMTest the default for testing features and regressions +# +all:: qmtest -test all : testasmdis testopt - @echo "All tests successfully completed!" +# +# New QMTest functionality: +# The test suite is being transitioned over to QMTest. Eventually, it +# will use QMTest by default. +# -testasmdis : $(TESTS:%.ll=%.ll.asmdis) - @echo "All assembler/disassembler test succeeded!" +# QMTest option specifying the location of the QMTest database. +QMDB= -D $(LLVM_SRC_ROOT)/test +QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest -testopt : $(TESTS:%.ll=%.ll.opt) +# +# This is configuration information used by the test suite. In QM Test, it's +# called a 'context.' +# +CONTEXT= -c "srcroot=$(LLVM_SRC_ROOT)" \ + -c "buildroot=$(LLVM_OBJ_ROOT)" \ + -c "buildtype=$(CONFIGURATION)" \ + -c "tmpdir=$(LLVM_OBJ_ROOT)/test/tmp" \ + -c "coresize=0" \ + -c "cc=$(CC)" \ + -c "cxx=$(CXX)" \ + -c "llvmgcc=$(LLVMGCC)" \ + -c "llvmgxx=$(LLVMGXX)" \ + -c "make=$(MAKE)" -testselect : $(SELECTTESTS:%.ll=%.mc) +# +# Location of the QMTest program. +# +QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB) -clean : - rm -f *.[123] *.bc *.mc core -%.asmdis: % - @echo "Running assembler/disassembler test on $<" - @./TestAsmDisasm.sh $< +# +# Execute the tests +# +qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register + -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT) -%.opt: % - @echo "Running optimizier test on $<" - @./TestOptimizer.sh $< +%.t:: $(LLVM_OBJ_ROOT)/test/tmp register + -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT) $* -%.bc: %.ll - rm -f $@ - as $< +# +# Create the temporary directory used by the test suite. +# +$(LLVM_OBJ_ROOT)/test/tmp:: + ${MKDIR} $(LLVM_OBJ_ROOT)/test/tmp + +# +# Right now, QMTest compiles the python test classes and put them into the +# source tree. Since Python bytecode is *not* cross-platform compatible (I +# think), we'll regenerate every time. +# +# Simultaneous builds won't work, but shared source trees will. +# +register: + $(QMTEST) register test llvm.TestAsmDisasm + $(QMTEST) register test llvm.AssembleTest + $(QMTEST) register test llvm.ConvertToCTest + $(QMTEST) register test llvm.LLToCTest + $(QMTEST) register test llvm.MachineCodeTest + $(QMTEST) register test llvm.TestOptimizer + $(QMTEST) register test llvm.LLITest + $(QMTEST) register test llvm.TestRunner + $(QMTEST) register test llvm.VerifierTest + $(QMTEST) register test llvm.CTest + $(QMTEST) register test llvm.CXXTest + $(QMTEST) register database llvmdb.llvmdb + +# +# Start up the QMTest GUI +# +gui:: + $(QMTEST) gui --no-browser --daemon + +clean:: + $(RM) -rf $(LLVM_OBJ_ROOT)/test/tmp -%.mc: %.bc - @echo "Generating machine instructions for $<" - @llc -dselect y $< > $@