chiark
/
gitweb
/
~ian
/
subdirmk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests/intree: Make copy and break out from tests/example
[subdirmk.git]
/
tests
/
build-common
diff --git
a/tests/build-common
b/tests/build-common
index 01ed83929ff275ebf4834a45c5bdfa4d44ed2d6c..84f95977cbb920bcbf86c7dcfd478cc60c2546ca 100644
(file)
--- a/
tests/build-common
+++ b/
tests/build-common
@@
-2,3
+2,12
@@
SUBDIRMK_REGEN_NDEBUG=''
export SUBDIRMK_REGEN_NDEBUG
SUBDIRMK_REGEN_NDEBUG=''
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
+}