From: Daan De Meyer Date: Wed, 9 Apr 2025 18:47:30 +0000 (+0200) Subject: test: Make sure symlinks in integration-tests are properly installed X-Git-Tag: v258-rc1~855^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75a5ff01d3df801091296649a66bb1eb33b5de6e;p=thirdparty%2Fsystemd.git test: Make sure symlinks in integration-tests are properly installed meson follows symlinks by default, so make sure we use follow_symlinks=False if meson is new enough and rsync otherwise like we already do for other testdata subdirectories. --- diff --git a/test/meson.build b/test/meson.build index 62d28124421..423fec7d898 100644 --- a/test/meson.build +++ b/test/meson.build @@ -282,8 +282,22 @@ if want_tests != 'false' endif if install_tests - install_subdir('integration-tests', - install_dir : testsdir) + if meson.version().version_compare('<1.3.0') + if not rsync.found() + error('rsync is required to install the integration test data') + endif + + rsync_r = rsync.full_path() + ' -rlpt --exclude .gitattributes -- "@0@" "${DESTDIR:-}@1@"' + endif + + if meson.version().version_compare('>=1.3.0') + install_subdir('integration-tests', + install_dir : testsdir, + follow_symlinks : false) + else + meson.add_install_script(sh, '-c', + rsync_r.format(meson.current_source_dir() / 'integration-tests', testdata_dir)) + endif foreach integration_test : integration_tests integration_test_unit_env = [] @@ -350,11 +364,6 @@ if install_tests install_dir : testdata_dir, follow_symlinks : false) else - if not rsync.found() - error('rsync is required to install the integration test data') - endif - - 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)) endif