mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 00:10:11 +01:00
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)
32 lines
1.2 KiB
Meson
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,
|
|
)
|