mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Better Unit Tests - Runs All Of Them On A Single Map (exc. map unit tests) and C&D Split-Up (#96368)
## About The Pull Request
### Don't run every single test
I've had this on my mind for several months and it being brought up
recently reminded me so here we are.
Unit tests only run on `runtimestation_minimal.dmm` now with the
exception of map tests. The following unit tests are declared as map
tests but I didn't see any map dependent logic so 🤷
- `/datum/unit_test/maptest_baseturfs_unmodified_scrape`
- `/datum/unit_test/maptest_baseturfs_placed_on_top`
- `/datum/unit_test/maptest_baseturfs_placed_on_bottom`
- `/datum/unit_test/maptest_get_turf_pixel`
- `/datum/unit_test/maptest_load_map_security`
- `/datum/unit_test/maptest_modular_map_loader`
- `/datum/unit_test/maptest_turf_icons`
`/datum/unit_test/subsystem_init` isn't really a mapping unit test but I
figured somehow, someway, maps might fuck with subsystem initializations
so I just decided to include it.
### Splits up the create & destroy test
Idk, pretty simple. Create & destroy is now split up across all
integration tests and ran in parallel.
## Why It's Good For The Game
oranges promised me "500 nzd" yo
## Changelog
No player facing changes
This commit is contained in:
@@ -60,8 +60,12 @@
|
||||
/// Boolean - if TRUE, players spawn with grappling hooks in their bags
|
||||
var/give_players_hooks = FALSE
|
||||
|
||||
#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM)
|
||||
/// List of unit tests that are skipped when running this map
|
||||
var/list/skipped_tests
|
||||
/// If TRUE, only unit tests with UNIT_TEST_DEBUG_MAP_ONLY will run on this map
|
||||
var/is_unit_test_map = FALSE
|
||||
#endif
|
||||
|
||||
/// Boolean that tells SSmapping to load all away missions in the codebase.
|
||||
var/load_all_away_missions = FALSE
|
||||
@@ -266,6 +270,9 @@
|
||||
stack_trace("Invalid path in mapping config for ignored unit tests: \[[path_as_text]\]")
|
||||
continue
|
||||
LAZYADD(skipped_tests, path_real)
|
||||
|
||||
if ("is_unit_test_map" in json)
|
||||
is_unit_test_map = json["is_unit_test_map"]
|
||||
#endif
|
||||
|
||||
defaulted = FALSE
|
||||
|
||||
Reference in New Issue
Block a user