Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025

This commit is contained in:
Roxy
2025-10-25 15:49:52 -04:00
85 changed files with 487 additions and 295 deletions
+10
View File
@@ -18,6 +18,8 @@ GLOBAL_LIST_EMPTY(unit_test_mapping_logs)
/// Global assoc list of required mapping items, [item typepath] to [required item datum].
GLOBAL_LIST_EMPTY(required_map_items)
GLOBAL_LIST_EMPTY(test_run_times)
/// A list of every test that is currently focused.
/// Use the PERFORM_ALL_TESTS macro instead.
GLOBAL_VAR_INIT(focused_tests, focused_tests())
@@ -237,6 +239,8 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
log_test(message)
test_output_desc += " [duration / 10]s"
if(duration > 10)
GLOB.test_run_times[test_path] = duration
if (test.succeeded)
log_world("[TEST_OUTPUT_GREEN("PASS")] [test_output_desc]")
@@ -409,6 +413,12 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
RunUnitTest(unit_path, test_results)
SSticker.delay_end = FALSE
log_world("::group::Expensive Unit Test Times")
sortTim(GLOB.test_run_times, cmp = GLOBAL_PROC_REF(cmp_numeric_dsc), associative = TRUE)
for(var/type, duration in GLOB.test_run_times)
log_world("[type] took [duration/10]s")
log_world("::endgroup::")
var/file_name = "data/unit_tests.json"
fdel(file_name)
file(file_name) << json_encode(test_results)