X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FMakefile;h=29f823666a88cef6cfba210de9a7cbe173211054;hb=e8a63eb78fc38853f951d77d171461e7ff651ad4;hp=67fdee0e13f70a98a55d8bc23feffab7ddd58fd7;hpb=1b654bd347f74845681f26bd54e081442256dfb7;p=oota-llvm.git diff --git a/test/Makefile b/test/Makefile index 67fdee0e13f..29f823666a8 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,37 +1,85 @@ LEVEL = .. DIRS = Programs +include Makefile.tests -TESTS := $(wildcard *.ll) - -LLCTESTS := $(shell /bin/ls *.ll | grep -v testswitch | grep -v opttest | grep -v xx | grep -v calltest | grep -v alloca | grep -v memory ) +# +# Make QMTest the default for testing features and regressions +# +all:: qmtest +# +# New QMTest functionality: +# The test suite is being transitioned over to QMTest. Eventually, it +# will use QMTest by default. +# -test all :: testasmdis testopt testsparc - @echo "All tests successfully completed!" +# QMTest option specifying the location of the QMTest database. +QMDB= -D $(LLVM_SRC_ROOT)/test +QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest -testasmdis : $(TESTS:%.ll=%.ll.asmdis) - @echo "All assembler/disassembler test succeeded!" +# +# 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)" -testopt : $(TESTS:%.ll=%.ll.opt) +# +# Location of the QMTest program. +# +QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB) -testselect : $(LLCTESTS:%.ll=%.mc) -testsched : $(LLCTESTS:%.ll=%.mc) +# +# Execute the tests +# +qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register + -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT) -testcodegen : $(LLCTESTS:%.ll=%.mc) +%.t:: $(LLVM_OBJ_ROOT)/test/tmp register + -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT) $* -testsparc : $(LLCTESTS:%.ll=%.s) +# +# Create the temporary directory used by the test suite. +# +$(LLVM_OBJ_ROOT)/test/tmp:: + ${MKDIR} $(LLVM_OBJ_ROOT)/test/tmp -%.asmdis: % - @echo "Running assembler/disassembler test on $<" - @./TestAsmDisasm.sh $< +# +# 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 -%.opt: % - @echo "Running optimizier test on $<" - @./TestOptimizer.sh $< +# +# Start up the QMTest GUI +# +gui:: + $(QMTEST) gui --no-browser --daemon +clean:: + $(RM) -rf $(LLVM_OBJ_ROOT)/test/tmp -## Rules for compiling %.ll, %.bc, %.s files and -## for building native SPARC executables. -## -include Makefile.tests