twister: pytest: Sysbuild support in pytest-twister-harness

Read default domain from domains.yaml file and update
paths to proper build directory. It fixes native and qemu
pytest scenarios, when application is build with sysbuild.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
This commit is contained in:
Grzegorz Chwierut 2024-05-24 15:50:08 +02:00 committed by Henrik Brix Andersen
commit f52f08f877
5 changed files with 41 additions and 5 deletions

View file

@ -27,7 +27,7 @@ def fixture_device_adapter(tmp_path) -> Generator[QemuAdapter, None, None]:
@patch('shutil.which', return_value='west')
def test_if_generate_command_creates_proper_command(patched_which, device: QemuAdapter):
device.device_config.build_dir = Path('build_dir')
device.device_config.app_build_dir = Path('build_dir')
device.generate_command()
assert device.command == ['west', 'build', '-d', 'build_dir', '-t', 'run']