blob: e0dee956813ea66e8e3660ed13f774f879363e81 [file] [log] [blame]
Vikram S. Adve38b86202001-11-05 00:22:16 +00001LEVEL = ..
John Criswellee29d2a2003-09-06 15:12:21 +00002DIRS = Programs
Vikram S. Advefad0f522002-03-18 04:05:26 +00003include Makefile.tests
Chris Lattner52a4e852002-01-23 21:36:59 +00004
John Criswell299e15e2003-08-21 15:09:29 +00005#
John Criswellee29d2a2003-09-06 15:12:21 +00006# Make QMTest the default for testing features and regressions
7#
8all:: qmtest
9
10#
John Criswell299e15e2003-08-21 15:09:29 +000011# New QMTest functionality:
12# The test suite is being transitioned over to QMTest. Eventually, it
13# will use QMTest by default.
14#
15
John Criswell299e15e2003-08-21 15:09:29 +000016# QMTest option specifying the location of the QMTest database.
John Criswellf424d742003-10-07 21:13:47 +000017QMDB= -D $(LLVM_SRC_ROOT)/test
18QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest
John Criswell299e15e2003-08-21 15:09:29 +000019
20#
21# This is configuration information used by the test suite. In QM Test, it's
22# called a 'context.'
23#
24CONTEXT= -c srcroot=$(LLVM_SRC_ROOT) \
25 -c buildroot=$(LLVM_OBJ_ROOT) \
John Criswellee29d2a2003-09-06 15:12:21 +000026 -c buildtype=$(CONFIGURATION) \
John Criswell299e15e2003-08-21 15:09:29 +000027 -c tmpdir=$(LLVM_OBJ_ROOT)/test/tmp \
John Criswellee29d2a2003-09-06 15:12:21 +000028 -c coresize=0 \
29 -c cc=$(CC) \
30 -c cxx=$(CXX) \
31 -c "llvmgcc=$(LLVMGCC)" \
John Criswell28e77672003-09-30 19:04:08 +000032 -c "llvmgxx=$(LLVMGXX)" \
John Criswellee29d2a2003-09-06 15:12:21 +000033 -c make=$(MAKE)
John Criswell299e15e2003-08-21 15:09:29 +000034
35#
36# Location of the QMTest program.
37#
John Criswell1ce5c592003-09-16 02:59:26 +000038QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB)
John Criswell299e15e2003-08-21 15:09:29 +000039
40
41#
42# Execute the tests
43#
44qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register
John Criswellf424d742003-10-07 21:13:47 +000045 $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/expectations.qmr $(CONTEXT)
John Criswell299e15e2003-08-21 15:09:29 +000046
John Criswellf780f772003-09-08 21:25:35 +000047%.t:: $(LLVM_OBJ_ROOT)/test/tmp register
John Criswellf424d742003-10-07 21:13:47 +000048 $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/expectations.qmr $(CONTEXT) $*
John Criswell299e15e2003-08-21 15:09:29 +000049
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#
John Criswell538a3172003-09-15 21:54:49 +000057# 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.
John Criswell299e15e2003-08-21 15:09:29 +000060#
John Criswell538a3172003-09-15 21:54:49 +000061# Simultaneous builds won't work, but shared source trees will.
62#
63register:
John Criswell299e15e2003-08-21 15:09:29 +000064 $(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
John Criswell28e77672003-09-30 19:04:08 +000076 $(QMTEST) register test llvm.CXXTest
John Criswell299e15e2003-08-21 15:09:29 +000077 $(QMTEST) register resource llvm.BytecodeResource
78
John Criswell1ce5c592003-09-16 02:59:26 +000079#
80# Start up the QMTest GUI
81#
82gui::
83 $(QMTEST) gui --no-browser --daemon
84