Merge pull request #4307 from Neerti/11/19/2017_submap_validation

Allows Travis to Validate PoI Maps
This commit is contained in:
Anewbe
2017-11-19 15:49:02 -06:00
committed by GitHub
8 changed files with 47 additions and 3 deletions
+6 -1
View File
@@ -36,9 +36,14 @@ script:
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting ${MACRO_COUNT} or less)"; [ $num -le ${MACRO_COUNT} ])
- source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
- python tools/TagMatcher/tag-matcher.py ../..
- echo "#define UNIT_TEST 1" > code/_unit_tests.dm
#First compile is to ensure maps are valid.
- echo "#define MAP_TEST 1" > code/_map_tests.dm
- cp config/example/* config/
- DreamMaker polaris.dme
- echo "#define MAP_TEST 0" > code/_map_tests.dm
#Second compile is for the unit tests. Compiling a second time to exclude the validated maps is actually faster than waiting for startup with them compiled.
- echo "#define UNIT_TEST 1" > code/_unit_tests.dm
- DreamMaker polaris.dme
- DreamDaemon polaris.dmb -invisible -trusted -core 2>&1 | tee log.txt
- grep "All Unit Tests Passed" log.txt
+10
View File
@@ -0,0 +1,10 @@
/*
*
* This file is used by Travis to indicate that additional maps need to be compiled to look for errors such as missing paths.
* Do not add anything but the MAP_TEST definition here as it will be overwritten by Travis when running tests.
*
*
* Should you wish to edit set MAP_TEST to 1 like so:
* #define MAP_TEST 1
*/
#define MAP_TEST 0
+2 -2
View File
@@ -13,8 +13,8 @@
/area/supply/station,
/area/mine,
/area/vacant/vacant_shop,
/area/turbolift
)
/area/turbolift,
/area/submap )
var/list/exempt_from_atmos = typesof(/area/maintenance,
/area/storage,
+4
View File
@@ -24,4 +24,8 @@ is being loaded (to clear trees, etc). Be sure to not load the map on top of an
irreplacable objects or players, as they will all get deleted if annihilate is on. If you load the submap before
other objects have a chance to spawn (before random map gen), you shouldn't need to use annihilate.
When adding a new submap which will be loaded at runtime, you should add it to the list of '#include'-s on the top of the
map template file. This forces the submap to be compiled when the code is undergoing a unit test, which will help keep the
submap from suffering errors such as invalid paths due to them being changed elsewhere.
*/
+9
View File
@@ -1,3 +1,12 @@
// This causes PoI maps to get 'checked' and compiled, when undergoing a unit test.
// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors.
// When adding a new PoI, please add it to this list.
#if MAP_TEST
#include "deadBeacon.dmm"
#include "prepper1.dmm"
#include "quarantineshuttle.dmm"
#endif
/datum/map_template/cave
name = "Cave Content"
desc = "Don't dig too deep!"
+7
View File
@@ -1,3 +1,10 @@
// This causes PoI maps to get 'checked' and compiled, when undergoing a unit test.
// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors.
// When adding a new PoI, please add it to this list.
#if MAP_TEST
// #define "your_map_here.dmm"
#endif
/datum/map_template/space
name = "Space Content"
desc = "A map template base. In space."
+8
View File
@@ -1,3 +1,11 @@
// This causes PoI maps to get 'checked' and compiled, when undergoing a unit test.
// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors.
// When adding a new PoI, please add it to this list.
#if MAP_TEST
#include "farm1.dmm"
#include "spider1.dmm"
#endif
/datum/map_template/surface
name = "Surface Content"
desc = "Used to make the surface by 17% less boring."
+1
View File
@@ -11,6 +11,7 @@
// END_PREFERENCES
// BEGIN_INCLUDE
#include "code\_macros.dm"
#include "code\_map_tests.dm"
#include "code\_unit_tests.dm"
#include "code\global.dm"
#include "code\hub.dm"