chiark / gitweb /
tests/build-common: Copy subdirmk, rather than symlinking
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Dec 2019 13:02:34 +0000 (13:02 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Dec 2019 16:04:44 +0000 (16:04 +0000)
This is more like it will be in someone's project.  Also it prevents
us from accidentally touching anything in the source tree.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/build-common

index 84f95977cbb920bcbf86c7dcfd478cc60c2546ca..db751cd70b3fb7e6e240aeae674e87e20933fd81 100644 (file)
@@ -5,9 +5,14 @@ export SUBDIRMK_REGEN_NDEBUG
 make_copy () {
        rm -rf tests/$1/example
        mkdir tests/$1/example
+
        git ls-files -z example \
        | xargs -0 \
        sh -xec 'rsync -R -l "$@" tests/'$1'/' x
+
        rm tests/$1/example/subdirmk
-       ln -sf ../../.. tests/$1/example/subdirmk
+
+       git ls-files -z :. :!example \
+       | xargs -0 \
+       sh -xec 'rsync -R -l "$@" tests/'$1'/example/subdirmk' x
 }