twister: Add options deciding if paths be included in tests' names
Test suites names are not being handled uniformly for tests not in zephyr tree. Their names depend on -T arg used in twister's CLI. The newly added options allow to select if twister should add paths to suite names. This is needed if test plans are to be used for tests outside of zephyr tree. Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This commit is contained in:
parent
4e4b743fe1
commit
066cc2c9d2
7 changed files with 81 additions and 10 deletions
|
@ -420,6 +420,7 @@ class Reporting:
|
|||
def synopsis(self):
|
||||
cnt = 0
|
||||
example_instance = None
|
||||
detailed_test_id = self.env.options.detailed_test_id
|
||||
for instance in self.instances.values():
|
||||
if instance.status not in ["passed", "filtered", "skipped"]:
|
||||
cnt = cnt + 1
|
||||
|
@ -435,11 +436,14 @@ class Reporting:
|
|||
if cnt and example_instance:
|
||||
logger.info("")
|
||||
logger.info("To rerun the tests, call twister using the following commandline:")
|
||||
logger.info("west twister -p <PLATFORM> -s <TEST ID>, for example:")
|
||||
extra_parameters = '' if detailed_test_id else ' --no-detailed-test-id'
|
||||
logger.info(f"west twister -p <PLATFORM> -s <TEST ID>{extra_parameters}, for example:")
|
||||
logger.info("")
|
||||
logger.info(f"west twister -p {example_instance.platform.name} -s {example_instance.testsuite.name}")
|
||||
logger.info(f"west twister -p {example_instance.platform.name} -s {example_instance.testsuite.name}"
|
||||
f"{extra_parameters}")
|
||||
logger.info(f"or with west:")
|
||||
logger.info(f"west build -p -b {example_instance.platform.name} -T {example_instance.testsuite.name}")
|
||||
logger.info(f"west build -p -b {example_instance.platform.name} "
|
||||
f"{example_instance.testsuite.source_dir_rel} -T {example_instance.testsuite.id}")
|
||||
logger.info("-+" * 40)
|
||||
|
||||
def summary(self, results, unrecognized_sections, duration):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue