Commit c9dcc48d authored by Damian Johnson's avatar Damian Johnson
Browse files

Rather than error, keep the default target when none are provided

Actually, on reflection if the user only provides attribute targets (ex.
'--target ONLINE') there's no point in erroring. They clearly want to keep the
default.
parent b9d66c4d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -385,11 +385,13 @@ def _get_args(argv):
        attribute_targets.remove(Target.RUN_ALL)
        run_targets = all_run_targets

      # if no RUN_* targets are provided then keep the default (otherwise we
      # won't have any tests to run)

      if run_targets:
        args['run_targets'] = run_targets
      args['attribute_targets'] = attribute_targets

      if not args['run_targets']:
        raise ValueError("This wouldn't run anything. You need to provide at least one target that starts with 'RUN_'.")
      args['attribute_targets'] = attribute_targets
    elif opt == '--test':
      args['specific_test'] = arg
    elif opt in ('-l', '--log'):