sanitycheck: move export-tests handling and deduplicate code
Reuse the same code used for other options. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
55882ac3ec
commit
60ae507783
1 changed files with 6 additions and 7 deletions
|
@ -830,16 +830,15 @@ def main():
|
|||
|
||||
return
|
||||
|
||||
if options.export_tests:
|
||||
cnt = 0
|
||||
tests = suite.get_all_tests()
|
||||
export_tests(options.export_tests, tests)
|
||||
return
|
||||
|
||||
if options.list_tests or options.test_tree or options.list_test_duplicates or options.sub_test:
|
||||
if options.list_tests or options.test_tree or options.list_test_duplicates \
|
||||
or options.sub_test or options.export_tests:
|
||||
cnt = 0
|
||||
all_tests = suite.get_all_tests()
|
||||
|
||||
if options.export_tests:
|
||||
export_tests(options.export_tests, all_tests)
|
||||
return
|
||||
|
||||
if options.list_test_duplicates:
|
||||
import collections
|
||||
dupes = [item for item, count in collections.Counter(all_tests).items() if count > 1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue