sanitycheck: add option to store platform reports
Now we create plaform reports for each enabled platform, this is time consuming, especially if you are not using those reports for anything. Make this an option and enable only if the generated reports are going to be used. Individual reports can also be generated from the JSON file if needed. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
7822e7b50d
commit
a5d16ab027
2 changed files with 11 additions and 3 deletions
|
@ -2732,10 +2732,11 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
logger.info(f"{Fore.GREEN}{run}{Fore.RESET} test configurations executed on platforms, \
|
||||
{Fore.RED}{results.total - run - results.skipped_configs}{Fore.RESET} test configurations were only built.")
|
||||
|
||||
def save_reports(self, name, suffix, report_dir, no_update, release, only_failed):
|
||||
def save_reports(self, name, suffix, report_dir, no_update, release, only_failed, platform_reports):
|
||||
if not self.instances:
|
||||
return
|
||||
|
||||
logger.info("Saving reports...")
|
||||
if name:
|
||||
report_name = name
|
||||
else:
|
||||
|
@ -2760,7 +2761,8 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
self.csv_report(filename + ".csv")
|
||||
self.json_report(filename + ".json", append=only_failed, version=self.version)
|
||||
|
||||
self.target_report(outdir, suffix, append=only_failed)
|
||||
if platform_reports:
|
||||
self.target_report(outdir, suffix, append=only_failed)
|
||||
if self.discards:
|
||||
self.discard_report(filename + "_discard.csv")
|
||||
|
||||
|
|
|
@ -338,6 +338,10 @@ Artificially long but functional example:
|
|||
(twister.csv and twister.xml).
|
||||
""")
|
||||
|
||||
parser.add_argument(
|
||||
"--platform-reports", action="store_true",
|
||||
help="""Create individual reports for each platform.
|
||||
""")
|
||||
parser.add_argument(
|
||||
"--report-name",
|
||||
help="""Create a report with a custom name.
|
||||
|
@ -1248,7 +1252,9 @@ def main():
|
|||
options.report_dir,
|
||||
options.no_update,
|
||||
options.release,
|
||||
options.only_failed)
|
||||
options.only_failed,
|
||||
options.platform_reports,
|
||||
)
|
||||
|
||||
# FIXME: remove later
|
||||
#logger.info(f"failed: {results.failed}, cases: {results.cases}, skipped configurations: {results.skipped_configs}, skipped_cases: {results.skipped_cases}, skipped(runtime): {results.skipped_runtime}, passed: {results.passed}, total: {results.total}, done: {results.done}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue