From 3c66663880f9b129255c99c478f19e7ce706d9a9 Mon Sep 17 00:00:00 2001 From: Daniel Orbach Date: Wed, 9 Aug 2017 11:10:18 +0200 Subject: [PATCH] Tools: autotest.py: Squashed the code for default.* steps in run_step(). --- Tools/autotest/autotest.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index b3a954b280..7bfcea38c6 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -218,17 +218,9 @@ def run_step(step): binary = binary_path(step, debug=opts.debug) - if step == 'defaults.ArduPlane': - return get_default_params('ArduPlane', binary) - - if step == 'defaults.ArduCopter': - return get_default_params('ArduCopter', binary) - - if step == 'defaults.APMrover2': - return get_default_params('APMrover2', binary) - - if step == 'defaults.ArduSub': - return get_default_params('ArduSub', binary) + if step.startswith("default"): + vehicle = step[8:] + return get_default_params(vehicle, binary) if step == 'fly.ArduCopter': return arducopter.fly_ArduCopter(binary, viewerip=opts.viewerip, use_map=opts.map, valgrind=opts.valgrind, gdb=opts.gdb, frame=opts.frame)