summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-05-02 10:57:55 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-05-03 12:51:24 +0000
commit5b7f918f66df140ff38a9955f841c8aeeab6089d (patch)
tree1deff981f67277913c7ecf440de931e908b5e12b /tests
parentdc7f4153ae6f74fe747117154e02a2198be6e8c2 (diff)
downloadmorph-5b7f918f66df140ff38a9955f841c8aeeab6089d.tar.gz
Use dedicated <cachedir>/artficats directory for local artifact cache.
Make sure that this directory is actually created before trying to save artifacts to it. Also adjust all tests to use this new directory for looking up artifacts.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/build-chunk.script2
-rwxr-xr-xtests/build-stratum-with-submodules.script3
-rwxr-xr-xtests/build-stratum.script3
-rwxr-xr-xtests/build-system-autotools.script2
-rwxr-xr-xtests/build-system-cpan.script2
-rwxr-xr-xtests/build-system-python-distutils.script2
-rwxr-xr-xtests/morphless-chunks.script2
-rwxr-xr-xtests/name-clash.script2
-rwxr-xr-xtests/rebuild-cached-stratum.script2
9 files changed, 11 insertions, 9 deletions
diff --git a/tests/build-chunk.script b/tests/build-chunk.script
index ba8b227f..1ec23479 100755
--- a/tests/build-chunk.script
+++ b/tests/build-chunk.script
@@ -21,7 +21,7 @@ set -eu
"$SRCDIR/scripts/test-morph" build chunk-repo farrokh hello.morph
-for chunk in "$DATADIR/cache/"*.chunk.*
+for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
echo "$chunk:" | sed 's/[^.]*//'
tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
diff --git a/tests/build-stratum-with-submodules.script b/tests/build-stratum-with-submodules.script
index a152e5e1..80ebf1d0 100755
--- a/tests/build-stratum-with-submodules.script
+++ b/tests/build-stratum-with-submodules.script
@@ -65,4 +65,5 @@ EOF
# No build and verify we got a stratum.
"$SRCDIR/scripts/test-morph" build morphs-repo master submod-stratum.morph
-tar -tf "$DATADIR/cache/"*.stratum.* | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
+tar -tf "$DATADIR/cache/artifacts/"*.stratum.* | LC_ALL=C sort \
+ | sed '/^\.\/./s:^\./::'
diff --git a/tests/build-stratum.script b/tests/build-stratum.script
index fbc61629..8460c1e1 100755
--- a/tests/build-stratum.script
+++ b/tests/build-stratum.script
@@ -20,4 +20,5 @@
set -eu
"$SRCDIR/scripts/test-morph" build morphs-repo master hello-stratum.morph
-tar -tf "$DATADIR/cache/"*.stratum.* | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
+tar -tf "$DATADIR/cache/artifacts/"*.stratum.* | LC_ALL=C sort \
+ | sed '/^\.\/./s:^\./::'
diff --git a/tests/build-system-autotools.script b/tests/build-system-autotools.script
index edee7adb..8d33ac0e 100755
--- a/tests/build-system-autotools.script
+++ b/tests/build-system-autotools.script
@@ -49,7 +49,7 @@ git commit --quiet -m "Convert hello to an autotools project"
"$SRCDIR/scripts/test-morph" build chunk-repo farrokh hello.morph
-for chunk in "$DATADIR/cache/"*.chunk.*
+for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
echo "$chunk:" | sed 's/[^.]*//'
tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
diff --git a/tests/build-system-cpan.script b/tests/build-system-cpan.script
index 49582a96..ba1cf73e 100755
--- a/tests/build-system-cpan.script
+++ b/tests/build-system-cpan.script
@@ -55,7 +55,7 @@ git commit --quiet -m 'convert hello into a perl cpan project'
"$SRCDIR/scripts/test-morph" build --prefix=/ chunk-repo farrokh hello.morph
-for chunk in "$DATADIR/cache/"*.chunk.*
+for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
echo "$chunk:" | sed 's/[^.]*//'
tar -tf "$chunk" | LC_ALL=C sort |
diff --git a/tests/build-system-python-distutils.script b/tests/build-system-python-distutils.script
index 1c79a6c1..cfe5d7d2 100755
--- a/tests/build-system-python-distutils.script
+++ b/tests/build-system-python-distutils.script
@@ -53,7 +53,7 @@ git commit --quiet -m 'convert hello into a python project'
"$SRCDIR/scripts/test-morph" build --prefix= chunk-repo farrokh hello.morph
-for chunk in "$DATADIR/cache/"*.chunk.*
+for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
echo "$chunk:" | sed 's/[^.]*//'
tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
diff --git a/tests/morphless-chunks.script b/tests/morphless-chunks.script
index 7dc7b7d5..50dddb89 100755
--- a/tests/morphless-chunks.script
+++ b/tests/morphless-chunks.script
@@ -58,7 +58,7 @@ git commit --quiet -m initial
"$SRCDIR/scripts/test-morph" build stratum master alfred.morph
-for chunk in "$DATADIR/cache/"*.chunk.*
+for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
echo "$chunk:" | sed 's/[^.]*//'
tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
diff --git a/tests/name-clash.script b/tests/name-clash.script
index d4be1233..316a9ddc 100755
--- a/tests/name-clash.script
+++ b/tests/name-clash.script
@@ -56,5 +56,5 @@ EOF
# unpack it and check the contents
INSTDIR="$DATADIR"/unpack
mkdir -p "$INSTDIR"
-tar -C "$INSTDIR" -xhf "$DATADIR/cache/"*hello-stratum*
+tar -C "$INSTDIR" -xhf "$DATADIR/cache/artifacts/"*hello-stratum*
test "$("$INSTDIR"/bin/hello)" = "hello, world"
diff --git a/tests/rebuild-cached-stratum.script b/tests/rebuild-cached-stratum.script
index 31b3f587..efe821ee 100755
--- a/tests/rebuild-cached-stratum.script
+++ b/tests/rebuild-cached-stratum.script
@@ -22,7 +22,7 @@
set -eu
-cache="$DATADIR/cache"
+cache="$DATADIR/cache/artifacts"
# Make a branch in the chunk repo where we can make our own modifications.
(cd "$DATADIR/chunk-repo" &&