You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
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:
@@ -350,13 +350,13 @@ void GDScriptTestRunner::handle_cmdline() {
|
|||||||
for (List<String>::Element *E = cmdline_args.front(); E; E = E->next()) {
|
for (List<String>::Element *E = cmdline_args.front(); E; E = E->next()) {
|
||||||
String &cmd = E->get();
|
String &cmd = E->get();
|
||||||
if (cmd == "--gdscript-generate-tests") {
|
if (cmd == "--gdscript-generate-tests") {
|
||||||
if (E->next() == nullptr) {
|
String path;
|
||||||
ERR_PRINT("Needed a path for the test files.");
|
if (E->next()) {
|
||||||
exit(-1);
|
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);
|
GDScriptTestRunner runner(path, false, cmdline_args.find("--print-filenames") != nullptr);
|
||||||
|
|
||||||
bool completed = runner.generate_outputs();
|
bool completed = runner.generate_outputs();
|
||||||
|
|||||||
Reference in New Issue
Block a user