]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Work around bug in meson when installing directory symlinks
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Apr 2025 10:12:12 +0000 (12:12 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Apr 2025 10:13:31 +0000 (12:13 +0200)
Installing symlinks pointing to directories with install_subdir() is
broken (see https://github.com/mesonbuild/meson/pull/14471). Let's work
around the issue for now by manually installing the standalone directory
until the issue is fixed upstream and available in meson in all supported
distributions.

test/meson.build

index e3f78b300464756cc2e2a863200ab70b135f2f2c..9149ca1e1e805f1ba96a98c1aff2dc73982d35dd 100644 (file)
@@ -291,9 +291,20 @@ if install_tests
         endif
 
         if meson.version().version_compare('>=1.3.0')
+                # Installing symlinks to directories is broken in install_subdir() so we exclude the
+                # standalone directory from install_subdir() and handle it manually.
+                # TODO: Remove when https://github.com/mesonbuild/meson/pull/14471 is available in all
+                # supported distributions.
                 install_subdir('integration-tests',
                                install_dir : testsdir,
+                               exclude_directories : ['standalone'],
                                follow_symlinks : false)
+                install_emptydir(testsdir / 'integration-tests/standalone')
+                install_data('integration-tests/standalone/meson.build',
+                             install_dir : testsdir / 'integration-tests/standalone')
+                install_symlink('integration-tests',
+                                pointing_to : '..',
+                                install_dir : testsdir / 'integration-tests/standalone')
         else
                 meson.add_install_script(sh, '-c',
                                          rsync_r.format(meson.current_source_dir() / 'integration-tests', testsdir))