Pārlūkot izejas kodu

Also run regression tests

Thomas Buck 10 gadus atpakaļ
vecāks
revīzija
35a0e11b37
2 mainītis faili ar 24 papildinājumiem un 14 dzēšanām
  1. 1
    1
      README.md
  2. 23
    13
      test/CMakeLists.txt

+ 1
- 1
README.md Parādīt failu

@@ -67,7 +67,7 @@ Do a standard cmake build and then run the resulting executable:
67 67
 
68 68
 On Mac OS X, running `make install` will produce a distributable OpenRaider.app bundle.
69 69
 
70
-To build all Unit Tests, run `make tests`, to run most of them use `make testRun`.
70
+To build all Unit Tests, run `make tests`, to run most of them use `make testRun`. To run a TombRaider level loader regression test, use `make testReg`. The results will be put into log files in your build folder. `make clean` will remove them.
71 71
 
72 72
 ## Usage
73 73
 

+ 23
- 13
test/CMakeLists.txt Parādīt failu

@@ -129,17 +129,27 @@ add_custom_target (testRun echo "Running Unit Tests..."
129 129
 )
130 130
 add_dependencies (testRun tests)
131 131
 
132
+# Add TombRaider regression test target
133
+set (REGTEST_TR1 "~/.OpenRaider/paks/tr1/level1.phd")
134
+set (REGTEST_TR2 "~/.OpenRaider/paks/tr2/unwater.tr2")
135
+#set (REGTEST_TR3 "~/.OpenRaider/paks/tr3/scotland.tr2")
136
+set (REGTEST_TR3 "~/.OpenRaider/paks/tr3/HOUSE.TR2")
137
+set (REGTEST_TR4 "~/.OpenRaider/paks/tr4/angkor1.tr4")
138
+#set (REGTEST_TR5 "~/.OpenRaider/paks/tr5/demo.trc")
139
+set (REGTEST_TR5 "~/.OpenRaider/paks/tr5/andy1.trc")
140
+add_custom_target (testReg echo "Running TombRaider 1 Regression Test..."
141
+    COMMAND TombRaiderTest load ${REGTEST_TR1} > ../log.tr1
142
+    COMMAND echo "Running TombRaider 2 Regression Test..."
143
+    COMMAND TombRaiderTest load ${REGTEST_TR2} > ../log.tr2
144
+    COMMAND echo "Running TombRaider 3 Regression Test..."
145
+    COMMAND TombRaiderTest load ${REGTEST_TR3} > ../log.tr3
146
+    COMMAND echo "Running TombRaider 4 Regression Test..."
147
+    COMMAND TombRaiderTest load ${REGTEST_TR4} > ../log.tr4
148
+    COMMAND echo "Running TombRaider 5 Regression Test..."
149
+    COMMAND TombRaiderTest load ${REGTEST_TR5} > ../log.tr5
150
+)
151
+add_dependencies (testReg TombRaiderTest)
132 152
 
133
-#TEST_MAP_TR5=~/.OpenRaider/paks/tr5/demo.trc
134
-#TEST_MAP_TR4=~/.OpenRaider/paks/tr4/angkor1.tr4
135
-#TEST_MAP_TR3=~/.OpenRaider/paks/tr3/scotland.tr2
136
-#TEST_MAP_TR2=~/.OpenRaider/paks/tr2/unwater.tr2
137
-#TEST_MAP_TR1=~/.OpenRaider/paks/tr1/level1.phd
138
-
139
-#TombRaider.reg_test:
140
-#	$(MAKE) TombRaider.test
141
-#	$(BUILD_TEST_DIR)/TombRaider.test load $(TEST_MAP_TR1) > /tmp/log.tr1
142
-#	$(BUILD_TEST_DIR)/TombRaider.test load $(TEST_MAP_TR2) > /tmp/log.tr2
143
-#	$(BUILD_TEST_DIR)/TombRaider.test load $(TEST_MAP_TR3) > /tmp/log.tr3
144
-#	$(BUILD_TEST_DIR)/TombRaider.test load $(TEST_MAP_TR4) > /tmp/log.tr4
145
-#	$(BUILD_TEST_DIR)/TombRaider.test load $(TEST_MAP_TR5) > /tmp/log.tr5
153
+# Clean regression test logs
154
+set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
155
+    "../log.tr1;../log.tr2;../log.tr3;../log.tr4;../log.tr5")

Notiek ielāde…
Atcelt
Saglabāt