Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
sanitycheck: add option to list all available tags
To avoid duplication when adding a new testcase.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information
nashif authored and Anas Nashif committed Apr 9, 2018
1 parent 5df8cff commit 75547e2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/sanitycheck
Expand Up @@ -1227,6 +1227,7 @@ class SanityConfigParser:
d = {}
for k, v in self.common.items():
d[k] = v

for k, v in self.tests[name].items():
if k not in valid_keys:
raise ConfigurationError(
Expand All @@ -1239,6 +1240,7 @@ class SanityConfigParser:
d[k] += " " + v
else:
d[k] = v

for k, kinfo in valid_keys.items():
if k not in d:
if "required" in kinfo:
Expand Down Expand Up @@ -1391,7 +1393,7 @@ class TestCase:
self.defconfig = {}
self.yamlfile = yamlfile

def __repr__(self):
def __str__(self):
return self.name


Expand Down Expand Up @@ -2133,6 +2135,9 @@ def parse_arguments():
"run them. Useful if you're just interested in "
"--discard-report")

parser.add_argument("--list-tags", action="store_true",
help="list all tags in selected tests")

parser.add_argument(
"-r", "--release", action="store_true",
help="Update the benchmark database with the results of this test "
Expand Down Expand Up @@ -2419,6 +2424,16 @@ def main():
ts = TestSuite(options.board_root, options.testcase_root,
options.outdir, options.coverage)

if options.list_tags:
tags = set()
for n,tc in ts.testcases.items():
tags = tags.union(tc.tags)

for t in tags:
print("- {}".format(t))

return

discards = []
if options.load_tests:
ts.load_from_file(options.load_tests)
Expand Down

0 comments on commit 75547e2

Please sign in to comment.