5 # Make QMTest the default for testing features and regressions
6 # Do this first to force QMTest to run first
11 # Include other test rules
13 include Makefile.tests
16 # New QMTest functionality:
17 # The test suite is being transitioned over to QMTest. Eventually, it
18 # will use QMTest by default.
21 # QMTest option specifying the location of the QMTest database.
22 QMDB= -D $(LLVM_SRC_ROOT)/test
23 QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest
26 # Determine which expectations file we will use
28 QMEXPECT:=$(LLVM_SRC_ROOT)/test/QMTest/expectations.unknown.qmr
30 QMEXPECT:=$(LLVM_SRC_ROOT)/test/QMTest/expectations.linux.qmr
34 QMEXPECT:=$(LLVM_SRC_ROOT)/test/QMTest/expectations.sunos.qmr
38 QMEXPECT:=$(LLVM_SRC_ROOT)/test/QMTest/expectations.darwin.qmr
42 # This is configuration information used by the test suite. In QM Test, it's
45 CONTEXT= -c "srcroot=$(LLVM_SRC_ROOT)" \
46 -c "buildroot=$(LLVM_OBJ_ROOT)" \
47 -c "buildtype=$(CONFIGURATION)" \
48 -c "tmpdir=$(LLVM_OBJ_ROOT)/test/tmp" \
52 -c "llvmgcc=$(LLVMGCC)" \
53 -c "llvmgxx=$(LLVMGXX)" \
57 # Location of the QMTest program.
59 QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB)
65 qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register
66 -$(QMTEST) run -O $(QMEXPECT) $(CONTEXT)
68 %.t:: $(LLVM_OBJ_ROOT)/test/tmp register
69 -$(QMTEST) run -O $(QMEXPECT) $(CONTEXT) $*
72 # Create the temporary directory used by the test suite.
74 $(LLVM_OBJ_ROOT)/test/tmp::
75 ${MKDIR} $(LLVM_OBJ_ROOT)/test/tmp
78 # Right now, QMTest compiles the python test classes and put them into the
79 # source tree. Since Python bytecode is *not* cross-platform compatible (I
80 # think), we'll regenerate every time.
82 # Simultaneous builds won't work, but shared source trees will.
85 $(QMTEST) register test llvm.TestAsmDisasm
86 $(QMTEST) register test llvm.AssembleTest
87 $(QMTEST) register test llvm.ConvertToCTest
88 $(QMTEST) register test llvm.LLToCTest
89 $(QMTEST) register test llvm.MachineCodeTest
90 $(QMTEST) register test llvm.TestOptimizer
91 $(QMTEST) register test llvm.LLITest
92 $(QMTEST) register test llvm.TestRunner
93 $(QMTEST) register test llvm.VerifierTest
94 $(QMTEST) register test llvm.CTest
95 $(QMTEST) register test llvm.CXXTest
96 $(QMTEST) register database llvmdb.llvmdb
98 # Start up the QMTest GUI
100 $(QMTEST) gui --no-browser --daemon
102 # Also get rid of qmtest garbage when we 'make clean' in this directory.
106 $(RM) -rf $(LLVM_OBJ_ROOT)/test/tmp
107 $(RM) -f $(LLVM_SRC_ROOT)/test/QMTest/*.pyo \
108 $(LLVM_OBJ_ROOT)/test/QMTest/*.pyo
109 $(RM) -f $(LLVM_SRC_ROOT)/test/results.qmr \
110 $(LLVM_OBJ_ROOT)/test/results.qmr