Browse Source

autotest: add a do-nothing --autotest-server option

This option is currently ignored, but if given allows the script to
continue normally.

This allows us to change the autotest server to pass the option in - and
then we can change autotest.py so that unless the option is given we
spit out a help message rather than completely stuff up the user's
development environment
c415-sdk
Peter Barker 4 years ago committed by Peter Barker
parent
commit
ef4ebbf126
  1. 10
      Tools/autotest/autotest.py

10
Tools/autotest/autotest.py

@ -794,6 +794,10 @@ if __name__ == "__main__": @@ -794,6 +794,10 @@ if __name__ == "__main__":
"e.g. autotest.py --debug --gdb build.Tracker test.Tracker # run Tracker under gdb\n"
"e.g. autotest.py --debug --gdb build.Sub test.Sub.DiveManual # do specific Sub test\n"
)
parser.add_option("--autotest-server",
action='store_true',
default=False,
help='Run in autotest-server mode; dangerous!')
parser.add_option("--skip",
type='string',
default='',
@ -1099,6 +1103,12 @@ if __name__ == "__main__": @@ -1099,6 +1103,12 @@ 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)]

Loading…
Cancel
Save