summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorRevoluPowered <gordon@gordonite.tech>2020-07-20 17:35:34 +0100
committerGordon MacPherson <gordon@gordonite.tech>2020-07-24 13:05:33 +0100
commit579342810f5c453e91063c54ca6544300ea09090 (patch)
treeb01e1478605b835e1fe903384d753b114106d51e /SConstruct
parent93b50a62e333cd05702fb749ebcdc18127abe01b (diff)
t Add unit testing to Godot using DocTest and added to GitHub Actions CI
Implements exit codes into the engine so tests can return their statuses. Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically. Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header. This lowers the complexity of running the unit tests and even for physics should be possible to implement such a fix.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct3
1 files changed, 3 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index e7ca8b3030..e23aa1cdbc 100644
--- a/SConstruct
+++ b/SConstruct
@@ -641,6 +641,9 @@ if selected_platform in platform_list:
}
)
+ # enable test framework globally and inform it of configuration method
+ env.Append(CPPDEFINES=["DOCTEST_CONFIG_IMPLEMENT"])
+
scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path != None:
CacheDir(scons_cache_path)