blob: 3b98ef8b98b1f9722f226ba9052e8a558b5a87f9 [file] [log] [blame]
Vikram S. Adve38b86202001-11-05 00:22:16 +00001LEVEL = ..
John Criswellee29d2a2003-09-06 15:12:21 +00002DIRS = Programs
Chris Lattner52a4e852002-01-23 21:36:59 +00003
John Criswell299e15e2003-08-21 15:09:29 +00004#
John Criswellee29d2a2003-09-06 15:12:21 +00005# Make QMTest the default for testing features and regressions
John Criswelld184c672003-10-27 17:46:42 +00006# Do this first to force QMTest to run first
John Criswellee29d2a2003-09-06 15:12:21 +00007#
8all:: qmtest
9
10#
John Criswelld184c672003-10-27 17:46:42 +000011# Include other test rules
12#
13include Makefile.tests
14
15#
John Criswell299e15e2003-08-21 15:09:29 +000016# New QMTest functionality:
17# The test suite is being transitioned over to QMTest. Eventually, it
18# will use QMTest by default.
19#
20
John Criswell299e15e2003-08-21 15:09:29 +000021# QMTest option specifying the location of the QMTest database.
John Criswellf424d742003-10-07 21:13:47 +000022QMDB= -D $(LLVM_SRC_ROOT)/test
23QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest
John Criswell299e15e2003-08-21 15:09:29 +000024
25#
26# This is configuration information used by the test suite. In QM Test, it's
27# called a 'context.'
28#
Brian Gaekeab9585f2003-10-11 00:10:05 +000029CONTEXT= -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)" \
John Criswellee29d2a2003-09-06 15:12:21 +000036 -c "llvmgcc=$(LLVMGCC)" \
John Criswell28e77672003-09-30 19:04:08 +000037 -c "llvmgxx=$(LLVMGXX)" \
Brian Gaekeab9585f2003-10-11 00:10:05 +000038 -c "make=$(MAKE)"
John Criswell299e15e2003-08-21 15:09:29 +000039
40#
41# Location of the QMTest program.
42#
John Criswell1ce5c592003-09-16 02:59:26 +000043QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB)
John Criswell299e15e2003-08-21 15:09:29 +000044
45
46#
47# Execute the tests
48#
49qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register
John Criswell49207922003-10-23 14:11:53 +000050 -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT)
John Criswell299e15e2003-08-21 15:09:29 +000051
John Criswellf780f772003-09-08 21:25:35 +000052%.t:: $(LLVM_OBJ_ROOT)/test/tmp register
John Criswell49207922003-10-23 14:11:53 +000053 -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT) $*
John Criswell299e15e2003-08-21 15:09:29 +000054
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#
John Criswell538a3172003-09-15 21:54:49 +000062# 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.
John Criswell299e15e2003-08-21 15:09:29 +000065#
John Criswell538a3172003-09-15 21:54:49 +000066# Simultaneous builds won't work, but shared source trees will.
67#
68register:
John Criswell299e15e2003-08-21 15:09:29 +000069 $(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
John Criswell299e15e2003-08-21 15:09:29 +000074 $(QMTEST) register test llvm.TestOptimizer
75 $(QMTEST) register test llvm.LLITest
76 $(QMTEST) register test llvm.TestRunner
77 $(QMTEST) register test llvm.VerifierTest
John Criswell299e15e2003-08-21 15:09:29 +000078 $(QMTEST) register test llvm.CTest
John Criswell28e77672003-09-30 19:04:08 +000079 $(QMTEST) register test llvm.CXXTest
John Criswell0c9efc22003-10-07 21:30:07 +000080 $(QMTEST) register database llvmdb.llvmdb
John Criswell299e15e2003-08-21 15:09:29 +000081
John Criswell1ce5c592003-09-16 02:59:26 +000082#
83# Start up the QMTest GUI
84#
85gui::
86 $(QMTEST) gui --no-browser --daemon
87
John Criswell9fd50e22003-10-10 19:52:30 +000088clean::
89 $(RM) -rf $(LLVM_OBJ_ROOT)/test/tmp
90