From 5506aff98df4d5dbd039196fe20352c4dd518f59 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 5 Mar 2025 08:07:07 +0900 Subject: [PATCH] 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. --- test/meson.build | 9 ++------- test/test-network/conf/25-default.link | 12 +++++++++++- 2 files changed, 13 insertions(+), 8 deletions(-) mode change 120000 => 100644 test/test-network/conf/25-default.link diff --git a/test/meson.build b/test/meson.build index 59e9cd36fd0..18b747ffbf3 100644 --- a/test/meson.build +++ b/test/meson.build @@ -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') diff --git a/test/test-network/conf/25-default.link b/test/test-network/conf/25-default.link deleted file mode 120000 index dee89415e58..00000000000 --- a/test/test-network/conf/25-default.link +++ /dev/null @@ -1 +0,0 @@ -../../../network/99-default.link \ No newline at end of file diff --git a/test/test-network/conf/25-default.link b/test/test-network/conf/25-default.link new file mode 100644 index 00000000000..9b95e12fda5 --- /dev/null +++ b/test/test-network/conf/25-default.link @@ -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 -- 2.47.3