twister: do not report filtered tests by default
Filtered tests are now not being reported by default to allow generation of reports that are easier to parse and work with in different tools. The complete filtered set of tests is still available in the json output for review and verification. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
0313c5ce6f
commit
bd1b364c2e
2 changed files with 12 additions and 5 deletions
|
@ -3045,7 +3045,7 @@ class TestPlan(DisablePyTestCollectionMixin):
|
||||||
self.enable_ubsan = False
|
self.enable_ubsan = False
|
||||||
self.enable_lsan = False
|
self.enable_lsan = False
|
||||||
self.enable_asan = False
|
self.enable_asan = False
|
||||||
self.no_skipped_report = False
|
self.detailed_skipped_report = False
|
||||||
self.enable_valgrind = False
|
self.enable_valgrind = False
|
||||||
self.extra_args = []
|
self.extra_args = []
|
||||||
self.inline_logs = False
|
self.inline_logs = False
|
||||||
|
@ -3926,7 +3926,7 @@ class TestPlan(DisablePyTestCollectionMixin):
|
||||||
|
|
||||||
suites_to_report = all_suites
|
suites_to_report = all_suites
|
||||||
# do not create entry if everything is filtered out
|
# do not create entry if everything is filtered out
|
||||||
if self.no_skipped_report:
|
if not self.detailed_skipped_report:
|
||||||
suites_to_report = list(filter(lambda d: d.get('status') != "filtered", all_suites))
|
suites_to_report = list(filter(lambda d: d.get('status') != "filtered", all_suites))
|
||||||
|
|
||||||
for suite in suites_to_report:
|
for suite in suites_to_report:
|
||||||
|
@ -3996,7 +3996,7 @@ class TestPlan(DisablePyTestCollectionMixin):
|
||||||
for platform in selected:
|
for platform in selected:
|
||||||
suites = list(filter(lambda d: d['platform'] == platform, all_suites))
|
suites = list(filter(lambda d: d['platform'] == platform, all_suites))
|
||||||
# do not create entry if everything is filtered out
|
# do not create entry if everything is filtered out
|
||||||
if self.no_skipped_report:
|
if not self.detailed_skipped_report:
|
||||||
non_filtered = list(filter(lambda d: d.get('status') != "filtered", suites))
|
non_filtered = list(filter(lambda d: d.get('status') != "filtered", suites))
|
||||||
if not non_filtered:
|
if not non_filtered:
|
||||||
continue
|
continue
|
||||||
|
@ -4023,7 +4023,7 @@ class TestPlan(DisablePyTestCollectionMixin):
|
||||||
|
|
||||||
ts_status = ts.get('status')
|
ts_status = ts.get('status')
|
||||||
# Do not report filtered testcases
|
# Do not report filtered testcases
|
||||||
if ts_status == 'filtered' and self.no_skipped_report:
|
if ts_status == 'filtered' and not self.detailed_skipped_report:
|
||||||
continue
|
continue
|
||||||
if full_report:
|
if full_report:
|
||||||
for tc in ts.get("testcases", []):
|
for tc in ts.get("testcases", []):
|
||||||
|
|
|
@ -548,11 +548,18 @@ structure in the main Zephyr tree: boards/<arch>/<board_name>/""")
|
||||||
help="Re-use the outdir before building. Will result in "
|
help="Re-use the outdir before building. Will result in "
|
||||||
"faster compilation since builds will be incremental.")
|
"faster compilation since builds will be incremental.")
|
||||||
|
|
||||||
|
# To be removed in favor of --detailed-skipped-report
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--no-skipped-report", action="store_true",
|
"--no-skipped-report", action="store_true",
|
||||||
help="""Do not report skipped test cases in junit output. [Experimental]
|
help="""Do not report skipped test cases in junit output. [Experimental]
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"--detailed-skipped-report", action="store_true",
|
||||||
|
help="Generate a detailed report with all skipped test cases"
|
||||||
|
"including those that are filtered based on testsuite definition."
|
||||||
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-O", "--outdir",
|
"-O", "--outdir",
|
||||||
default=os.path.join(os.getcwd(), "twister-out"),
|
default=os.path.join(os.getcwd(), "twister-out"),
|
||||||
|
@ -922,7 +929,7 @@ def main():
|
||||||
tplan.overflow_as_errors = options.overflow_as_errors
|
tplan.overflow_as_errors = options.overflow_as_errors
|
||||||
tplan.suite_name_check = not options.disable_suite_name_check
|
tplan.suite_name_check = not options.disable_suite_name_check
|
||||||
tplan.seed = options.seed
|
tplan.seed = options.seed
|
||||||
tplan.no_skipped_report = options.no_skipped_report
|
tplan.detailed_skipped_report = options.detailed_skipped_report
|
||||||
|
|
||||||
# get all enabled west projects
|
# get all enabled west projects
|
||||||
west_proj = west_projects()
|
west_proj = west_projects()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue