Vikram S. Adve | 38b8620 | 2001-11-05 00:22:16 +0000 | [diff] [blame] | 1 | LEVEL = .. |
John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 2 | DIRS = Programs |
Chris Lattner | 52a4e85 | 2002-01-23 21:36:59 +0000 | [diff] [blame] | 3 | |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 4 | # |
John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 5 | # Make QMTest the default for testing features and regressions |
John Criswell | d184c67 | 2003-10-27 17:46:42 +0000 | [diff] [blame^] | 6 | # Do this first to force QMTest to run first |
John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 7 | # |
| 8 | all:: qmtest |
| 9 | |
| 10 | # |
John Criswell | d184c67 | 2003-10-27 17:46:42 +0000 | [diff] [blame^] | 11 | # Include other test rules |
| 12 | # |
| 13 | include Makefile.tests |
| 14 | |
| 15 | # |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 16 | # New QMTest functionality: |
| 17 | # The test suite is being transitioned over to QMTest. Eventually, it |
| 18 | # will use QMTest by default. |
| 19 | # |
| 20 | |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 21 | # QMTest option specifying the location of the QMTest database. |
John Criswell | f424d74 | 2003-10-07 21:13:47 +0000 | [diff] [blame] | 22 | QMDB= -D $(LLVM_SRC_ROOT)/test |
| 23 | QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 24 | |
| 25 | # |
| 26 | # This is configuration information used by the test suite. In QM Test, it's |
| 27 | # called a 'context.' |
| 28 | # |
Brian Gaeke | ab9585f | 2003-10-11 00:10:05 +0000 | [diff] [blame] | 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)" \ |
John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 36 | -c "llvmgcc=$(LLVMGCC)" \ |
John Criswell | 28e7767 | 2003-09-30 19:04:08 +0000 | [diff] [blame] | 37 | -c "llvmgxx=$(LLVMGXX)" \ |
Brian Gaeke | ab9585f | 2003-10-11 00:10:05 +0000 | [diff] [blame] | 38 | -c "make=$(MAKE)" |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 39 | |
| 40 | # |
| 41 | # Location of the QMTest program. |
| 42 | # |
John Criswell | 1ce5c59 | 2003-09-16 02:59:26 +0000 | [diff] [blame] | 43 | QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB) |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 44 | |
| 45 | |
| 46 | # |
| 47 | # Execute the tests |
| 48 | # |
| 49 | qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register |
John Criswell | 4920792 | 2003-10-23 14:11:53 +0000 | [diff] [blame] | 50 | -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT) |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 51 | |
John Criswell | f780f77 | 2003-09-08 21:25:35 +0000 | [diff] [blame] | 52 | %.t:: $(LLVM_OBJ_ROOT)/test/tmp register |
John Criswell | 4920792 | 2003-10-23 14:11:53 +0000 | [diff] [blame] | 53 | -$(QMTEST) run -O $(LLVM_SRC_ROOT)/test/QMTest/expectations.qmr $(CONTEXT) $* |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 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 | # |
John Criswell | 538a317 | 2003-09-15 21:54:49 +0000 | [diff] [blame] | 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. |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 65 | # |
John Criswell | 538a317 | 2003-09-15 21:54:49 +0000 | [diff] [blame] | 66 | # Simultaneous builds won't work, but shared source trees will. |
| 67 | # |
| 68 | register: |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 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 |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 74 | $(QMTEST) register test llvm.TestOptimizer |
| 75 | $(QMTEST) register test llvm.LLITest |
| 76 | $(QMTEST) register test llvm.TestRunner |
| 77 | $(QMTEST) register test llvm.VerifierTest |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 78 | $(QMTEST) register test llvm.CTest |
John Criswell | 28e7767 | 2003-09-30 19:04:08 +0000 | [diff] [blame] | 79 | $(QMTEST) register test llvm.CXXTest |
John Criswell | 0c9efc2 | 2003-10-07 21:30:07 +0000 | [diff] [blame] | 80 | $(QMTEST) register database llvmdb.llvmdb |
John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 81 | |
John Criswell | 1ce5c59 | 2003-09-16 02:59:26 +0000 | [diff] [blame] | 82 | # |
| 83 | # Start up the QMTest GUI |
| 84 | # |
| 85 | gui:: |
| 86 | $(QMTEST) gui --no-browser --daemon |
| 87 | |
John Criswell | 9fd50e2 | 2003-10-10 19:52:30 +0000 | [diff] [blame] | 88 | clean:: |
| 89 | $(RM) -rf $(LLVM_OBJ_ROOT)/test/tmp |
| 90 | |