summaryrefslogtreecommitdiff
path: root/tests.branching
diff options
context:
space:
mode:
Diffstat (limited to 'tests.branching')
-rwxr-xr-xtests.branching/edit-updates-stratum-build-depends.script69
-rw-r--r--tests.branching/edit-updates-stratum-build-depends.stdout26
-rw-r--r--tests.branching/edit-updates-stratum.stdout12
-rwxr-xr-xtests.branching/setup4
-rw-r--r--tests.branching/tag-creates-commit-and-tag.stdout18
-rw-r--r--tests.branching/tag-tag-works-as-expected.stdout18
-rwxr-xr-xtests.branching/tag-works-with-multiple-morphs-repos.script113
-rw-r--r--tests.branching/tag-works-with-multiple-morphs-repos.stdout176
-rw-r--r--tests.branching/workflow.stdout1
9 files changed, 7 insertions, 430 deletions
diff --git a/tests.branching/edit-updates-stratum-build-depends.script b/tests.branching/edit-updates-stratum-build-depends.script
deleted file mode 100755
index a108ce8a..00000000
--- a/tests.branching/edit-updates-stratum-build-depends.script
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012-2013 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 edit" clones a chunk repository into a system branch.
-
-set -eu
-
-# Add a second stratum that build-depends on the first. We can ignore the fact
-# that both strata contain the same chunk for this test.
-cd "$DATADIR/morphs"
-
-cat <<EOF > xyzzy-stratum.morph
-build-depends:
-- morph: hello-stratum
- ref: master
- repo: test:morphs
-chunks:
-- build-depends: []
- name: hello
- ref: master
- repo: test:hello
-kind: stratum
-name: xyzzy-stratum
-EOF
-
-
-# Add the xyzzy-stratum to hello-system.
-awk '
-flag == 0 { print }
-/^strata:/ { flag=1; next }
-flag == 1 && /^[ -]/ { print; next }
-flag == 1 {
- print "- morph: xyzzy-stratum"
- print " ref: master"
- print " repo: test:morphs"
- print $0
- flag = 0
-}
-' hello-system.morph > temp
-mv temp hello-system.morph
-
-git add xyzzy-stratum.morph hello-system.morph
-git commit -q -m "Add 2nd stratum with a build dependency"
-
-# Create system branch.
-cd "$DATADIR/workspace"
-"$SRCDIR/scripts/test-morph" init
-"$SRCDIR/scripts/test-morph" branch test:morphs newbranch
-
-# Edit chunk.
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
-
-# See what effect the editing had.
-"$SRCDIR/scripts/run-git-in" "newbranch/test:morphs" diff
diff --git a/tests.branching/edit-updates-stratum-build-depends.stdout b/tests.branching/edit-updates-stratum-build-depends.stdout
deleted file mode 100644
index 7120ef50..00000000
--- a/tests.branching/edit-updates-stratum-build-depends.stdout
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/hello-stratum.morph b/hello-stratum.morph
-index 73ed482..475fe0f 100644
---- a/hello-stratum.morph
-+++ b/hello-stratum.morph
-@@ -2,7 +2,8 @@ chunks:
- - build-depends: []
- build-mode: test
- name: hello
-- ref: master
-+ ref: newbranch
- repo: test:hello
-+ unpetrify-ref: master
- kind: stratum
- name: hello-stratum
-diff --git a/hello-system.morph b/hello-system.morph
-index 3f7b4d3..199c924 100644
---- a/hello-system.morph
-+++ b/hello-system.morph
-@@ -3,5 +3,6 @@ kind: system
- name: hello-system
- strata:
- - morph: hello-stratum
-- ref: master
-+ ref: newbranch
- repo: test:morphs
-+ unpetrify-ref: master
diff --git a/tests.branching/edit-updates-stratum.stdout b/tests.branching/edit-updates-stratum.stdout
index 7120ef50..ae1af132 100644
--- a/tests.branching/edit-updates-stratum.stdout
+++ b/tests.branching/edit-updates-stratum.stdout
@@ -12,15 +12,3 @@ index 73ed482..475fe0f 100644
+ unpetrify-ref: master
kind: stratum
name: hello-stratum
-diff --git a/hello-system.morph b/hello-system.morph
-index 3f7b4d3..199c924 100644
---- a/hello-system.morph
-+++ b/hello-system.morph
-@@ -3,5 +3,6 @@ kind: system
- name: hello-system
- strata:
- - morph: hello-stratum
-- ref: master
-+ ref: newbranch
- repo: test:morphs
-+ unpetrify-ref: master
diff --git a/tests.branching/setup b/tests.branching/setup
index 1263e3b6..9dfe27df 100755
--- a/tests.branching/setup
+++ b/tests.branching/setup
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2012-2013 Codethink Limited
+# Copyright (C) 2012-2014 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
@@ -53,8 +53,6 @@ kind: system
name: hello-system
strata:
- morph: hello-stratum
- ref: master
- repo: test:morphs
EOF
cat <<EOF > "$DATADIR/morphs/hello-stratum.morph"
diff --git a/tests.branching/tag-creates-commit-and-tag.stdout b/tests.branching/tag-creates-commit-and-tag.stdout
index b6098eb5..e1e2126a 100644
--- a/tests.branching/tag-creates-commit-and-tag.stdout
+++ b/tests.branching/tag-creates-commit-and-tag.stdout
@@ -5,7 +5,7 @@ Date: Tue Jul 31 16:51:54 2012 +0000
Message
-commit 6895ed63425bedb3dccaea3f258c705b1600f6be
+commit 53a2d5f00aead3f01c001da4b2b5677e25970b06
Author: developer <developer@example.com>
Date: Tue Jul 31 16:51:54 2012 +0000
@@ -25,21 +25,9 @@ index 73ed482..2218f63 100644
+ unpetrify-ref: master
kind: stratum
name: hello-stratum
-diff --git a/hello-system.morph b/hello-system.morph
-index 3f7b4d3..d909347 100644
---- a/hello-system.morph
-+++ b/hello-system.morph
-@@ -3,5 +3,6 @@ kind: system
- name: hello-system
- strata:
- - morph: hello-stratum
-- ref: master
-+ ref: example-tag
- repo: test:morphs
-+ unpetrify-ref: master
test:morphs
-commit 6895ed63425bedb3dccaea3f258c705b1600f6be
+commit 53a2d5f00aead3f01c001da4b2b5677e25970b06
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
@@ -47,7 +35,7 @@ CommitDate: Tue Jul 31 16:51:54 2012 +0000
Message
-commit e11a36aa9e4c998c41a3ec3209324b9318e484ae
+commit acb64a107d0ebdbbf0b6850b8272301a66c0a4b7
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
diff --git a/tests.branching/tag-tag-works-as-expected.stdout b/tests.branching/tag-tag-works-as-expected.stdout
index 98a3be81..9525db0b 100644
--- a/tests.branching/tag-tag-works-as-expected.stdout
+++ b/tests.branching/tag-tag-works-as-expected.stdout
@@ -9,7 +9,7 @@ Date: Tue Jul 31 16:51:54 2012 +0000
Second
-commit 476e4ff4b19c38eb64ad3a151b7c58a7ab95c9ee
+commit 332fc39a03b63a9586950e0826374dc6fa4ceaf8
Author: developer <developer@example.com>
Date: Tue Jul 31 16:51:54 2012 +0000
@@ -29,21 +29,9 @@ index 73ed482..2218f63 100644
+ unpetrify-ref: master
kind: stratum
name: hello-stratum
-diff --git a/hello-system.morph b/hello-system.morph
-index 3f7b4d3..431e15d 100644
---- a/hello-system.morph
-+++ b/hello-system.morph
-@@ -3,5 +3,6 @@ kind: system
- name: hello-system
- strata:
- - morph: hello-stratum
-- ref: master
-+ ref: tagged-tag
- repo: test:morphs
-+ unpetrify-ref: master
test:morphs
-commit 476e4ff4b19c38eb64ad3a151b7c58a7ab95c9ee
+commit 332fc39a03b63a9586950e0826374dc6fa4ceaf8
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
@@ -51,7 +39,7 @@ CommitDate: Tue Jul 31 16:51:54 2012 +0000
Second
-commit e11a36aa9e4c998c41a3ec3209324b9318e484ae
+commit acb64a107d0ebdbbf0b6850b8272301a66c0a4b7
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
diff --git a/tests.branching/tag-works-with-multiple-morphs-repos.script b/tests.branching/tag-works-with-multiple-morphs-repos.script
deleted file mode 100755
index f6ecbf32..00000000
--- a/tests.branching/tag-works-with-multiple-morphs-repos.script
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012-2013 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.
-
-
-## Check that "morph tag" works if morphologies are spread across multiple
-## repositories. In this case, it should copy all petrified morphologies
-## into the branch root repository and only create the tag there.
-
-set -eu
-
-# Make sure the commits always have the same SHA1s.
-. "$SRCDIR/scripts/fix-committer-info"
-
-# Create the first morphs repository.
-mkdir "$DATADIR/morphs1"
-
-# Create system morphology in first morphs repository.
-cat <<EOF > "$DATADIR/morphs1/test-system.morph"
-name: test-system
-kind: system
-arch: $(uname -m)
-strata:
-- morph: stratum1
- ref: master
- repo: test:morphs1
-- morph: stratum2
- ref: master
- repo: test:morphs2
-EOF
-
-# Create stratum that depends on another stratum.
-cat <<EOF > "$DATADIR/morphs1/stratum1.morph"
-name: stratum1
-kind: stratum
-build-depends:
-- morph: stratum3
- ref: master
- repo: test:morphs2
-chunks:
-- build-depends: []
- name: hello
- ref: master
- repo: test:hello
-EOF
-
-# Commit all files to the first repository.
-scripts/run-git-in "$DATADIR/morphs1" init -q
-scripts/run-git-in "$DATADIR/morphs1" add .
-scripts/run-git-in "$DATADIR/morphs1" commit -q -m initial
-
-# Create second morphs repository.
-mkdir "$DATADIR/morphs2"
-
-# Create two strata in the second repository.
-cat <<EOF > "$DATADIR/morphs2/stratum2.morph"
-name: stratum2
-kind: stratum
-build-depends:
-- morph: stratum3
- repo: test:morphs2
- ref: master
-chunks:
-- build-depends: []
- name: hello
- ref: master
- repo: test:hello
-EOF
-cat <<EOF > "$DATADIR/morphs2/stratum3.morph"
-kind: stratum
-name: stratum3
-chunks:
-- build-depends: []
- build-mode: test
- name: hello
- ref: master
- repo: test:hello
-EOF
-
-# Commit all files to the second repository.
-"$SRCDIR/scripts/run-git-in" "$DATADIR/morphs2" init -q
-"$SRCDIR/scripts/run-git-in" "$DATADIR/morphs2" add .
-"$SRCDIR/scripts/run-git-in" "$DATADIR/morphs2" commit -q -m initial
-
-cd "$DATADIR/workspace"
-"$SRCDIR/scripts/test-morph" init
-
-# Check out the master system branch.
-"$SRCDIR/scripts/test-morph" \
- checkout test:morphs1 master
-
-# Tag the master system branch.
-"$SRCDIR/scripts/test-morph" \
- tag tag-across-multiple-repos -- -m "create tag"
-
-# Show the tag.
-GIT_DIR="$DATADIR/workspace/master/test:morphs1/.git" \
- git show tag-across-multiple-repos
-GIT_DIR="$DATADIR/workspace/master/test:morphs1/.git" \
- git log --format=fuller -n1 -p --stat tag-across-multiple-repos
diff --git a/tests.branching/tag-works-with-multiple-morphs-repos.stdout b/tests.branching/tag-works-with-multiple-morphs-repos.stdout
deleted file mode 100644
index 81fbf20d..00000000
--- a/tests.branching/tag-works-with-multiple-morphs-repos.stdout
+++ /dev/null
@@ -1,176 +0,0 @@
-tag tag-across-multiple-repos
-Tagger: developer <developer@example.com>
-Date: Tue Jul 31 16:51:54 2012 +0000
-
-create tag
-
-commit 7323ed5dcc47715e7303fd36d537aef98a04df9a
-Author: developer <developer@example.com>
-Date: Tue Jul 31 16:51:54 2012 +0000
-
- create tag
-
-diff --git a/stratum1.morph b/stratum1.morph
-index 6d439df..074a838 100644
---- a/stratum1.morph
-+++ b/stratum1.morph
-@@ -2,10 +2,13 @@ name: stratum1
- kind: stratum
- build-depends:
- - morph: stratum3
-- ref: master
-- repo: test:morphs2
-+ ref: tag-across-multiple-repos
-+ repo: test:morphs1
-+ unpetrify-ref: master
-+ unpetrify-repo: test:morphs2
- chunks:
- - build-depends: []
- name: hello
-- ref: master
-+ ref: 6c7ddb7a9c0c5bf4ee02a8de030f0892a399c6bb
- repo: test:hello
-+ unpetrify-ref: master
-diff --git a/stratum2.morph b/stratum2.morph
-new file mode 100644
-index 0000000..0b421ab
---- /dev/null
-+++ b/stratum2.morph
-@@ -0,0 +1,14 @@
-+name: stratum2
-+kind: stratum
-+build-depends:
-+- morph: stratum3
-+ repo: test:morphs1
-+ ref: tag-across-multiple-repos
-+ unpetrify-ref: master
-+ unpetrify-repo: test:morphs2
-+chunks:
-+- build-depends: []
-+ name: hello
-+ ref: 6c7ddb7a9c0c5bf4ee02a8de030f0892a399c6bb
-+ repo: test:hello
-+ unpetrify-ref: master
-diff --git a/stratum3.morph b/stratum3.morph
-new file mode 100644
-index 0000000..610fae6
---- /dev/null
-+++ b/stratum3.morph
-@@ -0,0 +1,9 @@
-+kind: stratum
-+name: stratum3
-+chunks:
-+- build-depends: []
-+ build-mode: test
-+ name: hello
-+ ref: 6c7ddb7a9c0c5bf4ee02a8de030f0892a399c6bb
-+ repo: test:hello
-+ unpetrify-ref: master
-diff --git a/test-system.morph b/test-system.morph
-index 62d3b08..edb5745 100644
---- a/test-system.morph
-+++ b/test-system.morph
-@@ -3,8 +3,11 @@ kind: system
- arch: x86_64
- strata:
- - morph: stratum1
-- ref: master
-+ ref: tag-across-multiple-repos
- repo: test:morphs1
-+ unpetrify-ref: master
- - morph: stratum2
-- ref: master
-- repo: test:morphs2
-+ ref: tag-across-multiple-repos
-+ repo: test:morphs1
-+ unpetrify-ref: master
-+ unpetrify-repo: test:morphs2
-commit 7323ed5dcc47715e7303fd36d537aef98a04df9a
-Author: developer <developer@example.com>
-AuthorDate: Tue Jul 31 16:51:54 2012 +0000
-Commit: developer <developer@example.com>
-CommitDate: Tue Jul 31 16:51:54 2012 +0000
-
- create tag
----
- stratum1.morph | 9 ++++++---
- stratum2.morph | 14 ++++++++++++++
- stratum3.morph | 9 +++++++++
- test-system.morph | 9 ++++++---
- 4 files changed, 35 insertions(+), 6 deletions(-)
-
-diff --git a/stratum1.morph b/stratum1.morph
-index 6d439df..074a838 100644
---- a/stratum1.morph
-+++ b/stratum1.morph
-@@ -2,10 +2,13 @@ name: stratum1
- kind: stratum
- build-depends:
- - morph: stratum3
-- ref: master
-- repo: test:morphs2
-+ ref: tag-across-multiple-repos
-+ repo: test:morphs1
-+ unpetrify-ref: master
-+ unpetrify-repo: test:morphs2
- chunks:
- - build-depends: []
- name: hello
-- ref: master
-+ ref: 6c7ddb7a9c0c5bf4ee02a8de030f0892a399c6bb
- repo: test:hello
-+ unpetrify-ref: master
-diff --git a/stratum2.morph b/stratum2.morph
-new file mode 100644
-index 0000000..0b421ab
---- /dev/null
-+++ b/stratum2.morph
-@@ -0,0 +1,14 @@
-+name: stratum2
-+kind: stratum
-+build-depends:
-+- morph: stratum3
-+ repo: test:morphs1
-+ ref: tag-across-multiple-repos
-+ unpetrify-ref: master
-+ unpetrify-repo: test:morphs2
-+chunks:
-+- build-depends: []
-+ name: hello
-+ ref: 6c7ddb7a9c0c5bf4ee02a8de030f0892a399c6bb
-+ repo: test:hello
-+ unpetrify-ref: master
-diff --git a/stratum3.morph b/stratum3.morph
-new file mode 100644
-index 0000000..610fae6
---- /dev/null
-+++ b/stratum3.morph
-@@ -0,0 +1,9 @@
-+kind: stratum
-+name: stratum3
-+chunks:
-+- build-depends: []
-+ build-mode: test
-+ name: hello
-+ ref: 6c7ddb7a9c0c5bf4ee02a8de030f0892a399c6bb
-+ repo: test:hello
-+ unpetrify-ref: master
-diff --git a/test-system.morph b/test-system.morph
-index 62d3b08..edb5745 100644
---- a/test-system.morph
-+++ b/test-system.morph
-@@ -3,8 +3,11 @@ kind: system
- arch: x86_64
- strata:
- - morph: stratum1
-- ref: master
-+ ref: tag-across-multiple-repos
- repo: test:morphs1
-+ unpetrify-ref: master
- - morph: stratum2
-- ref: master
-- repo: test:morphs2
-+ ref: tag-across-multiple-repos
-+ repo: test:morphs1
-+ unpetrify-ref: master
-+ unpetrify-repo: test:morphs2
diff --git a/tests.branching/workflow.stdout b/tests.branching/workflow.stdout
index 65985486..e69de29b 100644
--- a/tests.branching/workflow.stdout
+++ b/tests.branching/workflow.stdout
@@ -1 +0,0 @@
-WARNING: chunk "hello-system.hello-stratum.hello" is now petrified