Switching over to the new test database.
[oota-llvm.git] / test / Makefile
1 LEVEL  = ..
2 DIRS   = Programs
3 include Makefile.tests
4
5 #
6 # Make QMTest the default for testing features and regressions
7 #
8 all:: qmtest
9
10 #
11 # New QMTest functionality:
12 #       The test suite is being transitioned over to QMTest.  Eventually, it
13 #       will use QMTest by default.
14 #
15
16 # QMTest option specifying the location of the QMTest database.
17 QMDB= -D $(LLVM_SRC_ROOT)/test
18 QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest
19
20 #
21 # This is configuration information used by the test suite.  In QM Test, it's
22 # called a 'context.'
23 #
24 CONTEXT= -c srcroot=$(LLVM_SRC_ROOT) \
25          -c buildroot=$(LLVM_OBJ_ROOT) \
26          -c buildtype=$(CONFIGURATION) \
27          -c tmpdir=$(LLVM_OBJ_ROOT)/test/tmp \
28          -c coresize=0 \
29          -c cc=$(CC) \
30          -c cxx=$(CXX) \
31          -c "llvmgcc=$(LLVMGCC)" \
32          -c "llvmgxx=$(LLVMGXX)" \
33          -c make=$(MAKE)
34
35 #
36 # Location of the QMTest program.
37 #
38 QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB)
39
40
41 #
42 # Execute the tests
43 #
44 qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register
45         $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/expectations.qmr $(CONTEXT)
46
47 %.t:: $(LLVM_OBJ_ROOT)/test/tmp register
48         $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/expectations.qmr $(CONTEXT) $*
49
50 #
51 # Create the temporary directory used by the test suite.
52 #
53 $(LLVM_OBJ_ROOT)/test/tmp::
54         ${MKDIR} $(LLVM_OBJ_ROOT)/test/tmp
55
56 #
57 # Right now, QMTest compiles the python test classes and put them into the
58 # source tree.  Since Python bytecode is *not* cross-platform compatible (I
59 # think), we'll regenerate every time.
60 #
61 # Simultaneous builds won't work, but shared source trees will.
62 #
63 register:
64         $(QMTEST) register test llvm.TestAsmDisasm
65         $(QMTEST) register test llvm.AssembleTest
66         $(QMTEST) register test llvm.ConvertToCTest
67         $(QMTEST) register test llvm.LLToCTest
68         $(QMTEST) register test llvm.MachineCodeTest
69         $(QMTEST) register test llvm.AssemblyCodeTest
70         $(QMTEST) register test llvm.TestOptimizer
71         $(QMTEST) register test llvm.LLITest
72         $(QMTEST) register test llvm.TestRunner
73         $(QMTEST) register test llvm.VerifierTest
74         $(QMTEST) register test llvm.AnalyzeTest
75         $(QMTEST) register test llvm.CTest
76         $(QMTEST) register test llvm.CXXTest
77         $(QMTEST) register resource llvm.BytecodeResource
78
79 #
80 # Start up the QMTest GUI
81 #
82 gui::
83         $(QMTEST) gui --no-browser --daemon
84