Skip to content

Revisit command line arguments. #777

@bitwes

Description

@bitwes

Versions

GUT 9.5+

The Feature

Over the years I've wanted to make some changes to the CLI options. This is a list of them. I think these changes will warrant a new script to invoke from the command line and will have to be maintained (at least for awhile) with the other. For now let's call it res://addons/gut/gut_cmdln2.gd

Changes

  • Quit working around built-in option names and require the use of -- or ++ to specify GUT specific options.
  • All options use -- and optional short versions using -. No options use the -g prefix.
  • Options should use hyphens instead of underscores.
  • -gselect should be --filter-script. Could support globbing.
  • -ginner_class should be --filter-inner-class. Could support globbing.
  • -gunit_test_name should be --filter-test. Could support globbing.

New Options

  • --test-name Runs any test with the exact name. No partial matches.
  • --script-name Runs any script with that exact name. No partial matches. If you specify a path it will result in one script being run. This will also add the script even if it is not in an included directory.
  • --inner-class Runs any inner class with the exact name. No partial matches.

Notes

The options --test-name, --script-name, --inner-class will stop GUT from running extra tests that match, which happens sometimes (#366).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions