summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-05-03 15:55:50 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-05-04 14:26:47 +0100
commit35b769f2c0486c77a0116a6073eadf7de59e2eb9 (patch)
tree5c25ecbe69d29d7ff50dd610723d67fd744ed030 /tests
parent18a33c9a44978a70e272d8ce36b0a3bad3daf639 (diff)
downloadmorph-35b769f2c0486c77a0116a6073eadf7de59e2eb9.tar.gz
Add explicit repo prefixes to test scripts
Diffstat (limited to 'tests')
-rwxr-xr-xtests/build-chunk.script2
-rwxr-xr-xtests/build-stratum-with-submodules.script5
-rwxr-xr-xtests/build-stratum.script3
-rwxr-xr-xtests/build-system-autotools.script2
-rwxr-xr-xtests/build-system-cpan.script3
-rwxr-xr-xtests/build-system-python-distutils.script3
-rwxr-xr-xtests/missing-ref.script3
-rwxr-xr-xtests/morphless-chunks.script3
-rwxr-xr-xtests/name-clash.script4
-rwxr-xr-xtests/rebuild-cached-stratum.script4
-rwxr-xr-xtests/show-dependencies.script9
-rwxr-xr-xtests/show-dependencies.setup46
-rwxr-xr-xtests/update-gits-chunk.script2
-rwxr-xr-xtests/update-gits-stratum.script3
-rwxr-xr-xtests/update-gits-submodules.script3
15 files changed, 51 insertions, 44 deletions
diff --git a/tests/build-chunk.script b/tests/build-chunk.script
index 1ec23479..3219194d 100755
--- a/tests/build-chunk.script
+++ b/tests/build-chunk.script
@@ -19,7 +19,7 @@
set -eu
-"$SRCDIR/scripts/test-morph" build chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" build test:chunk-repo farrokh hello.morph
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 80ebf1d0..9f226068 100755
--- a/tests/build-stratum-with-submodules.script
+++ b/tests/build-stratum-with-submodules.script
@@ -52,7 +52,7 @@ cat <<EOF > "$morphs/submod-stratum.morph"
"sources": [
{
"name": "parent",
- "repo": "parent-repo",
+ "repo": "test:parent-repo",
"ref": "master"
}
]
@@ -64,6 +64,7 @@ EOF
# No build and verify we got a stratum.
-"$SRCDIR/scripts/test-morph" build morphs-repo master submod-stratum.morph
+"$SRCDIR/scripts/test-morph" build test:morphs-repo master submod-stratum.morph
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 8460c1e1..994c4077 100755
--- a/tests/build-stratum.script
+++ b/tests/build-stratum.script
@@ -19,6 +19,7 @@
set -eu
-"$SRCDIR/scripts/test-morph" build morphs-repo master hello-stratum.morph
+"$SRCDIR/scripts/test-morph" build test:morphs-repo master hello-stratum.morph
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 8d33ac0e..8c29b340 100755
--- a/tests/build-system-autotools.script
+++ b/tests/build-system-autotools.script
@@ -47,7 +47,7 @@ EOF
git add hello.morph
git commit --quiet -m "Convert hello to an autotools project"
-"$SRCDIR/scripts/test-morph" build chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" build test:chunk-repo farrokh hello.morph
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/build-system-cpan.script b/tests/build-system-cpan.script
index ba1cf73e..7fbe6540 100755
--- a/tests/build-system-cpan.script
+++ b/tests/build-system-cpan.script
@@ -53,7 +53,8 @@ git add hello.morph
git commit --quiet -m 'convert hello into a perl cpan project'
-"$SRCDIR/scripts/test-morph" build --prefix=/ chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" build --prefix=/ \
+ test:chunk-repo farrokh hello.morph
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 cfe5d7d2..bdf99623 100755
--- a/tests/build-system-python-distutils.script
+++ b/tests/build-system-python-distutils.script
@@ -51,7 +51,8 @@ git add hello.morph
git commit --quiet -m 'convert hello into a python project'
-"$SRCDIR/scripts/test-morph" build --prefix= chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" build --prefix= \
+ test:chunk-repo farrokh hello.morph
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/missing-ref.script b/tests/missing-ref.script
index 445308da..51ffd459 100755
--- a/tests/missing-ref.script
+++ b/tests/missing-ref.script
@@ -17,5 +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 chunk-repo non-existent-branch hello.morph
+"$SRCDIR/scripts/test-morph" build \
+ test:chunk-repo non-existent-branch hello.morph
diff --git a/tests/morphless-chunks.script b/tests/morphless-chunks.script
index 50dddb89..584a4e09 100755
--- a/tests/morphless-chunks.script
+++ b/tests/morphless-chunks.script
@@ -47,6 +47,7 @@ cat << EOF > alfred.morph
"sources": [
{
"name": "morphless",
+ "repo": "test:morphless",
"ref": "master"
}
]
@@ -56,7 +57,7 @@ git init --quiet
git add alfred.morph
git commit --quiet -m initial
-"$SRCDIR/scripts/test-morph" build stratum master alfred.morph
+"$SRCDIR/scripts/test-morph" build test:stratum master alfred.morph
for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
do
diff --git a/tests/name-clash.script b/tests/name-clash.script
index 316a9ddc..669949ed 100755
--- a/tests/name-clash.script
+++ b/tests/name-clash.script
@@ -48,10 +48,10 @@ EOF
)
# build the dodgy chunk
-"$SRCDIR/scripts/test-morph" build chunk-repo farrokh goodbye.morph
+"$SRCDIR/scripts/test-morph" build test:chunk-repo farrokh goodbye.morph
# build a stratum
-"$SRCDIR/scripts/test-morph" build morphs-repo master hello-stratum.morph
+"$SRCDIR/scripts/test-morph" build test:morphs-repo master hello-stratum.morph
# unpack it and check the contents
INSTDIR="$DATADIR"/unpack
diff --git a/tests/rebuild-cached-stratum.script b/tests/rebuild-cached-stratum.script
index efe821ee..c0022ba6 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 morphs-repo rebuild-cached-stratum hello-stratum.morph
+ build test:morphs-repo rebuild-cached-stratum hello-stratum.morph
echo "first build:"
(cd "$cache" && ls *.chunk.* *.stratum.* | sed 's/^[^.]*\./ /' |
LC_ALL=C sort)
@@ -50,7 +50,7 @@ echo "first build:"
# Rebuild.
"$SRCDIR/scripts/test-morph" \
- build morphs-repo rebuild-cached-stratum hello-stratum.morph
+ build test:morphs-repo rebuild-cached-stratum hello-stratum.morph
echo "second build:"
(cd "$cache" && ls *.chunk.* *.stratum.* | sed 's/^[^.]*\./ /' |
LC_ALL=C sort)
diff --git a/tests/show-dependencies.script b/tests/show-dependencies.script
index 3c2abcd9..704026c9 100755
--- a/tests/show-dependencies.script
+++ b/tests/show-dependencies.script
@@ -1,7 +1,6 @@
#!/bin/bash
#
-# Test a basic distributed build of two depending strata
-# with a couple of chunks in them.
+# Test "show-dependencies" subcommand.
#
# Copyright (C) 2012 Codethink Limited
#
@@ -20,6 +19,6 @@
set -eu
-"$SRCDIR/scripts/test-morph" \
- show-dependencies test-repo master xfce-core.morph | \
- sed "s,$DATADIR,TMP,g"
+"$SRCDIR/scripts/test-morph" --log=/home/liw/morph.log \
+ show-dependencies test:test-repo master xfce-core.morph |
+ sed 's/test://'
diff --git a/tests/show-dependencies.setup b/tests/show-dependencies.setup
index e37a8572..d30e22bf 100755
--- a/tests/show-dependencies.setup
+++ b/tests/show-dependencies.setup
@@ -81,28 +81,28 @@ cat <<EOF > gtk-stack.morph
"sources": [
{
"name": "freetype",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
]
},
{
"name": "fontconfig",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
]
},
{
"name": "cairo",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
]
},
{
"name": "pango",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"freetype",
@@ -111,14 +111,14 @@ cat <<EOF > gtk-stack.morph
},
{
"name": "glib",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
]
},
{
"name": "gdk-pixbuf",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"glib"
@@ -126,7 +126,7 @@ cat <<EOF > gtk-stack.morph
},
{
"name": "gtk",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"cairo",
@@ -137,14 +137,14 @@ cat <<EOF > gtk-stack.morph
},
{
"name": "dbus",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
]
},
{
"name": "dbus-glib",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"dbus",
@@ -203,14 +203,14 @@ cat <<EOF > xfce-core.morph
"sources": [
{
"name": "libxfce4util",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
]
},
{
"name": "xfconf",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4util"
@@ -218,7 +218,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "libxfce4ui",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"xfconf"
@@ -226,7 +226,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "exo",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4util"
@@ -234,7 +234,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "garcon",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4util"
@@ -242,7 +242,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "thunar",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
@@ -251,14 +251,14 @@ cat <<EOF > xfce-core.morph
},
{
"name": "tumbler",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
]
},
{
"name": "xfce4-panel",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
@@ -268,7 +268,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "xfce4-settings",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
@@ -278,7 +278,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "xfce4-session",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
@@ -288,7 +288,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "xfwm4",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
@@ -297,7 +297,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "xfdesktop",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
@@ -306,7 +306,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "xfce4-appfinder",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
@@ -316,7 +316,7 @@ cat <<EOF > xfce-core.morph
},
{
"name": "gtk-xfce-engine",
- "repo": "test-repo",
+ "repo": "test:test-repo",
"ref": "master",
"build-depends": [
"libxfce4ui",
diff --git a/tests/update-gits-chunk.script b/tests/update-gits-chunk.script
index bece2699..8e42acd9 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 chunk-repo farrokh hello.morph
+"$SRCDIR/scripts/test-morph" update-gits test:chunk-repo farrokh hello.morph
# 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 97d1e2c0..13ce249c 100755
--- a/tests/update-gits-stratum.script
+++ b/tests/update-gits-stratum.script
@@ -26,7 +26,8 @@ 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 morphs-repo master hello-stratum.morph
+"$SRCDIR/scripts/test-morph" update-gits \
+ test:morphs-repo master hello-stratum.morph
# 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 97636b12..01be003e 100755
--- a/tests/update-gits-submodules.script
+++ b/tests/update-gits-submodules.script
@@ -33,7 +33,8 @@ chunkrepo="$DATADIR/chunk-repo"
> /dev/null
"$SRCDIR/scripts/run-git-in" "$chunkrepo" commit --quiet -m "add submodule"
-"$SRCDIR/scripts/test-morph" update-gits morphs-repo master hello-stratum.morph
+"$SRCDIR/scripts/test-morph" update-gits \
+ test:morphs-repo master hello-stratum.morph
test -d "$DATADIR/cache/gits/"*chunk?repo* && echo chunk-repo cached
test -d "$DATADIR/cache/gits/"*morphs?repo* && echo morphs-repo cached