diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-07-31 17:29:43 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-08-01 13:29:34 +0000 |
commit | ec3d3314f2a6484b3cca591920ed4e8034e546f5 (patch) | |
tree | 32faaca189190d0074be747866486c7635474ee6 /tests.branching/petrify.script | |
parent | dabe86700200c529846927230e5e97249bf70792 (diff) | |
download | morph-ec3d3314f2a6484b3cca591920ed4e8034e546f5.tar.gz |
Add test for petrifying strata
This test checks if the same morphology json is generated during
petrification.
Because commits include the author and date, the sha1 sum will
differ if a different user commits at a different time.
This can be overridden by the environment variables
GIT_{AUTHOR,COMMITTER}_{NAME,EMAIL,DATE}.
The date chosen was just something recent at the time the work was
done, since a too-early timestamp is rejected by git as invalid.
Diffstat (limited to 'tests.branching/petrify.script')
-rwxr-xr-x | tests.branching/petrify.script | 32 |
1 files changed, 32 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 |