diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2022-11-23 18:55:28 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-26 11:19:40 +0000 |
commit | f27e91305b2c47c371151812343cb0a960ec7a49 (patch) | |
tree | fd50f50587555b0fee54c9b504708703a41ea1c3 | |
parent | b3cf48d741c02295a6a9b2d08ddd57074e65eeb6 (diff) | |
download | poky-f27e91305b2c47c371151812343cb0a960ec7a49.tar.gz |
selftest: allow '-R' and '-r' be used together
For now, there's no easy way to skip some specified tests when
using 'oe-selftest -r'. This is because '-R' and '-r' are in the
mutually exclusive group. Looking at the codes, the codes have already
allowed running specified tests and skipping specified tests at
the same time. So move '-R' out of the mutually exclusive group
and change its help message.
After this change, the following command could be used.
oe-selftest -r A -R A.B.C
This does introduce a behavior regression.
Previous 'oe-selftest -R xxx' needs to now be changed to
'oe-selftest -a -R xxx'.
(From OE-Core rev: df9a2b69748d8a24c3390f812225231e9e9acb66)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/context.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 78c7a467e2..c7dd03ce37 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py | |||
@@ -154,9 +154,6 @@ class OESelftestTestContextExecutor(OETestContextExecutor): | |||
154 | group.add_argument('-a', '--run-all-tests', default=False, | 154 | group.add_argument('-a', '--run-all-tests', default=False, |
155 | action="store_true", dest="run_all_tests", | 155 | action="store_true", dest="run_all_tests", |
156 | help='Run all (unhidden) tests') | 156 | help='Run all (unhidden) tests') |
157 | group.add_argument('-R', '--skip-tests', required=False, action='store', | ||
158 | nargs='+', dest="skips", default=None, | ||
159 | help='Run all (unhidden) tests except the ones specified. Format should be <module>[.<class>[.<test_method>]]') | ||
160 | group.add_argument('-r', '--run-tests', required=False, action='store', | 157 | group.add_argument('-r', '--run-tests', required=False, action='store', |
161 | nargs='+', dest="run_tests", default=None, | 158 | nargs='+', dest="run_tests", default=None, |
162 | help='Select what tests to run (modules, classes or test methods). Format should be: <module>.<class>.<test_method>') | 159 | help='Select what tests to run (modules, classes or test methods). Format should be: <module>.<class>.<test_method>') |
@@ -171,6 +168,9 @@ class OESelftestTestContextExecutor(OETestContextExecutor): | |||
171 | action="store_true", default=False, | 168 | action="store_true", default=False, |
172 | help='List all available tests.') | 169 | help='List all available tests.') |
173 | 170 | ||
171 | parser.add_argument('-R', '--skip-tests', required=False, action='store', | ||
172 | nargs='+', dest="skips", default=None, | ||
173 | help='Skip the tests specified. Format should be <module>[.<class>[.<test_method>]]') | ||
174 | parser.add_argument('-j', '--num-processes', dest='processes', action='store', | 174 | parser.add_argument('-j', '--num-processes', dest='processes', action='store', |
175 | type=int, help="number of processes to execute in parallel with") | 175 | type=int, help="number of processes to execute in parallel with") |
176 | 176 | ||