test(m60-b): free the driven scene before exit

This commit is contained in:
2026-09-13 22:59:04 +08:00
parent e1cad068fc
commit dac5de4023
@@ -25,6 +25,7 @@ var frames_dir := ""
var timeline: Array = []
var parsed_touches := 0
var shell
var game_node: Node
var settled := false
@@ -48,6 +49,7 @@ func _run() -> void:
root.size = Vector2i(1280, 720)
var game := MainScene.instantiate()
game_node = game
root.add_child(game)
await _frames(60)
shell = game.entry_shell
@@ -429,6 +431,11 @@ func _finish(code: int) -> void:
])
if code == 0 and blocked == 0:
print("ABG_M60_PLAYTHROUGH_OK boot_to_recovery=true steps=%d touches=%d" % [timeline.size(), parsed_touches])
# Free the driven scene before quitting so the strict run sees no leaked
# ObjectDB instances.
if is_instance_valid(game_node):
game_node.queue_free()
await _frames(5)
quit(code)