Separate station/unit tests and disable lavaland procgen and ruin spawning in tests (for now). (#28106)

* Separate station/unit tests and disable lavaland.

* add CI/local test conflict check back
This commit is contained in:
warriorstar-orion
2025-02-08 17:09:00 +00:00
committed by GitHub
parent 5237a148cc
commit 8e4dc6165b
13 changed files with 136 additions and 107 deletions
@@ -139,13 +139,12 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
safe_load(asset_cache, "asset_cache_configuration")
// Proc to load up instance-specific overrides
/datum/server_configuration/proc/load_overrides()
var/override_file = "config/overrides_[world.port].toml"
/datum/server_configuration/proc/load_overrides(override_file)
if(!fexists(override_file))
DIRECT_OUTPUT(world.log, "Overrides not found for this instance.")
DIRECT_OUTPUT(world.log, "Override file [override_file] not found for this instance.")
return
DIRECT_OUTPUT(world.log, "Overrides found for this instance. Loading them.")
DIRECT_OUTPUT(world.log, "Override file [override_file] found. Loading.")
var/start = start_watch() // Time tracking
raw_data = rustg_read_toml_file(override_file)
@@ -21,16 +21,6 @@
var/async_thread_limit = 50
/datum/configuration_section/database_configuration/load_data(list/data)
// UNIT TESTS ARE DEFINED - USE CUSTOM CI VALUES
#ifdef GAME_TESTS
enabled = TRUE
// This needs to happen in the CI environment to ensure the example SQL version gets updated.
CONFIG_LOAD_NUM(version, data["sql_version"])
#else
// Load the normal config. Were not in CI mode
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
CONFIG_LOAD_BOOL(enabled, data["sql_enabled"])
CONFIG_LOAD_NUM(version, data["sql_version"])
CONFIG_LOAD_STR(address, data["sql_address"])
@@ -40,4 +30,3 @@
CONFIG_LOAD_STR(db, data["sql_database"])
CONFIG_LOAD_NUM(async_query_timeout, data["async_query_timeout"])
CONFIG_LOAD_NUM(async_thread_limit, data["async_thread_limit"])
#endif
@@ -7,14 +7,5 @@
var/connstring = "redis://127.0.0.1/"
/datum/configuration_section/redis_configuration/load_data(list/data)
// UNIT TESTS ARE DEFINED - USE CUSTOM CI VALUES
#ifdef GAME_TESTS
// enabled = TRUE
#else
// Load the normal config. Were not in CI mode
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
CONFIG_LOAD_BOOL(enabled, data["redis_enabled"])
CONFIG_LOAD_STR(connstring, data["redis_connstring"])
#endif
+1 -1
View File
@@ -83,7 +83,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/datum/controller/master/New()
if(!random_seed)
#ifdef GAME_TESTS
#ifdef TEST_RUNNER
random_seed = 29051994
#else
random_seed = rand(1, 1e9)
+2 -4
View File
@@ -363,10 +363,8 @@ SUBSYSTEM_DEF(ticker)
if(GLOB.configuration.general.enable_night_shifts)
SSnightshift.check_nightshift(TRUE)
#ifdef GAME_TESTS
// Run map tests first in case unit tests futz with map state
GLOB.test_runner.RunMap()
GLOB.test_runner.Run()
#ifdef TEST_RUNNER
GLOB.test_runner.RunAll()
#endif
// Do this 10 second after roundstart because of roundstart lag, and make it more visible