Initial checkin
[oota-llvm.git] / test / Makefile
1 LEVEL  = ..
2 DIRS   = Feature Regression Programs
3 include Makefile.tests
4
5 #
6 # New QMTest functionality:
7 #       The test suite is being transitioned over to QMTest.  Eventually, it
8 #       will use QMTest by default.
9 #
10
11 # List of the functioning QM Tests
12 QMTESTS=feature \
13         regression.assembler \
14         regression.analysis \
15         regression.bugpoint \
16         regression.cbackend \
17         regression.jello \
18         regression.linker \
19         regression.other
20
21 # QMTest option specifying the location of the QMTest database.
22 QMDB= -D $(LLVM_SRC_ROOT)/test/QMTestDB
23
24 #
25 # This is configuration information used by the test suite.  In QM Test, it's
26 # called a 'context.'
27 #
28 CONTEXT= -c srcroot=$(LLVM_SRC_ROOT) \
29          -c buildroot=$(LLVM_OBJ_ROOT) \
30          -c buildtype=$(CONFIGURATION) \
31          -c tmpdir=$(LLVM_OBJ_ROOT)/test/tmp \
32          -c cc=$(CC) \
33          -c cxx=$(CXX) \
34          -c "llvmgcc=$(LLVMGCC)" \
35          -c make=$(MAKE)
36
37 #
38 # Location of the QMTest program.
39 #
40 QMTEST= qmtest $(QMDB)
41
42
43 #
44 # Execute the tests
45 #
46 qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register
47         $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTestDB/expectations.qmr $(CONTEXT)
48
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 # Register the python code with QMTest
58 #
59 register:: $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.pyo
60
61 $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.pyo:  $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.py
62         $(QMTEST) register test llvm.TestAsmDisasm
63         $(QMTEST) register test llvm.AssembleTest
64         $(QMTEST) register test llvm.ConvertToCTest
65         $(QMTEST) register test llvm.LLToCTest
66         $(QMTEST) register test llvm.MachineCodeTest
67         $(QMTEST) register test llvm.AssemblyCodeTest
68         $(QMTEST) register test llvm.TestOptimizer
69         $(QMTEST) register test llvm.LLITest
70         $(QMTEST) register test llvm.TestRunner
71         $(QMTEST) register test llvm.VerifierTest
72         $(QMTEST) register test llvm.AnalyzeTest
73         $(QMTEST) register test llvm.CTest
74         $(QMTEST) register resource llvm.BytecodeResource
75