diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2014-06-08 11:53:09 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-06-09 13:31:30 +0000 |
commit | 21e00e2a8acdeb5a67fb3d1eded28a4a0bcbd94a (patch) | |
tree | f6571971e668ba8189d90bf9c433066248b6dca4 /tests.merging | |
parent | 901e79ec9020bc810230625ba824321379f24b85 (diff) | |
download | morph-21e00e2a8acdeb5a67fb3d1eded28a4a0bcbd94a.tar.gz |
Fix tests for new `morph edit` syntax
Diffstat (limited to 'tests.merging')
-rwxr-xr-x | tests.merging/basic.script | 4 | ||||
-rwxr-xr-x | tests.merging/conflict-chunks.script | 8 | ||||
-rwxr-xr-x | tests.merging/conflict-morphology-kind.script | 3 | ||||
-rwxr-xr-x | tests.merging/conflict-stratum-field-ordering.script | 4 | ||||
-rwxr-xr-x | tests.merging/move-chunk-repo.script | 6 | ||||
-rwxr-xr-x | tests.merging/rename-chunk.script | 4 | ||||
-rwxr-xr-x | tests.merging/rename-stratum.script | 11 |
7 files changed, 13 insertions, 27 deletions
diff --git a/tests.merging/basic.script b/tests.merging/basic.script index 6d01ba16..5a1c1842 100755 --- a/tests.merging/basic.script +++ b/tests.merging/basic.script @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -34,7 +34,7 @@ git push --quiet origin test/stable cd "$DATADIR/workspace/test/feature" # Edit hello in FROM -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello +"$SRCDIR/scripts/test-morph" edit hello cd test:hello touch newfile.txt git add newfile.txt diff --git a/tests.merging/conflict-chunks.script b/tests.merging/conflict-chunks.script index 5a0c5f52..b0d118ee 100755 --- a/tests.merging/conflict-chunks.script +++ b/tests.merging/conflict-chunks.script @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -44,14 +44,12 @@ add_text_in_repo() { # Sow the seeds of conflict cd "$DATADIR/workspace/test/stable" -"$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello -"$SRCDIR/scripts/test-morph" edit hello-system stratum3 hello +"$SRCDIR/scripts/test-morph" edit hello add_text_in_repo "test:stratum2-hello" "xyzzy" add_text_in_repo "test:stratum3-hello" "xyzzy" cd "$DATADIR/workspace/test/feature" -"$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello -"$SRCDIR/scripts/test-morph" edit hello-system stratum3 hello +"$SRCDIR/scripts/test-morph" edit hello add_text_in_repo "test:stratum2-hello" "plugh" add_text_in_repo "test:stratum3-hello" "plover" diff --git a/tests.merging/conflict-morphology-kind.script b/tests.merging/conflict-morphology-kind.script index ca8403b8..cd2a24f5 100755 --- a/tests.merging/conflict-morphology-kind.script +++ b/tests.merging/conflict-morphology-kind.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012 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 @@ -25,7 +25,6 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" branch test:morphs test/unmergable cd "$DATADIR/workspace/test/unmergable/test:morphs" -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum sed -ie 's/"kind": "stratum"/"kind": "chunk"/' hello-stratum.morph git commit --quiet --all -m "Unmergeable because kind has changed" diff --git a/tests.merging/conflict-stratum-field-ordering.script b/tests.merging/conflict-stratum-field-ordering.script index c96c59ab..b83358bf 100755 --- a/tests.merging/conflict-stratum-field-ordering.script +++ b/tests.merging/conflict-stratum-field-ordering.script @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -41,7 +41,6 @@ git push --quiet origin test/stable # Make a change in TO cd "$DATADIR/workspace/test/stable" -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum cd test:morphs cat <<EOF > "hello-stratum.morph" { @@ -69,7 +68,6 @@ 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 test:morphs cat <<EOF > "hello-stratum.morph" { diff --git a/tests.merging/move-chunk-repo.script b/tests.merging/move-chunk-repo.script index 3a00015b..405e6c88 100755 --- a/tests.merging/move-chunk-repo.script +++ b/tests.merging/move-chunk-repo.script @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -26,7 +26,7 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init "$SRCDIR/scripts/test-morph" branch test:morphs baserock/newbranch -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello +"$SRCDIR/scripts/test-morph" edit hello # Chunk moves to a new location (we manually update the ref back to master # here, so 'morph edit' can create a system branch in the new repo from it). @@ -38,7 +38,7 @@ sed -e 's/"repo": "test:hello"/"repo": "test:hello-lorried"/' \ git commit -q --all -m "'hello' repository has moved" # Now we further edit the chunk, just for fun. -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello +"$SRCDIR/scripts/test-morph" edit hello cd "$DATADIR/workspace/baserock/newbranch/test:hello-lorried" touch newfile.txt git add newfile.txt diff --git a/tests.merging/rename-chunk.script b/tests.merging/rename-chunk.script index 8c323798..ac63cdd7 100755 --- a/tests.merging/rename-chunk.script +++ b/tests.merging/rename-chunk.script @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -27,7 +27,7 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" branch test:morphs baserock/newbranch # Rename the chunk, and then commit a seperate change -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello +"$SRCDIR/scripts/test-morph" edit hello cd baserock/newbranch/test:hello cat hello.morph | sed -e 's/"name": "hello"/"name": "goodbye"/' > goodbye.morph diff --git a/tests.merging/rename-stratum.script b/tests.merging/rename-stratum.script index ba759fa3..11c4cb50 100755 --- a/tests.merging/rename-stratum.script +++ b/tests.merging/rename-stratum.script @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -26,14 +26,8 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init "$SRCDIR/scripts/test-morph" branch test:morphs baserock/newbranch -# The user may 'morph edit hello-system hello-stratum hello' and commit here: -# we currently silently ignore her changes on merge, because we don't -# associate hello-stratum and goodbye-stratum at all. - # Rename the stratum -"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum cd baserock/newbranch/test:morphs - sed -e 's/"morph": "hello-stratum"/"morph": "goodbye-stratum"/'\ -i hello-system.morph sed -e 's/"name": "hello-stratum"/"name": "goodbye-stratum"/' \ @@ -42,9 +36,6 @@ git rm -q hello-stratum.morph git add goodbye-stratum.morph git commit -q --all -m "Rename hello-stratum to goodbye-stratum" -# The user may 'morph edit hello-system goodbye-stratum hello' and commit -# here, too: same problem. - # Merge changes back to master (this should fail, because we don't support # adding strata inside branches yet). cd "$DATADIR/workspace" |