Skip to content

Commit

Permalink
set DUT and Tester names
Browse files Browse the repository at this point in the history
  • Loading branch information
jori-nordic committed Aug 19, 2022
1 parent cbf1fd1 commit acc6208
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -104,6 +104,7 @@ def flasheddevices(request):
with ExitStack() as stack:
dut_dk = stack.enter_context(
FlashedDevice(request,
name='DUT',
family=dut_family,
id=dut_id,
board=get_board_by_family(dut_family),
@@ -112,6 +113,7 @@ def flasheddevices(request):

tester_dk = stack.enter_context(
FlashedDevice(request,
name='Tester',
family=tester_family,
id=tester_id,
board=get_board_by_family(tester_family),
2 changes: 1 addition & 1 deletion targettest/targettest/devkit.py
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ def __init__(self, id, family, name, port=None):
self.log = ''

def __repr__(self):
return f'[{self.segger_id}] {self.port}'
return f'{self.name}: {self.segger_id} {self.port} '

def log_handler(self, rx: str):
self.log += rx
5 changes: 4 additions & 1 deletion targettest/targettest/provision.py
Original file line number Diff line number Diff line change
@@ -45,14 +45,17 @@ def get_fw_path(suite, board, child_image_name=None):


@contextmanager
def FlashedDevice(request, family='NRF53', id=None, board='nrf5340dk_nrf5340_cpuapp', flash=True, emu=True):
def FlashedDevice(request, family='NRF53', id=None, board='nrf5340dk_nrf5340_cpuapp', name=None, flash=True, emu=True):
# Select HW device
dev = get_available_dk(family, id)
assert dev is not None, f'Hardware device not found'

if family is not None:
family = family.upper()

if name is not None:
dev.name = name

if flash:
# Flash device with test FW & reset it
if family == 'NRF53':

0 comments on commit acc6208

Please sign in to comment.