GDScript: Use default path in test generator if not provided
Since it's almost always used with the same path, assume it is running from the Godot source root.
This commit is contained in:
parent
e2e870c611
commit
221deb1cc1
1 changed files with 5 additions and 5 deletions
|
@ -350,13 +350,13 @@ void GDScriptTestRunner::handle_cmdline() {
|
|||
for (List<String>::Element *E = cmdline_args.front(); E; E = E->next()) {
|
||||
String &cmd = E->get();
|
||||
if (cmd == "--gdscript-generate-tests") {
|
||||
if (E->next() == nullptr) {
|
||||
ERR_PRINT("Needed a path for the test files.");
|
||||
exit(-1);
|
||||
String path;
|
||||
if (E->next()) {
|
||||
path = E->next()->get();
|
||||
} else {
|
||||
path = "modules/gdscript/tests/scripts";
|
||||
}
|
||||
|
||||
const String &path = E->next()->get();
|
||||
|
||||
GDScriptTestRunner runner(path, false, cmdline_args.find("--print-filenames") != nullptr);
|
||||
|
||||
bool completed = runner.generate_outputs();
|
||||
|
|
Loading…
Reference in a new issue