diff options
Diffstat (limited to 'tests.branching')
-rwxr-xr-x | tests.branching/petrify.script | 32 | ||||
-rw-r--r-- | tests.branching/petrify.stdout | 12 | ||||
-rwxr-xr-x | tests.branching/setup | 12 |
3 files changed, 56 insertions, 0 deletions
diff --git a/tests.branching/petrify.script b/tests.branching/petrify.script new file mode 100755 index 00000000..303d7f72 --- /dev/null +++ b/tests.branching/petrify.script @@ -0,0 +1,32 @@ +#!/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. + + +# Verify that "morph petrify" works. + + +set -eu + + +cd "$DATADIR/mine" +"$SRCDIR/scripts/test-morph" init +"$SRCDIR/scripts/test-morph" update-gits baserock:morphs master \ + hello-stratum.morph +"$SRCDIR/scripts/test-morph" checkout master + +cd master/morphs +"$SRCDIR/scripts/test-morph" petrify hello-stratum.morph +cat hello-stratum.morph diff --git a/tests.branching/petrify.stdout b/tests.branching/petrify.stdout new file mode 100644 index 00000000..bf8eb1a1 --- /dev/null +++ b/tests.branching/petrify.stdout @@ -0,0 +1,12 @@ +{ + "kind": "stratum", + "name": "hello-stratum", + "sources": [ + { + "build-depends": [], + "name": "hello", + "ref": "f4d032b42c0134e67bdf19a43fa99072493667d7", + "repo": "baserock:hello" + } + ] +}
\ No newline at end of file diff --git a/tests.branching/setup b/tests.branching/setup index d659b1d0..84d1d545 100755 --- a/tests.branching/setup +++ b/tests.branching/setup @@ -24,6 +24,18 @@ set -eu +export GIT_AUTHOR_NAME +export GIT_AUTHOR_EMAIL +export GIT_AUTHOR_DATE +export GIT_COMMITTER_NAME +export GIT_COMMITTER_EMAIL +export GIT_COMMITTER_DATE +GIT_AUTHOR_NAME=developer +GIT_AUTHOR_EMAIL=developer@example.com +GIT_AUTHOR_DATE="1343753514 +0000" +GIT_COMMITTER_NAME=developer +GIT_COMMITTER_EMAIL=developer@example.com +GIT_COMMITTER_DATE="1343753514 +0000" # Create a morph configuration file cat <<EOF > "$DATADIR/morph.conf" |