Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"--test" cannot be used as a user-provided argument after the separator (either "--" or "++") anymore #95922

Open
krova opened this issue Aug 21, 2024 · 2 comments

Comments

@krova
Copy link

krova commented Aug 21, 2024

Tested versions

Introduced in 4.3
Worked fine in 4.2.2

System information

Windows 10 / Ubuntu 22.04, Godot 4.3

Issue description

Hey,
I believe v4.3 broke the "--" separator for user-provided arguments.
As per the documentation: "Following arguments are not used by the engine, but can be read from OS.get_cmdline_user_args()."

This was true in v4.2.2:

Godot_v4.2.2-stable_mono_win64_console.exe --headless --path Path/To/My/Game -v -- --test
Godot Engine v4.2.2.stable.mono.official.15073afe3 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Using "default" pen tablet driver...
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
.NET: Initializing module...
Found hostfxr: C:\Program Files\dotnet\host/fxr/8.0.8/hostfxr.dll
.NET: hostfxr initialized
.NET: GodotPlugins initialized
CORE API HASH: 622119089
EDITOR API HASH: 497707466
Loaded system CA certificates
My custom game test is starting...

However, in the 4.3 version it stopped working:

Godot_v4.3-stable_mono_win64_console.exe --headless --path Path/To/My/Game -v -- --test
ERROR: --test was specified on the command line, but this Godot binary was compiled without support for unit tests. Aborting.
To be able to run unit tests, use the tests=yes SCons option when compiling Godot.

I do not want to run unit tests.
I did not specify --test as a Godot flag.
I only wanted to pass my own argument, after the "--" separator.

Steps to reproduce

Just run:

Godot_v4.3-stable_mono_win64_console.exe -- --test

Minimal reproduction project (MRP)

Just run:

Godot_v4.3-stable_mono_win64_console.exe -- --test

@Calinou
Copy link
Member

Calinou commented Aug 21, 2024

This is a regression from #90507.

Note that the existing check in place was also flawed, as it did not check whether --test was specified before --. If it's specified after --, Godot should ignore it.

@Dowsley
Copy link
Contributor

Dowsley commented Sep 12, 2024

@Calinou Made a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants