From 722a95f825ba6248d6ce262a3ea2f657add858ee Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 8 Sep 2022 11:12:12 +1000 Subject: [PATCH] autotest: fail if no steps supplied and not autotest server --- Tools/autotest/autotest.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index e917941145..3254d43b2a 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -1214,6 +1214,10 @@ if __name__ == "__main__": newargs.append(arg) args = newargs + if len(args) == 0 and not opts.autotest_server: + print("Steps must be supplied; try --list and/or --list-subtests or --help") + sys.exit(1) + if len(args) > 0: # allow a wildcard list of steps matched = [] @@ -1232,12 +1236,6 @@ if __name__ == "__main__": sys.exit(1) matched.extend(matches) steps = matched - elif opts.autotest_server: - # we will be changing this script to give a help message if - # --autotest-server isn't given, instead of assuming we want - # to do everything that happens on autotest.ardupilot.org, - # which includes some significant state-changing actions. - print("AutoTest-Server Mode") # skip steps according to --skip option: steps_to_run = [s for s in steps if should_run_step(s)]