mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
## 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
25 lines
945 B
Plaintext
25 lines
945 B
Plaintext
/// Tests that all subsystems that need to properly initialize.
|
|
/datum/unit_test/subsystem_init
|
|
test_flags = UNIT_TEST_MAP_TEST
|
|
|
|
/datum/unit_test/subsystem_init/Run()
|
|
for(var/datum/controller/subsystem/subsystem as anything in Master.subsystems)
|
|
if(subsystem.ss_flags & SS_NO_INIT)
|
|
continue
|
|
if(subsystem.initialized)
|
|
continue
|
|
|
|
var/should_fail = !(subsystem.ss_flags & SS_OK_TO_FAIL_INIT)
|
|
var/list/message_strings = list("[subsystem] ([subsystem.type]) is a subsystem meant to initialize but could not get initialized.")
|
|
|
|
if(!isnull(subsystem.initialization_failure_message))
|
|
message_strings += "The subsystem reported the following: [subsystem.initialization_failure_message]"
|
|
|
|
if(should_fail)
|
|
TEST_FAIL(jointext(message_strings, "\n"))
|
|
continue
|
|
|
|
message_strings += "This subsystem is marked as SS_OK_TO_FAIL_INIT. This is still a bug, but it is non-blocking."
|
|
TEST_NOTICE(src, jointext(message_strings, "\n"))
|
|
|