twister: print dut name when testing on hardware
When using the hardware map and testing on device, print out the name of the dut (from the hardware map) on the script and report it in the json output as well. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
b48c3cd3e3
commit
b28b6a0687
4 changed files with 7 additions and 0 deletions
|
@ -467,6 +467,8 @@ class DeviceHandler(Handler):
|
|||
def handle(self, harness):
|
||||
runner = None
|
||||
hardware = self.get_hardware()
|
||||
if hardware:
|
||||
self.instance.dut = hardware.id
|
||||
if not hardware:
|
||||
return
|
||||
|
||||
|
|
|
@ -273,6 +273,8 @@ class Reporting:
|
|||
|
||||
suite['retries'] = instance.retries
|
||||
|
||||
if instance.dut:
|
||||
suite["dut"] = instance.dut
|
||||
if available_ram:
|
||||
suite["available_ram"] = available_ram
|
||||
if available_rom:
|
||||
|
|
|
@ -932,6 +932,8 @@ class ProjectBuilder(FilterBuilder):
|
|||
if instance.handler.ready and instance.run:
|
||||
more_info = instance.handler.type_str
|
||||
htime = instance.execution_time
|
||||
if instance.dut:
|
||||
more_info += f": {instance.dut},"
|
||||
if htime:
|
||||
more_info += " {:.3f}s".format(htime)
|
||||
else:
|
||||
|
|
|
@ -54,6 +54,7 @@ class TestInstance:
|
|||
|
||||
self.name = os.path.join(platform.name, testsuite.name)
|
||||
self.run_id = self._get_run_id()
|
||||
self.dut = None
|
||||
self.build_dir = os.path.join(outdir, platform.name, testsuite.name)
|
||||
|
||||
self.domains = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue