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