twister: tests: Add unit tests for names of external and module tests
Add test cases verifing that test id for external and module tests is not --testsuite-root dependant. Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This commit is contained in:
parent
21eb27c5c0
commit
45e1ff94cd
|
@ -104,6 +104,30 @@ TESTDATA_3 = [
|
|||
'test_a.check_1.check_2',
|
||||
'zephyr/test_a.check_1.check_2'
|
||||
),
|
||||
(
|
||||
os.path.join(ZEPHYR_BASE, '..', 'module_A', 'samples', 'hello_world'),
|
||||
os.path.join(ZEPHYR_BASE, '..', 'module_A', 'samples', 'hello_world'),
|
||||
'test_c.check_1',
|
||||
'module_A/samples/hello_world/test_c.check_1'
|
||||
),
|
||||
(
|
||||
os.path.join(ZEPHYR_BASE, '..', 'module_A'),
|
||||
os.path.join(ZEPHYR_BASE, '..', 'module_A', 'samples', 'hello_world'),
|
||||
'test_c.check_2',
|
||||
'module_A/samples/hello_world/test_c.check_2'
|
||||
),
|
||||
(
|
||||
os.path.join(ZEPHYR_BASE, '..', '..', 'my_own_zephyr', 'samples', 'hello_world'),
|
||||
os.path.join(ZEPHYR_BASE, '..', '..', 'my_own_zephyr', 'samples', 'hello_world'),
|
||||
'test_c.check_1',
|
||||
'external/my_own_zephyr/samples/hello_world/test_c.check_1'
|
||||
),
|
||||
(
|
||||
os.path.join(ZEPHYR_BASE, '..', '..', 'my_own_zephyr'),
|
||||
os.path.join(ZEPHYR_BASE, '..', '..', 'my_own_zephyr', 'samples', 'hello_world'),
|
||||
'test_c.check_2',
|
||||
'external/my_own_zephyr/samples/hello_world/test_c.check_2'
|
||||
),
|
||||
]
|
||||
@pytest.mark.parametrize("testsuite_root, suite_path, name, expected", TESTDATA_3)
|
||||
def test_get_unique(testsuite_root, suite_path, name, expected):
|
||||
|
|
Loading…
Reference in a new issue