8000 ci: Use -s not --script to run tests · endlessm/godot-block-coding@ad5a560 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad5a560

Browse files
committed
ci: Use -s not --script to run tests
gut's cmdline script accepts a number of command-line arguments. It appears that the Godot engine removes most of its own options from the argument list available to user code, but it leaves any `--script FOO` or `-s FOO` arguments in place. gut 9.2.1 understands both the `--script` and `-s` forms, but gut 9.3.0 only understands the `-s` form and raises an error if the `--script` form is used. bitwes/Gut#667
1 parent 5183180 commit ad5a560

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
godot --path . --headless --import
4343
- name: Run tests
4444
run: |
45-
godot --path . --headless --script addons/gut/gut_cmdln.gd -gexit
45+
godot --path . --headless -s addons/gut/gut_cmdln.gd -gexit

addons/block_code/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,17 @@ This plugin uses the [Godot Unit Test](https://gut.readthedocs.io/en/latest/) (G
153153
Tests can also be run from the command line using the GUT command line script:
154154

155155
```
156-
godot --path . --headless --script addons/gut/gut_cmdln.gd -gexit
156+
godot --path . --headless -s addons/gut/gut_cmdln.gd -gexit
157157
```
158158

159159
A few options are of note here:
160160

161161
- `--path` instructs Godot to use the project in the current directory.
162162
- `--headless` instructs Godot to run without a display or sound.
163-
- `--script` instructs Godot to run the GUT command line script instead of
164-
running the main scene.
163+
- `-s` instructs Godot to run the GUT command line script instead of
164+
running the main scene. Due to a [bug in
165+
GUT](https://github.com/bitwes/Gut/issues/667), the long form `--script`
166+
cannot be used.
165167
- `-gexit` is an option for the GUT command line script that instructs GUT to
166168
exit after the tests complete.
167169

0 commit comments

Comments
 (0)
0