mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +01:00
unit->game tests, /tg/ assertions and allocations (#27646)
* unit->game tests, /tg/ assertions and allocations * whoopsies * fix lint
This commit is contained in:
@@ -104,7 +104,7 @@ SUBSYSTEM_DEF(dbcore)
|
||||
/datum/controller/subsystem/dbcore/proc/CheckSchemaVersion()
|
||||
if(GLOB.configuration.database.enabled)
|
||||
// The unit tests have their own version of this check, which wont hold the server up infinitely, so this is disabled if we are running unit tests
|
||||
#ifndef UNIT_TESTS
|
||||
#ifndef GAME_TESTS
|
||||
if(GLOB.configuration.database.enabled && GLOB.configuration.database.version != SQL_VERSION)
|
||||
GLOB.configuration.database.enabled = FALSE
|
||||
schema_valid = FALSE
|
||||
|
||||
@@ -67,7 +67,7 @@ SUBSYSTEM_DEF(redis)
|
||||
// Redis integration stuff
|
||||
/datum/controller/subsystem/redis/proc/connect()
|
||||
if(GLOB.configuration.redis.enabled)
|
||||
#ifndef UNIT_TESTS // CI uses linux so dont flag up a fail there
|
||||
#ifndef GAME_TESTS // CI uses linux so dont flag up a fail there
|
||||
if(world.system_type == UNIX)
|
||||
stack_trace("SSredis has known to be very buggy when running on Linux with random dropouts ocurring due to interrupted syscalls. You have been warned!")
|
||||
#endif
|
||||
|
||||
@@ -363,7 +363,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(GLOB.configuration.general.enable_night_shifts)
|
||||
SSnightshift.check_nightshift(TRUE)
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
#ifdef GAME_TESTS
|
||||
// Run map tests first in case unit tests futz with map state
|
||||
GLOB.test_runner.RunMap()
|
||||
GLOB.test_runner.Run()
|
||||
|
||||
@@ -75,7 +75,7 @@ SUBSYSTEM_DEF(verb_manager)
|
||||
|
||||
//we want unit tests to be able to directly call verbs that attempt to queue, and since unit tests should test internal behavior, we want the queue
|
||||
//to happen as if it was actually from player input if its called on a mob.
|
||||
#ifdef UNIT_TESTS
|
||||
#ifdef GAME_TESTS
|
||||
if(QDELETED(usr) && ismob(incoming_callback.object))
|
||||
incoming_callback.usr_uid = incoming_callback.object.UID()
|
||||
var/datum/callback/new_us = CALLBACK(arglist(list(GLOBAL_PROC, GLOBAL_PROC_REF(_queue_verb)) + args.Copy()))
|
||||
|
||||
@@ -88,7 +88,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
|
||||
// Load all Z level templates
|
||||
preloadTemplates()
|
||||
preloadTemplates(path = "code/modules/unit_tests/atmos/")
|
||||
preloadTemplates(path = "code/tests/atmos/")
|
||||
|
||||
// Load the station
|
||||
loadStation()
|
||||
|
||||
Reference in New Issue
Block a user