From 9596cec4512d4deb703181f7f28203f2fd0c5946 Mon Sep 17 00:00:00 2001 From: Przemek Wirkus Date: Fri, 31 Jul 2015 11:50:07 +0100 Subject: [PATCH] Added plugin reset info for --help option --- mbed_host_tests/__init__.py | 10 ++++++---- mbed_host_tests/host_tests_runner/mbed_base.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mbed_host_tests/__init__.py b/mbed_host_tests/__init__.py index af9a490..4612f96 100644 --- a/mbed_host_tests/__init__.py +++ b/mbed_host_tests/__init__.py @@ -297,16 +297,18 @@ def init_host_test_cli_params(): help="Copy (flash the target) method selector. " + copy_methods_str, metavar="COPY_METHOD") + reset_methods_str = "Plugin support: " + ', '.join(host_tests_plugins.get_plugin_caps('ResetMethod')) + + parser.add_option("-r", "--reset", + dest="forced_reset_type", + help="Forces different type of reset. " + reset_methods_str) + parser.add_option("-C", "--program_cycle_s", dest="program_cycle_s", help="Program cycle sleep. Define how many seconds you want wait after copying binary onto target", type="float", metavar="PROGRAM_CYCLE_S") - parser.add_option("-r", "--reset", - dest="forced_reset_type", - help="Forces different type of reset") - parser.add_option("-R", "--reset-timeout", dest="forced_reset_timeout", metavar="NUMBER", diff --git a/mbed_host_tests/host_tests_runner/mbed_base.py b/mbed_host_tests/host_tests_runner/mbed_base.py index 9ae5d44..c7ebc99 100644 --- a/mbed_host_tests/host_tests_runner/mbed_base.py +++ b/mbed_host_tests/host_tests_runner/mbed_base.py @@ -46,7 +46,7 @@ def __init__(self, options=None): self.DEFAULT_RESET_TOUT = 0 if self.options and self.options.port is None: - raise Exception("The serial port of the target mbed have to be provided as command line arguments") + raise Exception("The serial port (see: -p PORT) of the target mbed have to be provided as command line arguments") # Options related to copy / reset mbed device self.port = self.options.port