From 70a161a58380d7582ef77b3e1ab5c7e122ac05bb Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 6 Jul 2021 15:00:37 +1000 Subject: [PATCH] autotest: create SITL debug binaries by default --- Tools/autotest/autotest.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index d17bcccaeb..6d43a886a2 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -898,9 +898,13 @@ if __name__ == "__main__": help='do not clean before building', dest="no_clean") group_build.add_option("--debug", - default=False, + default=None, action='store_true', - help='make built binaries debug binaries') + help='make built SITL binaries debug binaries') + group_build.add_option("--no-debug", + default=None, + action='store_true', + help='do not make built SITL binaries debug binaries') group_build.add_option("--coverage", default=False, action='store_true', @@ -969,6 +973,16 @@ if __name__ == "__main__": opts, args = parser.parse_args() + # canonicalise on opts.debug: + if opts.debug is None and opts.no_debug is None: + # default is to create debug SITL binaries + opts.debug = True + elif opts.debug is not None and opts.no_debug is not None: + if opts.debug == opts.no_debug: + raise ValueError("no_debug != !debug") + elif opts.no_debug is not None: + opts.debug = not opts.no_debug + if opts.timeout is None: opts.timeout = 5400 # adjust if we're running in a regime which may slow us down e.g. Valgrind