Renamed `as' => `llvm-as', `dis' => `llvm-dis'.
[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
19 #
20 # This is configuration information used by the test suite.  In QM Test, it's
21 # called a 'context.'
22 #
23 CONTEXT= -c srcroot=$(LLVM_SRC_ROOT) \
24          -c buildroot=$(LLVM_OBJ_ROOT) \
25          -c buildtype=$(CONFIGURATION) \
26          -c tmpdir=$(LLVM_OBJ_ROOT)/test/tmp \
27          -c coresize=0 \
28          -c cc=$(CC) \
29          -c cxx=$(CXX) \
30          -c "llvmgcc=$(LLVMGCC)" \
31          -c make=$(MAKE)
32
33 #
34 # Location of the QMTest program.
35 #
36 QMTEST= qmtest $(QMDB)
37
38
39 #
40 # Execute the tests
41 #
42 qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register
43         $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTestDB/expectations.qmr $(CONTEXT)
44
45 %.t:: $(LLVM_OBJ_ROOT)/test/tmp register
46         $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTestDB/expectations.qmr $(CONTEXT) $*
47
48 #
49 # Create the temporary directory used by the test suite.
50 #
51 $(LLVM_OBJ_ROOT)/test/tmp::
52         ${MKDIR} $(LLVM_OBJ_ROOT)/test/tmp
53
54 #
55 # Register the python code with QMTest
56 #
57 register:: $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.pyo
58
59 $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.pyo:  $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.py
60         $(QMTEST) register test llvm.TestAsmDisasm
61         $(QMTEST) register test llvm.AssembleTest
62         $(QMTEST) register test llvm.ConvertToCTest
63         $(QMTEST) register test llvm.LLToCTest
64         $(QMTEST) register test llvm.MachineCodeTest
65         $(QMTEST) register test llvm.AssemblyCodeTest
66         $(QMTEST) register test llvm.TestOptimizer
67         $(QMTEST) register test llvm.LLITest
68         $(QMTEST) register test llvm.TestRunner
69         $(QMTEST) register test llvm.VerifierTest
70         $(QMTEST) register test llvm.AnalyzeTest
71         $(QMTEST) register test llvm.CTest
72         $(QMTEST) register resource llvm.BytecodeResource
73