NetworkManager/src/platform/tests/meson.build
Thomas Haller 0f1900b4f7 build/meson: rename platform tests to use same name as autotools
First of all, all file names in our source-tree should be unique. We should
not have stuff like "libnm-core/tests/test-general.c" and "src/tests/test-general.c".
The problem here are the C source files, and consequently also the test
binaries have duplicate names. We should avoid that in general. However,
our binaries should have a matching name with the C source. If
"test-general.c" is not good enough, that needs renaming. Not building
"platform-test-general" out of it.

On the other hand, all our tests should have a filename "*/tests/test-*", like
they do for autotools.

Rename the meson platform tests.

It's also important because "tools/run-nm-test.sh" relies on the test
name to workaround valgrind warnings.

(cherry picked from commit 16cd84d346)
2019-10-08 15:26:49 +02:00

32 lines
1.2 KiB
Meson

test_units = [
['test-link-fake', 'test-link.c', test_nm_dep_fake, default_test_timeout],
['test-link-linux', 'test-link.c', test_nm_dep_linux, 900],
['test-address-fake', 'test-address.c', test_nm_dep_fake, default_test_timeout],
['test-address-linux', 'test-address.c', test_nm_dep_linux, default_test_timeout],
['test-general', 'test-general.c', test_nm_dep, default_test_timeout],
['test-nmp-object', 'test-nmp-object.c', test_nm_dep, default_test_timeout],
['test-route-fake', 'test-route.c', test_nm_dep_fake, default_test_timeout],
['test-route-linux', 'test-route.c', test_nm_dep_linux, default_test_timeout],
['test-cleanup-fake', 'test-cleanup.c', test_nm_dep_fake, default_test_timeout],
['test-cleanup-linux', 'test-cleanup.c', test_nm_dep_linux, default_test_timeout],
]
foreach test_unit: test_units
exe = executable(
test_unit[0],
test_unit[1],
dependencies: test_unit[2],
)
test(
'platform/' + test_unit[0],
test_script,
timeout: test_unit[3],
args: test_args + [exe.full_path()],
)
endforeach
executable(
'monitor',
'monitor.c',
dependencies: test_nm_dep,
)