test-network: replace symlink to 99-default.link with a copy

Then, we can drop ugly workaround in meson.build.
The .link file is not necessarily synced with 99-default.link.
Also, 99-default.link is not updated so frequently.
Let's manually sync it when necessary.
This commit is contained in:
Yu Watanabe
2025-03-05 08:07:07 +09:00
parent a030f8cc94
commit 5506aff98d
2 changed files with 13 additions and 8 deletions

View File

@@ -479,22 +479,17 @@ if install_tests
error('rsync is required to install the integration test data')
endif
rsync_r = rsync.full_path() + ' -rlpt --exclude .gitattributes --exclude 25-default.link -- "@0@" "${DESTDIR:-}@1@"'
rsync_r = rsync.full_path() + ' -rlpt --exclude .gitattributes -- "@0@" "${DESTDIR:-}@1@"'
meson.add_install_script(sh, '-c',
rsync_r.format(meson.current_source_dir() / subdir, testdata_dir))
else
install_subdir(subdir,
exclude_files : ['.gitattributes', '25-default.link'],
exclude_files : ['.gitattributes'],
install_dir : testdata_dir,
follow_symlinks : false)
endif
endforeach
# test-network/conf/25-default.link is a local symlink that becomes dangling when installed, so we
# exclude it and create the correct symlink here.
meson.add_install_script(sh, '-c', ln_s.format(networkdir / '99-default.link',
testdata_dir / 'test-network/conf/25-default.link'))
install_data(kbd_model_map,
install_dir : testdata_dir + '/test-keymap-util')

View File

@@ -1 +0,0 @@
../../../network/99-default.link

View File

@@ -0,0 +1,11 @@
# SPDX-License-Identifier: MIT-0
#
# This is a copy of 99-default.link.
[Match]
OriginalName=*
[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path mac
MACAddressPolicy=persistent