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.
This commit is contained in:
Thomas Haller
2019-05-17 16:38:01 +02:00
parent e966f942cc
commit 16cd84d346
2 changed files with 3 additions and 7 deletions

View File

@@ -9,7 +9,6 @@ foreach test_unit: test_units
test_unit + '.c',
dependencies: test_nm_dep,
)
test(
'devices/' + test_unit,
test_script,

View File

@@ -13,11 +13,10 @@ test_units = [
foreach test_unit: test_units
exe = executable(
'platform-' + test_unit[0],
test_unit[0],
test_unit[1],
dependencies: test_unit[2],
)
test(
'platform/' + test_unit[0],
test_script,
@@ -26,10 +25,8 @@ foreach test_unit: test_units
)
endforeach
test = 'monitor'
executable(
test,
test + '.c',
'monitor',
'monitor.c',
dependencies: test_nm_dep,
)