summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-01-29 11:58:13 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-20 16:50:05 +0000
commit8d9a939630bc677c2d2e7c4202a400f9bc0ab3ad (patch)
tree5739316c27531d30be13809f61d0e1e4e630abe9 /tests
parentb4d343b46883ef52df656f0f6401dc6bb1d6e8dd (diff)
downloadmorph-8d9a939630bc677c2d2e7c4202a400f9bc0ab3ad.tar.gz
Separate out build tests from general Morph tests
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ambiguous-refs.script32
-rw-r--r--tests/build-chunk-failures-dump-log.exit1
-rwxr-xr-xtests/build-chunk-failures-dump-log.script42
-rw-r--r--tests/build-chunk-failures-dump-log.stdout8
-rwxr-xr-xtests/build-chunk-writes-log.script37
-rwxr-xr-xtests/build-chunk.script30
-rw-r--r--tests/build-chunk.stdout8
-rwxr-xr-xtests/build-stratum-with-submodules.script75
-rw-r--r--tests/build-stratum-with-submodules.stdout4
-rwxr-xr-xtests/build-stratum.script29
-rw-r--r--tests/build-stratum.stdout7
-rw-r--r--tests/build-system-autotools-fails-if-autogen-fails.exit1
-rwxr-xr-xtests/build-system-autotools-fails-if-autogen-fails.script39
-rwxr-xr-xtests/build-system-autotools.script57
-rw-r--r--tests/build-system-autotools.stdout8
-rwxr-xr-xtests/build-system-cpan.script65
-rw-r--r--tests/build-system-cpan.stdout2
-rwxr-xr-xtests/build-system-python-distutils.script67
-rw-r--r--tests/build-system-python-distutils.stdout10
-rw-r--r--tests/missing-ref.exit1
-rwxr-xr-xtests/missing-ref.script23
-rw-r--r--tests/missing-ref.stderr1
-rwxr-xr-xtests/morphless-chunks.script71
-rw-r--r--tests/morphless-chunks.stdout5
-rwxr-xr-xtests/rebuild-cached-stratum.script58
-rw-r--r--tests/rebuild-cached-stratum.stdout8
-rwxr-xr-xtests/stratum-overlap-warns.script39
-rwxr-xr-xtests/stratum-overlap-warns.setup117
-rwxr-xr-xtests/stratum-overlap-writes-overlap.script35
l---------tests/stratum-overlap-writes-overlap.setup1
-rw-r--r--tests/stratum-overlap-writes-overlap.stdout4
-rwxr-xr-xtests/uses-tempdir.script28
32 files changed, 0 insertions, 913 deletions
diff --git a/tests/ambiguous-refs.script b/tests/ambiguous-refs.script
deleted file mode 100755
index 58d09d26..00000000
--- a/tests/ambiguous-refs.script
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Guard against a bug that occurs if 'git show-ref' is used to resolve refs
-## instead of 'git rev-parse --verify': show-ref returns a list of partial
-## matches sorted alphabetically, so any code using it may resolve refs
-
-set -eu
-
-# Create a ref that will show up in 'git show-ref' before the real master ref
-cd "$DATADIR/morphs-repo"
-git checkout -q -b alpha/master
-git rm -q hello-stratum.morph
-git commit -q -m "This ref will not build correctly"
-
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo master hello-stratum
diff --git a/tests/build-chunk-failures-dump-log.exit b/tests/build-chunk-failures-dump-log.exit
deleted file mode 100644
index d00491fd..00000000
--- a/tests/build-chunk-failures-dump-log.exit
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/build-chunk-failures-dump-log.script b/tests/build-chunk-failures-dump-log.script
deleted file mode 100755
index 3e0985d8..00000000
--- a/tests/build-chunk-failures-dump-log.script
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test building a chunk that fails.
-
-set -eu
-
-chunkrepo="$DATADIR/chunk-repo"
-cd "$chunkrepo"
-git checkout --quiet master
-cat <<EOF >false.morph
-{
- "name": "false",
- "kind": "chunk",
- "build-system": "dummy",
- "build-commands": [
- "echo The next command will fail",
- "false"
- ]
-}
-EOF
-git add false.morph
-git commit --quiet -m "Make a morphology that fails."
-
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo master false \
- 2>/dev/null
diff --git a/tests/build-chunk-failures-dump-log.stdout b/tests/build-chunk-failures-dump-log.stdout
deleted file mode 100644
index 7a13c12a..00000000
--- a/tests/build-chunk-failures-dump-log.stdout
+++ /dev/null
@@ -1,8 +0,0 @@
-build failed
-# configure
-# # echo dummy configure
-dummy configure
-# build
-# # echo The next command will fail
-The next command will fail
-# # false
diff --git a/tests/build-chunk-writes-log.script b/tests/build-chunk-writes-log.script
deleted file mode 100755
index a258bf99..00000000
--- a/tests/build-chunk-writes-log.script
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test building a chunk - build log should be saved.
-
-set -eu
-
-"$SRCDIR/scripts/test-morph" build-morphology test:chunk-repo farrokh hello
-
-SOURCES="$DATADIR/cached-sources"
-find "$DATADIR/cache/artifacts" -name '*.chunk.*' |
- sed 's|\.chunk\..*||' | sort -u >"$SOURCES"
-
-found=false
-# list of sources in cache is not piped because while loop changes variable
-while read source; do
- [ -e "$source".build-log ] || continue
- found=true
- break
-done <"$SOURCES"
-"$found"
-
diff --git a/tests/build-chunk.script b/tests/build-chunk.script
deleted file mode 100755
index 9728f939..00000000
--- a/tests/build-chunk.script
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test building a chunk.
-
-set -eu
-
-"$SRCDIR/scripts/test-morph" build-morphology test:chunk-repo farrokh hello
-
-for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
-do
- echo "$chunk:" | sed 's/[^.]*//'
- tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
- echo
-done
diff --git a/tests/build-chunk.stdout b/tests/build-chunk.stdout
deleted file mode 100644
index 8077cac2..00000000
--- a/tests/build-chunk.stdout
+++ /dev/null
@@ -1,8 +0,0 @@
-.chunk.hello:
-./
-baserock/
-baserock/hello.meta
-bin/
-bin/hello
-etc/
-
diff --git a/tests/build-stratum-with-submodules.script b/tests/build-stratum-with-submodules.script
deleted file mode 100755
index 1799d74a..00000000
--- a/tests/build-stratum-with-submodules.script
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test build a stratum that uses a chunk which needs a submodule.
-
-set -eu
-
-# tests/setup creates a chunk-repo. We now create a new chunk, which
-# uses chunk-repo as a submodule.
-
-parent="$DATADIR/parent-repo"
-mkdir "$parent"
-cat <<EOF > "$parent/parent.morph"
-{
- "name": "parent",
- "kind": "chunk",
- "build-system": "manual",
- "build-commands": [
- "test -f le-sub/README"
- ]
-}
-EOF
-
-"$SRCDIR/scripts/run-git-in" "$parent" init --quiet
-"$SRCDIR/scripts/run-git-in" "$parent" add .
-"$SRCDIR/scripts/run-git-in" "$parent" \
- submodule --quiet add -b farrokh "$DATADIR/chunk-repo" le-sub > /dev/null
-"$SRCDIR/scripts/run-git-in" "$parent" commit --quiet -m initial
-
-
-# Modify the stratum to refer to the parent, not the submodule.
-
-morphs="$DATADIR/morphs-repo"
-cat <<EOF > "$morphs/submod-stratum.morph"
-{
- "name": "submod-stratum",
- "kind": "stratum",
- "chunks": [
- {
- "name": "parent",
- "repo": "test:parent-repo",
- "ref": "master",
- "build-depends": []
- }
- ]
-}
-EOF
-"$SRCDIR/scripts/run-git-in" "$morphs" add submod-stratum.morph
-"$SRCDIR/scripts/run-git-in" "$morphs" commit --quiet -m 'foo'
-
-
-# No build and verify we got a stratum.
-
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo master submod-stratum
-"$SRCDIR/scripts/assemble-stratum" --cachedir "$DATADIR/cache" \
- "$DATADIR/cache/artifacts/"*submod-stratum \
- "$DATADIR/stratum.tar" submod-stratum
-tar -tf "$DATADIR/stratum.tar" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
-
diff --git a/tests/build-stratum-with-submodules.stdout b/tests/build-stratum-with-submodules.stdout
deleted file mode 100644
index a5f677f3..00000000
--- a/tests/build-stratum-with-submodules.stdout
+++ /dev/null
@@ -1,4 +0,0 @@
-./
-baserock/
-baserock/parent.meta
-baserock/submod-stratum.meta
diff --git a/tests/build-stratum.script b/tests/build-stratum.script
deleted file mode 100755
index ac210129..00000000
--- a/tests/build-stratum.script
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test build a simple stratum.
-
-set -eu
-
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo master hello-stratum
-"$SRCDIR/scripts/assemble-stratum" --cachedir "$DATADIR/cache" \
- "$DATADIR/cache/artifacts/"*.hello-stratum \
- "$DATADIR/stratum.tar" hello-stratum
-tar -tf "$DATADIR/stratum.tar" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
-
diff --git a/tests/build-stratum.stdout b/tests/build-stratum.stdout
deleted file mode 100644
index 4f422ea4..00000000
--- a/tests/build-stratum.stdout
+++ /dev/null
@@ -1,7 +0,0 @@
-./
-baserock/
-baserock/hello-stratum.meta
-baserock/hello.meta
-bin/
-bin/hello
-etc/
diff --git a/tests/build-system-autotools-fails-if-autogen-fails.exit b/tests/build-system-autotools-fails-if-autogen-fails.exit
deleted file mode 100644
index d00491fd..00000000
--- a/tests/build-system-autotools-fails-if-autogen-fails.exit
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/build-system-autotools-fails-if-autogen-fails.script b/tests/build-system-autotools-fails-if-autogen-fails.script
deleted file mode 100755
index 46510516..00000000
--- a/tests/build-system-autotools-fails-if-autogen-fails.script
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test that the autotools build system fails if it runs autogen.sh and that
-## fails.
-
-set -eu
-
-x="$DATADIR/autogen-chunk"
-mkdir "$x"
-cat <<EOF > "$x/autogen.sh"
-#!/bin/sh
-echo "in failing autogen.sh"
-exit 1
-EOF
-chmod a+x "$x/autogen.sh"
-"$SRCDIR/scripts/run-git-in" "$x" init --quiet
-"$SRCDIR/scripts/run-git-in" "$x" add .
-"$SRCDIR/scripts/run-git-in" "$x" commit --quiet -m initial
-
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:autogen-chunk master detected \
- >/dev/null 2> /dev/null
-
diff --git a/tests/build-system-autotools.script b/tests/build-system-autotools.script
deleted file mode 100755
index 6037d1b5..00000000
--- a/tests/build-system-autotools.script
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Convert the hello-chunk project to something autotools-like, then
-## build it.
-
-set -eu
-
-chunkrepo="$DATADIR/chunk-repo"
-cd "$chunkrepo"
-
-git checkout --quiet farrokh
-
-cat <<'EOF' >Makefile
-all: hello
-
-install: all
- install -d "$(DESTDIR)/etc"
- install -d "$(DESTDIR)/bin"
- install hello "$(DESTDIR)/bin/hello"
-EOF
-git add Makefile
-
-cat <<EOF > hello.morph
-{
- "name": "hello",
- "kind": "chunk",
- "build-system": "autotools",
- "configure-commands": []
-}
-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
-
-for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
-do
- echo "$chunk:" | sed 's/[^.]*//'
- tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
- echo
-done
diff --git a/tests/build-system-autotools.stdout b/tests/build-system-autotools.stdout
deleted file mode 100644
index 8077cac2..00000000
--- a/tests/build-system-autotools.stdout
+++ /dev/null
@@ -1,8 +0,0 @@
-.chunk.hello:
-./
-baserock/
-baserock/hello.meta
-bin/
-bin/hello
-etc/
-
diff --git a/tests/build-system-cpan.script b/tests/build-system-cpan.script
deleted file mode 100755
index 9217ab16..00000000
--- a/tests/build-system-cpan.script
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Convert the hello-chunk project to perl with CPAN and build.
-
-set -eu
-
-chunkrepo="$DATADIR/chunk-repo"
-cd "$chunkrepo"
-
-git checkout --quiet farrokh
-
-git rm --quiet hello.c
-
-cat <<EOF >hello
-#!/usr/bin/perl
-print "hello, world\n"
-EOF
-git add hello
-
-cat <<EOF >Makefile.PL
-use strict;
-use warnings;
-use ExtUtils::MakeMaker;
-WriteMakefile(
- EXE_FILES => ['hello'],
-)
-EOF
-git add Makefile.PL
-
-cat <<EOF >hello.morph
-{
- "name": "hello",
- "kind": "chunk",
- "build-system": "cpan"
-}
-EOF
-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
-
-for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
-do
- echo "$chunk:" | sed 's/[^.]*//'
- tar -tf "$chunk" | LC_ALL=C sort |
- sed -e '/^\.\/./s:^\./::' | grep -F "bin/hello"
-done
diff --git a/tests/build-system-cpan.stdout b/tests/build-system-cpan.stdout
deleted file mode 100644
index 5cbe4c73..00000000
--- a/tests/build-system-cpan.stdout
+++ /dev/null
@@ -1,2 +0,0 @@
-.chunk.hello:
-bin/hello
diff --git a/tests/build-system-python-distutils.script b/tests/build-system-python-distutils.script
deleted file mode 100755
index 683599f2..00000000
--- a/tests/build-system-python-distutils.script
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Convert the hello-chunk project to python with distutils and build.
-
-set -eu
-
-chunkrepo="$DATADIR/chunk-repo"
-cd "$chunkrepo"
-
-git checkout --quiet farrokh
-
-git rm --quiet hello.c
-cat <<EOF >hello
-#!/usr/bin/python
-print "hello, world"
-EOF
-git add hello
-
-cat <<EOF >setup.py
-#!/usr/bin/python
-from distutils.core import setup
-setup(name='hello',
- scripts=['hello'])
-EOF
-git add setup.py
-
-cat <<EOF >hello.morph
-{
- "name": "hello",
- "kind": "chunk",
- "build-system": "python-distutils"
-}
-EOF
-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
-
-for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
-do
- echo "$chunk:" | sed 's/[^.]*//'
- tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
- echo
-done |
-sed -e 's:^local/::' \
- -e 's:lib/python2.[6-9]/:lib/python2.x/:' \
- -e 's:/hello-0\.0\.0[^/]*\.egg-info$:/hello.egg-info/:' \
- -e 's:[^/]*-packages:packages:' \
- -e '/^$/d'
diff --git a/tests/build-system-python-distutils.stdout b/tests/build-system-python-distutils.stdout
deleted file mode 100644
index 4d4abdbb..00000000
--- a/tests/build-system-python-distutils.stdout
+++ /dev/null
@@ -1,10 +0,0 @@
-.chunk.hello:
-./
-baserock/
-baserock/hello.meta
-bin/
-bin/hello
-lib/
-lib/python2.x/
-lib/python2.x/packages/
-lib/python2.x/packages/hello.egg-info/
diff --git a/tests/missing-ref.exit b/tests/missing-ref.exit
deleted file mode 100644
index d00491fd..00000000
--- a/tests/missing-ref.exit
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/missing-ref.script b/tests/missing-ref.script
deleted file mode 100755
index 26183af3..00000000
--- a/tests/missing-ref.script
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011,2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test building with a bad reference.
-
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo non-existent-branch hello
-
diff --git a/tests/missing-ref.stderr b/tests/missing-ref.stderr
deleted file mode 100644
index d2b5d254..00000000
--- a/tests/missing-ref.stderr
+++ /dev/null
@@ -1 +0,0 @@
-ERROR: Ref non-existent-branch is an invalid reference for repo file://TMP/chunk-repo
diff --git a/tests/morphless-chunks.script b/tests/morphless-chunks.script
deleted file mode 100755
index d7b068da..00000000
--- a/tests/morphless-chunks.script
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Try to build a morphless chunk.
-
-set -eu
-
-# Create an auto-detectable chunk.
-
-mkdir "$DATADIR/morphless"
-cd "$DATADIR/morphless"
-
-touch configure
-chmod +x configure
-# FIXME: If we leave the file empty, busybox sh on ARMv7 fails to execute it.
-echo '#!/bin/sh' > configure
-
-cat << EOF > Makefile
-all install:
-EOF
-
-git init --quiet
-git add *
-git commit --quiet -m initial
-
-
-# Create a stratum that refers to the morphless chunk.
-
-mkdir "$DATADIR/stratum"
-cd "$DATADIR/stratum"
-cat << EOF > alfred.morph
-{
- "name": "alfred",
- "kind": "stratum",
- "chunks": [
- {
- "name": "morphless",
- "repo": "test:morphless",
- "ref": "master",
- "build-depends": []
- }
- ]
-}
-EOF
-git init --quiet
-git add alfred.morph
-git commit --quiet -m initial
-
-"$SRCDIR/scripts/test-morph" build-morphology test:stratum master alfred
-
-for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
-do
- echo "$chunk:" | sed 's/[^.]*//'
- tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
- echo
-done
diff --git a/tests/morphless-chunks.stdout b/tests/morphless-chunks.stdout
deleted file mode 100644
index 8e17b29a..00000000
--- a/tests/morphless-chunks.stdout
+++ /dev/null
@@ -1,5 +0,0 @@
-.chunk.morphless:
-./
-baserock/
-baserock/morphless.meta
-
diff --git a/tests/rebuild-cached-stratum.script b/tests/rebuild-cached-stratum.script
deleted file mode 100755
index 70cc54cf..00000000
--- a/tests/rebuild-cached-stratum.script
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Does a cached stratum get rebuilt if its chunk changes?
-## This tests a bug that is currently in morph, where the stratum does
-## not get rebuilt in that case. Later on, the test will guard against
-## regressions.
-
-set -eu
-
-cache="$DATADIR/cache/artifacts"
-
-# Make a branch in the chunk repo where we can make our own modifications.
-(cd "$DATADIR/chunk-repo" &&
- git checkout --quiet farrokh &&
- git checkout --quiet -b rebuild-cached-stratum)
-
-# Make a branch in the morphs repo and modify the stratum to refer to
-# the new chunk branch.
-(cd "$DATADIR/morphs-repo" &&
- git checkout --quiet -b rebuild-cached-stratum &&
- sed -i 's/farrokh/rebuild-cached-stratum/' hello-stratum.morph &&
- git commit --quiet -m "rebuild-cached-stratum" -a)
-
-# Build the first time.
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo rebuild-cached-stratum hello-stratum
-echo "first build:"
-(cd "$cache" && ls *.chunk.* *hello-stratum | sed 's/^[^.]*\./ /' |
- LC_ALL=C sort)
-
-# Change the chunk.
-(cd "$DATADIR/chunk-repo" &&
- echo >> hello.c &&
- git commit --quiet -am change)
-
-# Rebuild.
-"$SRCDIR/scripts/test-morph" build-morphology \
- 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/rebuild-cached-stratum.stdout b/tests/rebuild-cached-stratum.stdout
deleted file mode 100644
index eee106f5..00000000
--- a/tests/rebuild-cached-stratum.stdout
+++ /dev/null
@@ -1,8 +0,0 @@
-first build:
- chunk.hello
- stratum.hello-stratum
-second build:
- chunk.hello
- chunk.hello
- stratum.hello-stratum
- stratum.hello-stratum
diff --git a/tests/stratum-overlap-warns.script b/tests/stratum-overlap-warns.script
deleted file mode 100755
index c9aeed72..00000000
--- a/tests/stratum-overlap-warns.script
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## If a stratum has multiple chunks that have the same files in them,
-## then this should be noted.
-
-set -eu
-
-log="$DATADIR/morph.log"
-warnings="$DATADIR/warnings"
-cache="$DATADIR/cache/artifacts"
-
-warning_mentions(){
- grep -F "$1" <"$warnings" >/dev/null 2>/dev/null
-}
-
-"$SRCDIR/scripts/test-morph" build-morphology --log=$log \
- test:morphs-repo overlap overlap-stratum > /dev/null
-grep WARNING "$log" >"$warnings"
-for str in overlap-stratum \
- overlap-foo-baz overlap-foobar bin/bar \
- overlap-fooqux bin/foo; do
- warning_mentions 'overlap-stratum' || exit $?
-done
diff --git a/tests/stratum-overlap-warns.setup b/tests/stratum-overlap-warns.setup
deleted file mode 100755
index a699bf2d..00000000
--- a/tests/stratum-overlap-warns.setup
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-#
-# If a stratum has multiple chunks that have the same files in them,
-# then this should be notified
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-set -eu
-
-chunkrepo="$DATADIR/chunk-repo"
-morphsrepo="$DATADIR/morphs-repo"
-
-cd "$morphsrepo"
-git checkout --quiet -b overlap master
-cat <<EOF >overlap-stratum.morph
-{
- "name": "overlap-stratum",
- "kind": "stratum",
- "chunks": [
- {
- "name": "dirs",
- "repo": "test:chunk-repo",
- "ref": "overlap",
- "build-depends": []
- },
- {
- "name": "overlap-foobar",
- "repo": "test:chunk-repo",
- "ref": "overlap",
- "build-depends": ["dirs"]
- },
- {
- "name": "overlap-fooqux",
- "repo": "test:chunk-repo",
- "ref": "overlap",
- "build-depends": ["overlap-foobar"]
- },
- {
- "name": "overlap-foo-baz",
- "repo": "test:chunk-repo",
- "ref": "overlap",
- "build-depends": ["overlap-fooqux"]
- }
- ]
-}
-EOF
-git add overlap-stratum.morph
-git commit --quiet -m "add overlapping stratum"
-
-cd "$chunkrepo"
-git checkout --quiet -b overlap master
-
-cat <<EOF >dirs.morph
-{
- "name": "dirs",
- "kind": "chunk",
- "install-commands": [
- "mkdir -p \$DESTDIR/bin",
- "ln -s / \$DESTDIR/usr"
- ]
-}
-EOF
-git add dirs.morph
-
-cat <<EOF >overlap-foo-baz.morph
-{
- "name": "overlap-foo-baz",
- "kind": "chunk",
- "install-commands": [
- "mkdir -p \$DESTDIR/bin",
- "for f in foo bar baz; do echo echo \$f >\$DESTDIR/bin/\$f; done"
- ]
-}
-EOF
-git add overlap-foo-baz.morph
-
-cat <<EOF >overlap-foobar.morph
-{
- "name": "overlap-foobar",
- "kind": "chunk",
- "install-commands": [
- "mkdir -p \$DESTDIR/usr/bin \$DESTDIR/bin",
- "echo echo foobar >\$DESTDIR/usr/bin/foobar",
- "ln -s /usr/bin/foobar \$DESTDIR/bin/foo",
- "ln -s /usr/bin/foobar \$DESTDIR/bin/bar"
- ]
-}
-EOF
-git add overlap-foobar.morph
-
-cat <<EOF >overlap-fooqux.morph
-{
- "name": "overlap-fooqux",
- "kind": "chunk",
- "install-commands": [
- "mkdir -p \$DESTDIR/usr/bin \$DESTDIR/bin",
- "for f in qux fooqux; do echo echo \$f >\$DESTDIR/usr/bin/\$f; done",
- "ln -s /usr/bin/fooqux \$DESTDIR/bin/foo"
- ]
-}
-EOF
-git add overlap-fooqux.morph
-
-git commit --quiet -m 'Add overlapping chunks'
diff --git a/tests/stratum-overlap-writes-overlap.script b/tests/stratum-overlap-writes-overlap.script
deleted file mode 100755
index a52d1ba7..00000000
--- a/tests/stratum-overlap-writes-overlap.script
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## If a stratum has multiple chunks that have the same files in them,
-## then the overlaps must be written to the cache
-
-set -eu
-
-cache="$DATADIR/cache/artifacts"
-
-
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo overlap overlap-stratum > /dev/null
-"$SRCDIR/scripts/list-overlaps" groups \
- "$cache"/*.stratum.overlap-stratum.overlaps |
-while IFS='\n' read overlaps; do
- echo $overlaps
- "$SRCDIR/scripts/list-overlaps" list-files \
- "$cache"/*.stratum.overlap-stratum.overlaps $overlaps
-done
diff --git a/tests/stratum-overlap-writes-overlap.setup b/tests/stratum-overlap-writes-overlap.setup
deleted file mode 120000
index 255e9a74..00000000
--- a/tests/stratum-overlap-writes-overlap.setup
+++ /dev/null
@@ -1 +0,0 @@
-stratum-overlap-warns.setup \ No newline at end of file
diff --git a/tests/stratum-overlap-writes-overlap.stdout b/tests/stratum-overlap-writes-overlap.stdout
deleted file mode 100644
index 40485659..00000000
--- a/tests/stratum-overlap-writes-overlap.stdout
+++ /dev/null
@@ -1,4 +0,0 @@
-overlap-foo-baz overlap-foobar overlap-fooqux
-bin/foo
-overlap-foo-baz overlap-foobar
-bin/bar
diff --git a/tests/uses-tempdir.script b/tests/uses-tempdir.script
deleted file mode 100755
index a4aac557..00000000
--- a/tests/uses-tempdir.script
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, 2012 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-## Test that temporary directories are created in the dir specified
-## by --tempdir rather than specified in the environment by TMPDIR.
-
-set -eu
-export TMPDIR
-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