diff --git a/tests/hw/libnux/with_hostcode/test_barrier_vx_v3.py b/tests/hw/libnux/with_hostcode/test_barrier_vx_v3.py index 5c271af7ae946b5ae149841a076384cd5f8ed834..1595199ee0ea14851b5d3576895ad3e071185b2c 100644 --- a/tests/hw/libnux/with_hostcode/test_barrier_vx_v3.py +++ b/tests/hw/libnux/with_hostcode/test_barrier_vx_v3.py @@ -1,4 +1,5 @@ import unittest +import os from os.path import join from dlens_vx_v3.hxcomm import ManagedConnection from dlens_vx_v3.sta import PlaybackProgramBuilder, \ @@ -7,10 +8,20 @@ from dlens_vx_v3.hal import PPUMemoryWord, Timer from dlens_vx_v3.halco import iter_all, PPUOnDLS from dlens_vx_v3.tools.run_ppu_program import load_and_start_program, \ stop_program -import dlens_vx_v3.halco as halco -import dlens_vx_v3.sta as sta +from dlens_vx_v3 import halco, sta from pylola_vx_v3 import PPUElfFile -from helpers.hwtest_common import TEST_BINARY_PATH + +_THIS_DIR = os.path.dirname(os.path.realpath(__file__)) +TEST_BINARY_PATH = os.environ.get("TEST_BINARY_PATH", + join(_THIS_DIR, + os.pardir, + os.pardir, + os.pardir, + "build", + "libnux", + "test", + "with_hostcode") + ) class LibnuxBarrierTest(unittest.TestCase): diff --git a/tests/hw/libnux/with_hostcode/test_barrier_vx_v4.py b/tests/hw/libnux/with_hostcode/test_barrier_vx_v4.py index 83744f1f607ef95e883b1ca4f99ed16dcefd1ff1..249752578ad4d248f9be9a47aecd8788ca52b575 100644 --- a/tests/hw/libnux/with_hostcode/test_barrier_vx_v4.py +++ b/tests/hw/libnux/with_hostcode/test_barrier_vx_v4.py @@ -1,4 +1,5 @@ import unittest +import os from os.path import join from dlens_vx_v4.hxcomm import ManagedConnection from dlens_vx_v4.sta import PlaybackProgramBuilder, \ @@ -7,10 +8,20 @@ from dlens_vx_v4.hal import PPUMemoryWord, Timer from dlens_vx_v4.halco import iter_all, PPUOnDLS from dlens_vx_v4.tools.run_ppu_program import load_and_start_program, \ stop_program -import dlens_vx_v4.halco as halco -import dlens_vx_v4.sta as sta +from dlens_vx_v4 import halco, sta from pylola_vx_v4 import PPUElfFile -from helpers.hwtest_common import TEST_BINARY_PATH + +_THIS_DIR = os.path.dirname(os.path.realpath(__file__)) +TEST_BINARY_PATH = os.environ.get("TEST_BINARY_PATH", + join(_THIS_DIR, + os.pardir, + os.pardir, + os.pardir, + "build", + "libnux", + "test", + "with_hostcode") + ) class LibnuxBarrierTest(unittest.TestCase): diff --git a/tests/hw/libnux/with_hostcode/wscript b/tests/hw/libnux/with_hostcode/wscript index 772f025357c2773d04d0fb7c486cb935bc4725a3..a5c82d5393611945ae2bb8750eb3b56b04fde9c3 100644 --- a/tests/hw/libnux/with_hostcode/wscript +++ b/tests/hw/libnux/with_hostcode/wscript @@ -141,9 +141,10 @@ def build_host_python(bld, chip_version: Integral): name=f"libnux_barriertest_vx_v{chip_version}", tests=f"test_barrier_vx_v{chip_version}.py", features='use pytest pylint pycodestyle', - use='dlens_vx', + use=f'dlens_vx_v{chip_version}', install_path='${PREFIX}/bin/tests', - skip_run=not bld.env.cube_partition, + skip_run=not (bld.env.TEST_TARGET == TestTarget.HARDWARE and + int(bld.env.CURRENT_SETUP["chip_revision"]) == chip_version), env = bld.all_envs[''], test_environ = dict(TEST_BINARY_PATH=os.path.join(bld.env.PREFIX, 'build', 'libnux', 'tests', 'hw', 'libnux', 'with_hostcode')), pylint_config=join(get_toplevel_path(), "code-format", "pylintrc"),