mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Bump byond up to 514.1588 (#70168)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
co-authored by
Mothblocks
parent
ca1f6846e6
commit
241c1d19c0
@@ -41,6 +41,11 @@
|
||||
/// Intended to be used in the manner of `TEST_FOCUS(/datum/unit_test/math)`
|
||||
#define TEST_FOCUS(test_path) ##test_path { focus = TRUE; }
|
||||
|
||||
/// Logs a noticable message on GitHub, but will not mark as an error.
|
||||
/// Use this when something shouldn't happen and is of note, but shouldn't block CI.
|
||||
/// Does not mark the test as failed.
|
||||
#define TEST_NOTICE(source, message) source.log_for_test((##message), "notice", __FILE__, __LINE__)
|
||||
|
||||
/// Constants indicating unit test completion status
|
||||
#define UNIT_TEST_PASSED 0
|
||||
#define UNIT_TEST_FAILED 1
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
/// Tests that all subsystems that need to properly initialize.
|
||||
/datum/unit_test/subsystem_init
|
||||
|
||||
/datum/unit_test/subsystem_init/Run()
|
||||
for(var/i in Master.subsystems)
|
||||
var/datum/controller/subsystem/ss = i
|
||||
if(ss.flags & SS_NO_INIT)
|
||||
for(var/datum/controller/subsystem/subsystem as anything in Master.subsystems)
|
||||
if(subsystem.flags & SS_NO_INIT)
|
||||
continue
|
||||
if(!ss.initialized)
|
||||
TEST_FAIL("[ss]([ss.type]) is a subsystem meant to initialize but doesn't get set as initialized.")
|
||||
if(!subsystem.initialized)
|
||||
var/message = "[subsystem] ([subsystem.type]) is a subsystem meant to initialize but doesn't get set as initialized."
|
||||
|
||||
if (subsystem.flags & SS_OK_TO_FAIL_INIT)
|
||||
TEST_NOTICE(src, "[message]\nThis subsystem is marked as SS_OK_TO_FAIL_INIT. This is still a bug, but it is non-blocking.")
|
||||
else
|
||||
TEST_FAIL(message)
|
||||
|
||||
@@ -108,6 +108,16 @@ GLOBAL_LIST_EMPTY(unit_test_mapping_logs)
|
||||
|
||||
log_test("[path_prefix]_[name] was put in data/screenshots_new")
|
||||
|
||||
/// Logs a test message. Will use GitHub action syntax found at https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
|
||||
/datum/unit_test/proc/log_for_test(text, priority, file, line)
|
||||
var/map_name = SSmapping.config.map_name
|
||||
|
||||
// Need to escape the text to properly support newlines.
|
||||
var/annotation_text = replacetext(text, "%", "%25")
|
||||
annotation_text = replacetext(annotation_text, "\n", "%0A")
|
||||
|
||||
log_world("::[priority] file=[file],line=[line],title=[map_name]: [type]::[annotation_text]")
|
||||
|
||||
/proc/RunUnitTest(test_path, list/test_results)
|
||||
var/datum/unit_test/test = new test_path
|
||||
|
||||
@@ -124,21 +134,13 @@ GLOBAL_LIST_EMPTY(unit_test_mapping_logs)
|
||||
"[test.succeeded ? TEST_OUTPUT_GREEN("PASS") : TEST_OUTPUT_RED("FAIL")]: [test_path] [duration / 10]s",
|
||||
)
|
||||
var/list/fail_reasons = test.fail_reasons
|
||||
var/map_name = SSmapping.config.map_name
|
||||
|
||||
for(var/reasonID in 1 to LAZYLEN(fail_reasons))
|
||||
var/text = fail_reasons[reasonID][1]
|
||||
var/file = fail_reasons[reasonID][2]
|
||||
var/line = fail_reasons[reasonID][3]
|
||||
|
||||
// Github action annotation.
|
||||
// See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
|
||||
|
||||
// Need to escape the text to properly support newlines.
|
||||
var/annotation_text = replacetext(text, "%", "%25")
|
||||
annotation_text = replacetext(annotation_text, "\n", "%0A")
|
||||
|
||||
log_world("::error file=[file],line=[line],title=[map_name]: [test_path]::[annotation_text]")
|
||||
test.log_for_test(text, "error", file, line)
|
||||
|
||||
// Normal log message
|
||||
log_entry += "\tREASON #[reasonID]: [text] at [file]:[line]"
|
||||
|
||||
Reference in New Issue
Block a user