Skip to content

Commit f39df81

Browse files
committed
Fix unittests.py issue: options.testcase was missing
Change-Id: I701aa7934bc2d98a85711c075550c502e2a29923
1 parent b048632 commit f39df81

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

unittests.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,15 @@ def main():
10931093
if not testcases:
10941094
LOGGER.error("No test matches the provided regex pattern")
10951095
elif options.testcase:
1096+
for name, module, _ in tests.get_test_modules():
1097+
if name == options.testcase or module == options.testcase:
1098+
LOGGER.info("Executing tests in module %s", module)
1099+
testcases = [module]
1100+
break
1101+
if not testcases:
1102+
LOGGER.error("Test case not valid; see --help-tests")
1103+
sys.exit(1)
1104+
elif options.onetest:
10961105
LOGGER.info("Executing test: %s", options.onetest)
10971106
testcases = [options.onetest]
10981107
else:

0 commit comments

Comments
 (0)