summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-01 11:00:16 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-01 11:00:16 +0000
commit209e86022f4ced8bfe05cd87af0cd7649e547ca2 (patch)
tree476076090dfca5a89d04ee3dfa3ab44341997ab0 /tests
parentf3f518eab3a522f5d1862009cac3f0bc44e1beb6 (diff)
downloadmorph-209e86022f4ced8bfe05cd87af0cd7649e547ca2.tar.gz
add new test case for building a simple stratum
Diffstat (limited to 'tests')
-rwxr-xr-xtests/build-stratum.script29
-rw-r--r--tests/build-stratum.stdout6
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/build-stratum.script b/tests/build-stratum.script
new file mode 100755
index 00000000..d0ef6da4
--- /dev/null
+++ b/tests/build-stratum.script
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Test build a simple stratum.
+#
+# Copyright (C) 2011 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 -e
+
+cache="$DATADIR/build-stratum-cache"
+mkdir "$cache"
+./morph --no-default-configs build repo farrokh hello-stratum.morph \
+ --git-base-url "file://$DATADIR/" \
+ --cachedir="$cache" --keep-path
+tar -tf "$cache/"*.stratum.* | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
+rm -rf "$cache"
+
diff --git a/tests/build-stratum.stdout b/tests/build-stratum.stdout
new file mode 100644
index 00000000..e92be75b
--- /dev/null
+++ b/tests/build-stratum.stdout
@@ -0,0 +1,6 @@
+./
+baserock/
+baserock/hello-stratum.meta
+baserock/hello.meta
+bin/
+bin/hello