diff --git a/README.md b/README.md index 8939dd0..c2711e1 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,8 @@ Use this command to test your project in the command line: # └─────────────────────────────────── Tells Godot to not display a window. Omit if you strictly need a window. ``` +The process will exit with code `0` on success (all tests except skipped onces passing), `1` with warnings (all tests either passing or throwing warnings except skipped ones) and `2` on failure (some tests failing). + ## File structure Here's a file structure for this project: ```plain diff --git a/addons/besseretests/src/runtimescene.gd b/addons/besseretests/src/runtimescene.gd index 0e456ce..506cac7 100644 --- a/addons/besseretests/src/runtimescene.gd +++ b/addons/besseretests/src/runtimescene.gd @@ -89,7 +89,9 @@ func _ready() -> void: lresu("") # Shutdown - terminate() + if stats_all == stats_ok: terminate(0) + elif stats_all == stats_ok + stats_warn: terminate(1) + else: terminate(2) # Runs a test suite func run_suite(suite: String) -> void: