Skip to contentSkip to conversation

tools/testing/kunit/kunit.py: substitute if with elif

PATCH New Alexander Pantyukhin 1 participant 1 message Jan 25, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/testing/kunit/kunit.py: substitute if with elif

No need to re-check for request.run_isolated with next if.

---
 tools/testing/kunit/kunit.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/kunit/kunit.py +1 -1
index 43fbe96318fe..2e20944eefb4 100755
@@ -145,7 +145,7 @@ def exec_tests(linux: kunit_kernel.LinuxSourceTree, request: KunitExecRequest) -
 		tests = _list_tests(linux, request)
 		if request.run_isolated == 'test':
 			filter_globs = tests
-		if request.run_isolated == 'suite':
+		elif request.run_isolated == 'suite':
 			filter_globs = _suites_from_test_list(tests)
 			# Apply the test-part of the user's glob, if present.
 			if '.' in request.filter_glob:
Signature · 1 line
2.25.1