1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Ignore --test flag when it is an user-provided argument

This commit is contained in:
J. F. Dowsley
2025-02-06 12:25:50 -03:00
parent e65a23762b
commit d481669c50

View File

@@ -889,6 +889,11 @@ void Main::test_cleanup() {
int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) {
for (int x = 0; x < argc; x++) {
// Early return to ignore a possible user-provided "--test" argument.
if ((strlen(argv[x]) == 2) && ((strncmp(argv[x], "--", 2) == 0) || (strncmp(argv[x], "++", 2) == 0))) {
tests_need_run = false;
return EXIT_SUCCESS;
}
if ((strncmp(argv[x], "--test", 6) == 0) && (strlen(argv[x]) == 6)) {
tests_need_run = true;
#ifdef TESTS_ENABLED