| 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 |
| Vikram S. Adve | fad0f52 | 2002-03-18 04:05:26 +0000 | [diff] [blame] | 3 | include Makefile.tests |
| Chris Lattner | 52a4e85 | 2002-01-23 21:36:59 +0000 | [diff] [blame] | 4 | |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 5 | # |
| John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 6 | # Make QMTest the default for testing features and regressions |
| 7 | # |
| 8 | all:: qmtest |
| 9 | |
| 10 | # |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 11 | # New QMTest functionality: |
| 12 | # The test suite is being transitioned over to QMTest. Eventually, it |
| 13 | # will use QMTest by default. |
| 14 | # |
| 15 | |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 16 | # QMTest option specifying the location of the QMTest database. |
| John Criswell | f424d74 | 2003-10-07 21:13:47 +0000 | [diff] [blame^] | 17 | QMDB= -D $(LLVM_SRC_ROOT)/test |
| 18 | QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTest |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 19 | |
| 20 | # |
| 21 | # This is configuration information used by the test suite. In QM Test, it's |
| 22 | # called a 'context.' |
| 23 | # |
| 24 | CONTEXT= -c srcroot=$(LLVM_SRC_ROOT) \ |
| 25 | -c buildroot=$(LLVM_OBJ_ROOT) \ |
| John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 26 | -c buildtype=$(CONFIGURATION) \ |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 27 | -c tmpdir=$(LLVM_OBJ_ROOT)/test/tmp \ |
| John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 28 | -c coresize=0 \ |
| 29 | -c cc=$(CC) \ |
| 30 | -c cxx=$(CXX) \ |
| 31 | -c "llvmgcc=$(LLVMGCC)" \ |
| John Criswell | 28e7767 | 2003-09-30 19:04:08 +0000 | [diff] [blame] | 32 | -c "llvmgxx=$(LLVMGXX)" \ |
| John Criswell | ee29d2a | 2003-09-06 15:12:21 +0000 | [diff] [blame] | 33 | -c make=$(MAKE) |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 34 | |
| 35 | # |
| 36 | # Location of the QMTest program. |
| 37 | # |
| John Criswell | 1ce5c59 | 2003-09-16 02:59:26 +0000 | [diff] [blame] | 38 | QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB) |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 39 | |
| 40 | |
| 41 | # |
| 42 | # Execute the tests |
| 43 | # |
| 44 | qmtest:: $(LLVM_OBJ_ROOT)/test/tmp register |
| John Criswell | f424d74 | 2003-10-07 21:13:47 +0000 | [diff] [blame^] | 45 | $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/expectations.qmr $(CONTEXT) |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 46 | |
| John Criswell | f780f77 | 2003-09-08 21:25:35 +0000 | [diff] [blame] | 47 | %.t:: $(LLVM_OBJ_ROOT)/test/tmp register |
| John Criswell | f424d74 | 2003-10-07 21:13:47 +0000 | [diff] [blame^] | 48 | $(QMTEST) run -O $(LLVM_SRC_ROOT)/test/expectations.qmr $(CONTEXT) $* |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 49 | |
| 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 Criswell | 538a317 | 2003-09-15 21:54:49 +0000 | [diff] [blame] | 57 | # 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 Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 60 | # |
| John Criswell | 538a317 | 2003-09-15 21:54:49 +0000 | [diff] [blame] | 61 | # Simultaneous builds won't work, but shared source trees will. |
| 62 | # |
| 63 | register: |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 64 | $(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 Criswell | 28e7767 | 2003-09-30 19:04:08 +0000 | [diff] [blame] | 76 | $(QMTEST) register test llvm.CXXTest |
| John Criswell | 299e15e | 2003-08-21 15:09:29 +0000 | [diff] [blame] | 77 | $(QMTEST) register resource llvm.BytecodeResource |
| 78 | |
| John Criswell | 1ce5c59 | 2003-09-16 02:59:26 +0000 | [diff] [blame] | 79 | # |
| 80 | # Start up the QMTest GUI |
| 81 | # |
| 82 | gui:: |
| 83 | $(QMTEST) gui --no-browser --daemon |
| 84 | |