a bitfield stress test to exercise various parts of the front-end.
[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/QMTestDB
18 QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTestDB/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 make=$(MAKE)
33
34 #
35 # Location of the QMTest program.
36 #
37 QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB)
38
39
40 #
41 # Execute the tests
42 #
43 qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register
44         $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTestDB/expectations.qmr $(CONTEXT)
45
46 %.t:: $(LLVM_OBJ_ROOT)/test/tmp register
47         $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTestDB/expectations.qmr $(CONTEXT) $*
48
49 #
50 # Create the temporary directory used by the test suite.
51 #
52 $(LLVM_OBJ_ROOT)/test/tmp::
53         ${MKDIR} $(LLVM_OBJ_ROOT)/test/tmp
54
55 #
56 # Right now, QMTest compiles the python test classes and put them into the
57 # source tree.  Since Python bytecode is *not* cross-platform compatible (I
58 # think), we'll regenerate every time.
59 #
60 # Simultaneous builds won't work, but shared source trees will.
61 #
62 register:
63         $(QMTEST) register test llvm.TestAsmDisasm
64         $(QMTEST) register test llvm.AssembleTest
65         $(QMTEST) register test llvm.ConvertToCTest
66         $(QMTEST) register test llvm.LLToCTest
67         $(QMTEST) register test llvm.MachineCodeTest
68         $(QMTEST) register test llvm.AssemblyCodeTest
69         $(QMTEST) register test llvm.TestOptimizer
70         $(QMTEST) register test llvm.LLITest
71         $(QMTEST) register test llvm.TestRunner
72         $(QMTEST) register test llvm.VerifierTest
73         $(QMTEST) register test llvm.AnalyzeTest
74         $(QMTEST) register test llvm.CTest
75         $(QMTEST) register resource llvm.BytecodeResource
76
77 #
78 # Start up the QMTest GUI
79 #
80 gui::
81         $(QMTEST) gui --no-browser --daemon
82