diff options
Diffstat (limited to 'tests.branching/merge-conflict-stratum.script')
-rwxr-xr-x | tests.branching/merge-conflict-stratum.script | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/tests.branching/merge-conflict-stratum.script b/tests.branching/merge-conflict-stratum.script deleted file mode 100755 index ff00f364..00000000 --- a/tests.branching/merge-conflict-stratum.script +++ /dev/null @@ -1,100 +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. - -# Simple merge conflict handling test. - -set -eu - -# Disable test on versions of Python before 2.7. -if ! python --version 2>&1 | grep '^Python 2\.[78]' > /dev/null -then - cat "$SRCDIR/tests.branching/merge-conflict-stratum.stdout" - cat "$SRCDIR/tests.branching/merge-conflict-stratum.stderr" >&2 - exit 1 -fi - -cd "$DATADIR/workspace" -"$SRCDIR/scripts/test-morph" init - -# Create stable branch to merge TO -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/stable -cd test/stable/baserock:morphs -git push --quiet origin test/stable - -# Create feature branch to merge FROM -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/feature test/stable - -# Need 2 chunks! - -# Make a change in TO -cd "$DATADIR/workspace/test/stable" -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum -cd baserock:morphs -cat <<EOF > "hello-stratum.morph" -{ - "name": "hello-stratum", - "kind": "stratum", - "chunks": [ - { - "name": "hello-runtime", - "repo": "baserock:hello", - "ref": "master", - "morph": "hello", - "build-depends": [] - }, - { - "name": "hello-devel", - "repo": "baserock:hello", - "ref": "master", - "morph": "hello", - "build-depends": [] - } - ] -} -EOF -git commit --quiet --all -m "Split up 'hello' chunk into runtime and devel" - -# Make a change in FROM that isn't very mergable -cd "$DATADIR/workspace/test/feature" -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum -cd baserock:morphs -cat <<EOF > "hello-stratum.morph" -{ - "name": "hello-stratum", - "kind": "stratum", - "chunks": [ - { - "name": "hello-devel", - "repo": "baserock:hello", - "ref": "master", - "morph": "hello", - "build-depends": [] - }, - { - "name": "hello-runtime", - "repo": "baserock:hello", - "ref": "master", - "morph": "hello", - "build-depends": [] - } - ] -} -EOF -git commit --quiet --all -m "Split up 'hello' chunk into devel and runtime" - -# Merge changes from test/feature to test/stable - we expect failure -cd "$DATADIR/workspace/test/stable" -"$SRCDIR/scripts/test-morph" merge test/feature |