Skip to content

Commit

Permalink
sanitycheck: fix parsting tests from source files
Browse files Browse the repository at this point in the history
Fixed bug in parsing testnames from source files. We added 1cpu testing
but did not update the regex and we have been passing wrong path to the
glob as well, meaning tests were not parsed at all.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Nov 26, 2019
1 parent b846c9a commit 9091a01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/sanitycheck
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ class TestCase(object):
# ztest_test_suite(mutex_complex, ztest_user_unit_test(TESTNAME));
br"(?:ztest_test_suite\([a-zA-Z0-9_]+,\s*)?"
# Catch ztest[_user]_unit_test-[_setup_teardown](TESTNAME)
br"ztest_(?:user_)?unit_test(?:_setup_teardown)?"
br"ztest_(?:1cpu_)?(?:user_)?unit_test(?:_setup_teardown)?"
# Consume the argument that becomes the extra testcse
br"\(\s*"
br"(?P<stc_name>[a-zA-Z0-9_]+)"
Expand Down Expand Up @@ -1583,7 +1583,7 @@ class TestCase(object):
return subcases

def parse_subcases(self, test_path):
results = self.scan_path(os.path.dirname(test_path))
results = self.scan_path(test_path)
for sub in results:
name = "{}.{}".format(self.id, sub)
self.cases.append(name)
Expand Down

0 comments on commit 9091a01

Please sign in to comment.