Updating gitea workers and adding gdunit4 and fake test.
Run Tests / test (push) Failing after 12s
Validate Project / validate (push) Failing after 12s

This commit is contained in:
2026-08-27 15:23:24 -07:00
parent e68f126f32
commit 02c1a540f9
510 changed files with 30603 additions and 31 deletions
@@ -0,0 +1,57 @@
class_name GdAssertReports
extends RefCounted
const LAST_ERROR = "last_assert_error_message"
const LAST_ERROR_LINE = "last_assert_error_line"
static func report_success() -> void:
GdUnitSignals.instance().gdunit_set_test_failed.emit(false)
GdAssertReports.set_last_error_line_number(-1)
Engine.remove_meta(LAST_ERROR)
static func report_warning(message :String, line_number :int) -> void:
GdUnitSignals.instance().gdunit_set_test_failed.emit(false)
send_report(GdUnitReport.new().create(GdUnitReport.WARN, line_number, message))
static func report_error(error: GdUnitError) -> void:
GdUnitSignals.instance().gdunit_set_test_failed.emit(true)
GdAssertReports.set_last_error_line_number(error._line_number)
Engine.set_meta(LAST_ERROR, error._message)
Engine.set_meta("GD_TEST_FAILURE", true)
GdUnitThreadManager.get_current_context().get_execution_context().set_error(error)
# if we expect to fail we handle as success test
if _do_expect_assert_failing():
return
send_report(GdUnitReport.new().from_error(GdUnitReport.FAILURE, error))
static func reset_last_error_line_number() -> void:
Engine.remove_meta(LAST_ERROR_LINE)
static func set_last_error_line_number(line_number :int) -> void:
Engine.set_meta(LAST_ERROR_LINE, line_number)
static func get_last_error_line_number() -> int:
if Engine.has_meta(LAST_ERROR_LINE):
return Engine.get_meta(LAST_ERROR_LINE)
return -1
static func _do_expect_assert_failing() -> bool:
if Engine.has_meta(GdUnitConstants.EXPECT_ASSERT_REPORT_FAILURES):
return Engine.get_meta(GdUnitConstants.EXPECT_ASSERT_REPORT_FAILURES)
return false
static func current_failure() -> String:
return Engine.get_meta(LAST_ERROR)
static func send_report(report :GdUnitReport) -> void:
GdUnitThreadManager.get_current_context().get_execution_context().add_report(report)