From 7f2f0b6616c1a72b8c7976c8dc8ea96f0179437f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Thu, 10 Oct 2019 11:39:00 +0200 Subject: [PATCH] tools/compile_and_test_for_board: allow setting the flash targets This allow configuring the flash targets in the same way as the compilation and test targets. This is part of trying to flash with docker using a different flash target. --- .../compile_and_test_for_board.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py b/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py index b291e1dbf0a4..4eb4cf2644a1 100755 --- a/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py +++ b/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py @@ -38,6 +38,7 @@ [--loglevel {debug,info,warning,error,fatal,critical}] [--incremental] [--clean-after] [--compile-targets COMPILE_TARGETS] + [--flash-targets FLASH_TARGETS] [--test-targets TEST_TARGETS] [--test-available-targets TEST_AVAILABLE_TARGETS] [--jobs JOBS] @@ -68,6 +69,8 @@ --clean-after Clean after running each test (default: False) --compile-targets COMPILE_TARGETS List of make targets to compile (default: clean all) + --flash-targets FLASH_TARGETS + List of make targets to flash (default: flash-only) --test-targets TEST_TARGETS List of make targets to run test (default: test) --test-available-targets TEST_AVAILABLE_TARGETS @@ -192,6 +195,7 @@ class RIOTApplication(): MAKEFLAGS = ('RIOT_CI_BUILD=1', 'CC_NOCOLOR=1', '--no-print-directory') COMPILE_TARGETS = ('clean', 'all',) + FLASH_TARGETS = ('flash-only',) TEST_TARGETS = ('test',) TEST_AVAILABLE_TARGETS = ('test/available',) @@ -332,7 +336,7 @@ def compilation_and_test(self, clean_after=False, runtest=True, if runtest: if has_test: setuptasks = collections.OrderedDict( - [('flash', ['flash-only'])]) + [('flash', self.FLASH_TARGETS)]) self.make_with_outfile('test', self.TEST_TARGETS, save_output=True, setuptasks=setuptasks) if clean_after: @@ -581,6 +585,9 @@ def _strip_board_equal(board): PARSER.add_argument('--compile-targets', type=list_from_string, default=' '.join(RIOTApplication.COMPILE_TARGETS), help='List of make targets to compile') +PARSER.add_argument('--flash-targets', type=list_from_string, + default=' '.join(RIOTApplication.FLASH_TARGETS), + help='List of make targets to flash') PARSER.add_argument('--test-targets', type=list_from_string, default=' '.join(RIOTApplication.TEST_TARGETS), help='List of make targets to run test') @@ -620,6 +627,7 @@ def main(): # Overwrite the compile/test targets from command line arguments RIOTApplication.COMPILE_TARGETS = args.compile_targets + RIOTApplication.FLASH_TARGETS = args.flash_targets RIOTApplication.TEST_TARGETS = args.test_targets RIOTApplication.TEST_AVAILABLE_TARGETS = args.test_available_targets