summaryrefslogtreecommitdiff
path: root/tests/stratum-overlap-stomps-file-links.script
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-05-15 11:09:12 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-05-15 11:09:12 +0000
commit21da7c08dc4c513ff327328d8e81e235616ad996 (patch)
treedb2558daa7fed3484dcc051049b30a345302937b /tests/stratum-overlap-stomps-file-links.script
parent6d5f0cfc8307dfa8fd72fbb425a383f0a84f850e (diff)
downloadmorph-21da7c08dc4c513ff327328d8e81e235616ad996.tar.gz
tests: stratum overlap tests files instead
Rather than parse the output of tar -tvf, extract the tarballs and test the files. This should hopefully be more stable than the output of tar
Diffstat (limited to 'tests/stratum-overlap-stomps-file-links.script')
-rwxr-xr-xtests/stratum-overlap-stomps-file-links.script8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/stratum-overlap-stomps-file-links.script b/tests/stratum-overlap-stomps-file-links.script
index 0c76d69c..0d429bbf 100755
--- a/tests/stratum-overlap-stomps-file-links.script
+++ b/tests/stratum-overlap-stomps-file-links.script
@@ -21,8 +21,12 @@
set -eu
cache="$DATADIR/cache/artifacts"
+extracted="$DATADIR/extracted"
+mkdir -p "$extracted"
"$SRCDIR/scripts/test-morph" \
build test:morphs-repo overlap overlap-stratum.morph
-(cd "$cache" && for f in *.stratum.overlap-stratum; do tar -tvf "$f"; done |
- sed 's/^\(\S*\)[^.]*\./\1 /' | LC_ALL=C sort) | grep -F '/bin/foo'
+for f in "$cache"/*.stratum.overlap-stratum; do
+ tar -xf "$f" -C "$extracted"
+done
+test -f "$extracted/bin/foo"