diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2017-08-02 16:10:40 +0100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2017-08-02 16:13:08 +0100 |
commit | f9c8c06942c923f14cf7bca9b39a6ef41b7443fd (patch) | |
tree | 155d0921379ec0c87363acbf94ba5742db5f0d39 | |
parent | 259ba19972b202ee035243347081948309ddd9de (diff) |
test-runner: handle incorrect test definition parameters
When custom parameters for test definition (-r) are not formatter
properly, they should be ignored.
Change-Id: I48fd26d2466ef79f0b301a2515b37c368537e2eb
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rwxr-xr-x | automated/utils/test-runner.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py index fd4591a..5562d64 100755 --- a/automated/utils/test-runner.py +++ b/automated/utils/test-runner.py @@ -34,8 +34,11 @@ class StoreDictKeyPair(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): my_dict = {} for kv in values: - k, v = kv.split("=") - my_dict[k] = v + if "=" in kv: + k, v = kv.split("=", 1) + my_dict[k] = v + else: + print("Invalid parameter: %s" % kv) setattr(namespace, self.dest, my_dict) |