summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-11 18:05:56 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-12 14:13:42 +0100
commit4e37fdf5adbf4d25561b472b4089b6782c599f93 (patch)
tree82182fee7bd6f56a91b392c12dfb5cede7b4455b /tests
parent6b63ab3036e869c92b3c5d6471e4856df3583019 (diff)
downloadmorph-4e37fdf5adbf4d25561b472b4089b6782c599f93.tar.gz
Don't require .morph in triplet arguments
This gives us consistency with morphologies, where the triplets are repo|ref|morphology, not repo|ref|filename Anyone who runs 'morph build baserock:morphs master system.morph' will now see an error ending with 'was looking for system.morph.morph', which should make it clear where they have gone wrong.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/build-chunk-failures-dump-log.script2
-rwxr-xr-xtests/build-chunk-writes-log.script3
-rwxr-xr-xtests/build-chunk.script3
-rwxr-xr-xtests/build-stratum-with-submodules.script2
-rwxr-xr-xtests/build-stratum.script2
-rwxr-xr-xtests/build-system-autotools-fails-if-autogen-fails.script2
-rwxr-xr-xtests/build-system-autotools.script3
-rwxr-xr-xtests/build-system-cpan.script2
-rwxr-xr-xtests/build-system-python-distutils.script2
-rwxr-xr-xtests/missing-ref.script4
-rwxr-xr-xtests/morphless-chunks.script3
-rwxr-xr-xtests/name-clash.script4
-rwxr-xr-xtests/rebuild-cached-stratum.script4
-rwxr-xr-xtests/show-dependencies.script2
-rwxr-xr-xtests/stratum-overlap-warns.script2
-rwxr-xr-xtests/stratum-overlap-writes-overlap.script2
-rwxr-xr-xtests/update-gits-chunk.script2
-rwxr-xr-xtests/update-gits-stratum.script3
-rwxr-xr-xtests/update-gits-submodules.script3
-rwxr-xr-xtests/uses-tempdir.script2
20 files changed, 23 insertions, 29 deletions
diff --git a/tests/build-chunk-failures-dump-log.script b/tests/build-chunk-failures-dump-log.script
index 6f15c640..05a3bd8a 100755
--- a/tests/build-chunk-failures-dump-log.script
+++ b/tests/build-chunk-failures-dump-log.script
@@ -37,5 +37,5 @@ git add false.morph
git commit --quiet -m "Make a morphology that fails."
"$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo master false.morph \
+ test:chunk-repo master false \
2>/dev/null
diff --git a/tests/build-chunk-writes-log.script b/tests/build-chunk-writes-log.script
index 48557703..e34914df 100755
--- a/tests/build-chunk-writes-log.script
+++ b/tests/build-chunk-writes-log.script
@@ -19,8 +19,7 @@
set -eu
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" build-morphology test:chunk-repo farrokh hello
SOURCES="$DATADIR/cached-sources"
find "$DATADIR/cache/artifacts" -name '*.chunk.*' |
diff --git a/tests/build-chunk.script b/tests/build-chunk.script
index c73502c2..e69515b3 100755
--- a/tests/build-chunk.script
+++ b/tests/build-chunk.script
@@ -19,8 +19,7 @@
set -eu
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" build-morphology test:chunk-repo farrokh hello
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/build-stratum-with-submodules.script b/tests/build-stratum-with-submodules.script
index 06afd9f3..2a99b12d 100755
--- a/tests/build-stratum-with-submodules.script
+++ b/tests/build-stratum-with-submodules.script
@@ -66,7 +66,7 @@ EOF
# No build and verify we got a stratum.
"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo master submod-stratum.morph
+ test:morphs-repo master submod-stratum
"$SRCDIR/scripts/assemble-stratum" --cachedir "$DATADIR/cache" \
"$DATADIR/cache/artifacts/"*submod-stratum \
"$DATADIR/stratum.tar" submod-stratum
diff --git a/tests/build-stratum.script b/tests/build-stratum.script
index 046b66f0..d4909e9a 100755
--- a/tests/build-stratum.script
+++ b/tests/build-stratum.script
@@ -20,7 +20,7 @@
set -eu
"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo master hello-stratum.morph
+ test:morphs-repo master hello-stratum
"$SRCDIR/scripts/assemble-stratum" --cachedir "$DATADIR/cache" \
"$DATADIR/cache/artifacts/"*.hello-stratum \
"$DATADIR/stratum.tar" hello-stratum
diff --git a/tests/build-system-autotools-fails-if-autogen-fails.script b/tests/build-system-autotools-fails-if-autogen-fails.script
index 06edcd29..fb80fc72 100755
--- a/tests/build-system-autotools-fails-if-autogen-fails.script
+++ b/tests/build-system-autotools-fails-if-autogen-fails.script
@@ -34,6 +34,6 @@ chmod a+x "$x/autogen.sh"
"$SRCDIR/scripts/run-git-in" "$x" commit --quiet -m initial
"$SRCDIR/scripts/test-morph" build-morphology \
- test:autogen-chunk master detected.morph \
+ test:autogen-chunk master detected \
>/dev/null 2> /dev/null
diff --git a/tests/build-system-autotools.script b/tests/build-system-autotools.script
index 992f34e0..f23eb04e 100755
--- a/tests/build-system-autotools.script
+++ b/tests/build-system-autotools.script
@@ -47,8 +47,7 @@ EOF
git add hello.morph
git commit --quiet -m "Convert hello to an autotools project"
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" build-morphology test:chunk-repo farrokh hello
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/build-system-cpan.script b/tests/build-system-cpan.script
index 94191395..aec91873 100755
--- a/tests/build-system-cpan.script
+++ b/tests/build-system-cpan.script
@@ -54,7 +54,7 @@ git add hello.morph
git commit --quiet -m 'convert hello into a perl cpan project'
"$SRCDIR/scripts/test-morph" build-morphology --prefix=/ \
- test:chunk-repo farrokh hello.morph
+ test:chunk-repo farrokh hello
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/build-system-python-distutils.script b/tests/build-system-python-distutils.script
index 470b175f..d7be93bd 100755
--- a/tests/build-system-python-distutils.script
+++ b/tests/build-system-python-distutils.script
@@ -52,7 +52,7 @@ git add hello.morph
git commit --quiet -m 'convert hello into a python project'
"$SRCDIR/scripts/test-morph" build-morphology --prefix= \
- test:chunk-repo farrokh hello.morph
+ test:chunk-repo farrokh hello
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/missing-ref.script b/tests/missing-ref.script
index 0ee075d7..2da9fa05 100755
--- a/tests/missing-ref.script
+++ b/tests/missing-ref.script
@@ -17,6 +17,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-"$SRCDIR/scripts/test-morph" build-morphology\
- test:chunk-repo non-existent-branch hello.morph
+"$SRCDIR/scripts/test-morph" build-morphology \
+ test:chunk-repo non-existent-branch hello
diff --git a/tests/morphless-chunks.script b/tests/morphless-chunks.script
index 45f88cd8..315f42ea 100755
--- a/tests/morphless-chunks.script
+++ b/tests/morphless-chunks.script
@@ -60,8 +60,7 @@ git init --quiet
git add alfred.morph
git commit --quiet -m initial
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:stratum master alfred.morph
+"$SRCDIR/scripts/test-morph" build-morphology test:stratum master alfred
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/name-clash.script b/tests/name-clash.script
index 974d15b0..9a3e942b 100755
--- a/tests/name-clash.script
+++ b/tests/name-clash.script
@@ -49,11 +49,11 @@ EOF
# build the dodgy chunk
"$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo farrokh goodbye.morph
+ test:chunk-repo farrokh goodbye
# build a stratum
"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo master hello-stratum.morph
+ test:morphs-repo master hello-stratum
# unpack it and check the contents
INSTDIR="$DATADIR"/unpack
diff --git a/tests/rebuild-cached-stratum.script b/tests/rebuild-cached-stratum.script
index dee08dfb..2615fb30 100755
--- a/tests/rebuild-cached-stratum.script
+++ b/tests/rebuild-cached-stratum.script
@@ -38,7 +38,7 @@ cache="$DATADIR/cache/artifacts"
# Build the first time.
"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo rebuild-cached-stratum hello-stratum.morph
+ test:morphs-repo rebuild-cached-stratum hello-stratum
echo "first build:"
(cd "$cache" && ls *.chunk.* *hello-stratum | sed 's/^[^.]*\./ /' |
LC_ALL=C sort)
@@ -50,7 +50,7 @@ echo "first build:"
# Rebuild.
"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo rebuild-cached-stratum hello-stratum.morph
+ test:morphs-repo rebuild-cached-stratum hello-stratum
echo "second build:"
(cd "$cache" && ls *.chunk.* *hello-stratum | sed 's/^[^.]*\./ /' |
LC_ALL=C sort)
diff --git a/tests/show-dependencies.script b/tests/show-dependencies.script
index d7495f35..aad036e9 100755
--- a/tests/show-dependencies.script
+++ b/tests/show-dependencies.script
@@ -20,5 +20,5 @@
set -eu
"$SRCDIR/scripts/test-morph" \
- show-dependencies test:test-repo master xfce-core.morph |
+ show-dependencies test:test-repo master xfce-core |
sed 's/test://'
diff --git a/tests/stratum-overlap-warns.script b/tests/stratum-overlap-warns.script
index 08551333..8cf1606c 100755
--- a/tests/stratum-overlap-warns.script
+++ b/tests/stratum-overlap-warns.script
@@ -29,7 +29,7 @@ warning_mentions(){
}
"$SRCDIR/scripts/test-morph" build-morphology --log=$log \
- test:morphs-repo overlap overlap-stratum.morph > /dev/null
+ test:morphs-repo overlap overlap-stratum > /dev/null
grep WARNING "$log" >"$warnings"
for str in overlap-stratum \
overlap-foo-baz overlap-foobar bin/bar \
diff --git a/tests/stratum-overlap-writes-overlap.script b/tests/stratum-overlap-writes-overlap.script
index 6ea0ceac..d06b4677 100755
--- a/tests/stratum-overlap-writes-overlap.script
+++ b/tests/stratum-overlap-writes-overlap.script
@@ -24,7 +24,7 @@ cache="$DATADIR/cache/artifacts"
"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo overlap overlap-stratum.morph > /dev/null
+ test:morphs-repo overlap overlap-stratum > /dev/null
"$SRCDIR/scripts/list-overlaps" groups \
"$cache"/*.stratum.overlap-stratum.overlaps |
while IFS='\n' read overlaps; do
diff --git a/tests/update-gits-chunk.script b/tests/update-gits-chunk.script
index 8e42acd9..b07aef17 100755
--- a/tests/update-gits-chunk.script
+++ b/tests/update-gits-chunk.script
@@ -26,7 +26,7 @@ git checkout --quiet farrokh
git commit --quiet --allow-empty --allow-empty-message -m ""
NEWREF="$(git show-ref --hash farrokh)"
-"$SRCDIR/scripts/test-morph" update-gits test:chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" update-gits test:chunk-repo farrokh hello
# check the top commit of the cached repo's farrokh branch
cd "$DATADIR/cache/gits/"*chunk?repo*
diff --git a/tests/update-gits-stratum.script b/tests/update-gits-stratum.script
index 13ce249c..24b6f199 100755
--- a/tests/update-gits-stratum.script
+++ b/tests/update-gits-stratum.script
@@ -26,8 +26,7 @@ git checkout --quiet farrokh
git commit --quiet --allow-empty --allow-empty-message -m ""
NEWREF="$(git show-ref --hash farrokh)"
-"$SRCDIR/scripts/test-morph" update-gits \
- test:morphs-repo master hello-stratum.morph
+"$SRCDIR/scripts/test-morph" update-gits test:morphs-repo master hello-stratum
# check the top commit of the cached repo's farrokh branch
cd "$DATADIR/cache/gits/"*chunk?repo*
diff --git a/tests/update-gits-submodules.script b/tests/update-gits-submodules.script
index 01be003e..49f4de62 100755
--- a/tests/update-gits-submodules.script
+++ b/tests/update-gits-submodules.script
@@ -33,8 +33,7 @@ chunkrepo="$DATADIR/chunk-repo"
> /dev/null
"$SRCDIR/scripts/run-git-in" "$chunkrepo" commit --quiet -m "add submodule"
-"$SRCDIR/scripts/test-morph" update-gits \
- test:morphs-repo master hello-stratum.morph
+"$SRCDIR/scripts/test-morph" update-gits test:morphs-repo master hello-stratum
test -d "$DATADIR/cache/gits/"*chunk?repo* && echo chunk-repo cached
test -d "$DATADIR/cache/gits/"*morphs?repo* && echo morphs-repo cached
diff --git a/tests/uses-tempdir.script b/tests/uses-tempdir.script
index b4cc2688..328413dd 100755
--- a/tests/uses-tempdir.script
+++ b/tests/uses-tempdir.script
@@ -24,4 +24,4 @@ TMPDIR="$DATADIR"/unwritable-tmp
install -m 000 -d "$TMPDIR"
mkdir "$DATADIR"/tmp
"$SRCDIR/scripts/test-morph" build-morphology --tempdir "$DATADIR"/tmp \
- test:morphs-repo master hello-stratum.morph
+ test:morphs-repo master hello-stratum