From 45ccced4dfe1165935b0577e5731667911acc3ec Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 3 Apr 2020 12:27:52 +1100 Subject: [PATCH] autotest: add examples to help output --- Tools/autotest/autotest.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index 1911b8cb31..1defdfe763 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -641,7 +641,18 @@ if __name__ == "__main__": os.putenv('TMPDIR', util.reltopdir('tmp')) - parser = optparse.OptionParser("autotest") + class MyOptionParser(optparse.OptionParser): + def format_epilog(self, formatter): + return self.epilog + + parser = MyOptionParser( + "autotest", epilog="" + "e.g. autotest.py build.Rover test.Rover # test Rover\n" + "e.g. autotest.py build.Rover test.Rover build.Plane test.Plane # test Rover and Plane\n" + "e.g. autotest.py --debug --valgrind build.Rover test.Rover # test Rover under Valgrind\n" + "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("--skip", type='string', default='',