mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Merge pull request #4307 from Neerti/11/19/2017_submap_validation
Allows Travis to Validate PoI Maps
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
*/
|
||||
@@ -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!"
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user