diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-07 15:51:01 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-07 18:53:48 +0000 |
commit | b599757873d5f05e82647287dfd1387f2426e5c5 (patch) | |
tree | 45813def262ff7d58b0e3c9564670fd0907d9ff7 /tests.merging | |
parent | 25067e0ff261577da0ace26126c01e2829d7e5b7 (diff) | |
download | morph-b599757873d5f05e82647287dfd1387f2426e5c5.tar.gz |
tests: Use test: URL prefix instead of baserock: throughout
Some tests already used test: and in order to be able to share the
scripts/setup-3rd-party-strata script they need to all use the same
prefix.
Using baserock: implies that we are using real code from Baserock,
so I picked test: because the tests only ever use mock morphologies
and no real code.
Diffstat (limited to 'tests.merging')
-rwxr-xr-x | tests.merging/basic.script | 20 | ||||
-rw-r--r-- | tests.merging/basic.stdout | 4 | ||||
-rwxr-xr-x | tests.merging/conflict-chunks.script | 26 | ||||
-rw-r--r-- | tests.merging/conflict-chunks.stdout | 4 | ||||
-rwxr-xr-x | tests.merging/conflict-morphology-kind.script | 8 | ||||
-rwxr-xr-x | tests.merging/conflict-stratum-field-ordering.script | 18 | ||||
-rw-r--r-- | tests.merging/conflict-stratum-field-ordering.stdout | 2 | ||||
-rwxr-xr-x | tests.merging/from-branch-not-checked-out.script | 2 | ||||
-rwxr-xr-x | tests.merging/move-chunk-repo.script | 12 | ||||
-rwxr-xr-x | tests.merging/rename-chunk.script | 10 | ||||
-rwxr-xr-x | tests.merging/rename-stratum.script | 6 | ||||
-rw-r--r-- | tests.merging/rename-stratum.stderr | 2 | ||||
-rwxr-xr-x | tests.merging/setup | 6 | ||||
-rwxr-xr-x | tests.merging/warn-if-merging-petrified-morphologies.script | 8 |
14 files changed, 64 insertions, 64 deletions
diff --git a/tests.merging/basic.script b/tests.merging/basic.script index 741e8a3f..6b063a20 100755 --- a/tests.merging/basic.script +++ b/tests.merging/basic.script @@ -29,17 +29,17 @@ 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 +"$SRCDIR/scripts/test-morph" branch test:morphs test/stable +cd test/stable/test:morphs git push --quiet origin test/stable # Create feature branch to merge FROM -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/feature test/stable +"$SRCDIR/scripts/test-morph" branch test:morphs test/feature test/stable cd "$DATADIR/workspace/test/feature" # Edit hello in FROM "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello -cd baserock:hello +cd test:hello touch newfile.txt git add newfile.txt git commit -m foo --quiet @@ -47,7 +47,7 @@ git commit -m foo --quiet # Commit in morphs repo # FIXME: this should become unnecessary since only the refs have # changed. -cd ../baserock:morphs +cd ../test:morphs git commit --all --quiet -m "Update morph refs for test/feature" # Merge changes back to test/stable @@ -57,7 +57,7 @@ cd test/stable # Check results: changes to 'hello' should have been merged back to # test/stable. -cd baserock:hello +cd test:hello [ -e newfile.txt ] # Make sure all changes are committed and to the correct branch ('hello' @@ -67,7 +67,7 @@ git status --short [ $(git rev-parse master) = $(git rev-parse HEAD) ] # Changes here should be on test/stable. -cd ../baserock:morphs +cd ../test:morphs git status --short [ $(git rev-parse test/stable) = $(git rev-parse HEAD) ] @@ -76,11 +76,11 @@ git status --short # The only change here was the branch refs, which have now been # changed back - so there should not be any new commits. -echo "Commit message for baserock:morphs" +echo "Commit message for test:morphs" git cat-file commit HEAD | tail -n 1 echo -echo "Commit message for baserock:hello" -cd ../baserock:hello +echo "Commit message for test:hello" +cd ../test:hello git cat-file commit HEAD | tail -n 1 diff --git a/tests.merging/basic.stdout b/tests.merging/basic.stdout index 2bdde644..7acb135c 100644 --- a/tests.merging/basic.stdout +++ b/tests.merging/basic.stdout @@ -1,5 +1,5 @@ -Commit message for baserock:morphs +Commit message for test:morphs initial -Commit message for baserock:hello +Commit message for test:hello Merge system branch 'test/feature' diff --git a/tests.merging/conflict-chunks.script b/tests.merging/conflict-chunks.script index 3c5ecb04..a9b85989 100755 --- a/tests.merging/conflict-chunks.script +++ b/tests.merging/conflict-chunks.script @@ -30,12 +30,12 @@ fi . "$SRCDIR/scripts/setup-3rd-party-strata" # Create stable branch to merge TO -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/stable -cd test/stable/baserock:morphs +"$SRCDIR/scripts/test-morph" branch test:morphs test/stable +cd test/stable/test:morphs git push --quiet origin test/stable # Create feature branch to merge FROM -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/feature test/stable +"$SRCDIR/scripts/test-morph" branch test:morphs test/feature test/stable add_text_in_repo() { REPO="$1" @@ -52,24 +52,24 @@ add_text_in_repo() { cd "$DATADIR/workspace/test/stable" "$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello "$SRCDIR/scripts/test-morph" edit hello-system stratum3 hello -add_text_in_repo "baserock:stratum2-hello" "xyzzy" -add_text_in_repo "baserock:stratum3-hello" "xyzzy" +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 -add_text_in_repo "baserock:stratum2-hello" "plugh" -add_text_in_repo "baserock:stratum3-hello" "plover" +add_text_in_repo "test:stratum2-hello" "plugh" +add_text_in_repo "test:stratum3-hello" "plover" # This should not be necessary, one day -cd "$DATADIR/workspace/test/stable/baserock:morphs" +cd "$DATADIR/workspace/test/stable/test:morphs" git commit --quiet --all --message "Commit refs for branch" -cd "$DATADIR/workspace/test/stable/baserock:external-strata" +cd "$DATADIR/workspace/test/stable/test:external-strata" git commit --quiet --all --message "Commit refs for branch" -cd "$DATADIR/workspace/test/feature/baserock:morphs" +cd "$DATADIR/workspace/test/feature/test:morphs" git commit --quiet --all --message "Commit refs for branch" -cd "$DATADIR/workspace/test/feature/baserock:external-strata" +cd "$DATADIR/workspace/test/feature/test:external-strata" git commit --quiet --all --message "Commit refs for branch" # Merge changes from test/feature to test/stable @@ -77,8 +77,8 @@ cd "$DATADIR/workspace/test/stable" "$SRCDIR/scripts/test-morph" merge test/feature || true # Check that the repos are all clean -for repo in "baserock:morphs" "baserock:external-strata" \ - "baserock:stratum2-hello" "baserock:stratum3-hello"; do +for repo in "test:morphs" "test:external-strata" \ + "test:stratum2-hello" "test:stratum3-hello"; do cd "$DATADIR/workspace/test/stable/$repo" git status --porcelain [ $(git rev-parse HEAD) = $(git rev-parse test/stable) ] diff --git a/tests.merging/conflict-chunks.stdout b/tests.merging/conflict-chunks.stdout index bf6d3828..01ae550f 100644 --- a/tests.merging/conflict-chunks.stdout +++ b/tests.merging/conflict-chunks.stdout @@ -1,4 +1,4 @@ -Merge conflicts in baserock:stratum2-hello: +Merge conflicts in test:stratum2-hello: conflict.txt -Merge conflicts in baserock:stratum3-hello: +Merge conflicts in test:stratum3-hello: conflict.txt diff --git a/tests.merging/conflict-morphology-kind.script b/tests.merging/conflict-morphology-kind.script index d8fcc6ef..235d8130 100755 --- a/tests.merging/conflict-morphology-kind.script +++ b/tests.merging/conflict-morphology-kind.script @@ -20,13 +20,13 @@ set -eu cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" checkout baserock:morphs master -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/unmergable +"$SRCDIR/scripts/test-morph" checkout test:morphs master +"$SRCDIR/scripts/test-morph" branch test:morphs test/unmergable -cd "$DATADIR/workspace/test/unmergable/baserock:morphs" +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" -cd "$DATADIR/workspace/master/baserock:morphs" +cd "$DATADIR/workspace/master/test:morphs" "$SRCDIR/scripts/test-morph" merge test/unmergable diff --git a/tests.merging/conflict-stratum-field-ordering.script b/tests.merging/conflict-stratum-field-ordering.script index 071d5204..3c1dce1c 100755 --- a/tests.merging/conflict-stratum-field-ordering.script +++ b/tests.merging/conflict-stratum-field-ordering.script @@ -36,19 +36,19 @@ 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 +"$SRCDIR/scripts/test-morph" branch test:morphs test/stable +cd test/stable/test:morphs git push --quiet origin test/stable # Create feature branch to merge FROM -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/feature test/stable +"$SRCDIR/scripts/test-morph" branch test: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 +cd test:morphs cat <<EOF > "hello-stratum.morph" { "name": "hello-stratum", @@ -56,14 +56,14 @@ cat <<EOF > "hello-stratum.morph" "chunks": [ { "name": "hello-runtime", - "repo": "baserock:hello", + "repo": "test:hello", "ref": "master", "morph": "hello", "build-depends": [] }, { "name": "hello-devel", - "repo": "baserock:hello", + "repo": "test:hello", "ref": "master", "morph": "hello", "build-depends": [] @@ -76,7 +76,7 @@ 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 +cd test:morphs cat <<EOF > "hello-stratum.morph" { "name": "hello-stratum", @@ -84,14 +84,14 @@ cat <<EOF > "hello-stratum.morph" "chunks": [ { "name": "hello-devel", - "repo": "baserock:hello", + "repo": "test:hello", "ref": "master", "morph": "hello", "build-depends": [] }, { "name": "hello-runtime", - "repo": "baserock:hello", + "repo": "test:hello", "ref": "master", "morph": "hello", "build-depends": [] diff --git a/tests.merging/conflict-stratum-field-ordering.stdout b/tests.merging/conflict-stratum-field-ordering.stdout index cce0973c..f55822a9 100644 --- a/tests.merging/conflict-stratum-field-ordering.stdout +++ b/tests.merging/conflict-stratum-field-ordering.stdout @@ -1,2 +1,2 @@ -Merge conflicts in baserock:morphs: +Merge conflicts in test:morphs: hello-stratum.morph diff --git a/tests.merging/from-branch-not-checked-out.script b/tests.merging/from-branch-not-checked-out.script index 2ead7f0f..a4661622 100755 --- a/tests.merging/from-branch-not-checked-out.script +++ b/tests.merging/from-branch-not-checked-out.script @@ -22,7 +22,7 @@ set -eu cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" checkout baserock:morphs master +"$SRCDIR/scripts/test-morph" checkout test:morphs master cd master # 'From' branch is not checked out (and also doesn't exist, but that diff --git a/tests.merging/move-chunk-repo.script b/tests.merging/move-chunk-repo.script index d2a59349..1e3befbd 100755 --- a/tests.merging/move-chunk-repo.script +++ b/tests.merging/move-chunk-repo.script @@ -29,32 +29,32 @@ fi # Create system branch. cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" branch baserock:morphs baserock/newbranch +"$SRCDIR/scripts/test-morph" branch test:morphs baserock/newbranch "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum 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). git clone -q "$DATADIR/hello" "$DATADIR/hello-lorried" -cd "$DATADIR/workspace/baserock/newbranch/baserock:morphs" -sed -e 's/"repo": "baserock:hello"/"repo": "baserock:hello-lorried"/' \ +cd "$DATADIR/workspace/baserock/newbranch/test:morphs" +sed -e 's/"repo": "test:hello"/"repo": "test:hello-lorried"/' \ -e 's/"ref": "baserock\/newbranch"/"ref": "master"/' \ -i hello-stratum.morph 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 -cd "$DATADIR/workspace/baserock/newbranch/baserock:hello-lorried" +cd "$DATADIR/workspace/baserock/newbranch/test:hello-lorried" touch newfile.txt git add newfile.txt git commit -m "Add new file" --quiet -cd "$DATADIR/workspace/baserock/newbranch/baserock:morphs" +cd "$DATADIR/workspace/baserock/newbranch/test:morphs" git commit -q --all -m "Update system branch refs" # Try to merge changes back to master (should fail, because we don't support # adding chunks inside branches yet). cd "$DATADIR/workspace" -"$SRCDIR/scripts/test-morph" checkout baserock:morphs master +"$SRCDIR/scripts/test-morph" checkout test:morphs master cd master "$SRCDIR/scripts/test-morph" merge baserock/newbranch diff --git a/tests.merging/rename-chunk.script b/tests.merging/rename-chunk.script index 06969b70..fb76491b 100755 --- a/tests.merging/rename-chunk.script +++ b/tests.merging/rename-chunk.script @@ -28,11 +28,11 @@ fi # Create system branch. cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" branch baserock:morphs baserock/newbranch +"$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 -cd baserock/newbranch/baserock:hello +cd baserock/newbranch/test:hello cat hello.morph | sed -e 's/"name": "hello"/"name": "goodbye"/' > goodbye.morph git rm -q hello.morph @@ -44,19 +44,19 @@ git add newfile.txt git commit -m "Add new file" --quiet # Update stratum to point at the renamed chunk -cd ../baserock:morphs +cd ../test:morphs sed -ie 's/"name": "hello"/"name": "goodbye"/' hello-stratum.morph git commit --all --quiet -m "Update morph refs for baserock/newbranch" # Merge changes back to master cd "$DATADIR/workspace" -"$SRCDIR/scripts/test-morph" checkout baserock:morphs master +"$SRCDIR/scripts/test-morph" checkout test:morphs master cd master "$SRCDIR/scripts/test-morph" merge baserock/newbranch # Morph should have realised that 'goodbye' is not a new chunk, # and pulled in the changes from 'hello' in the old branch -cd baserock:hello +cd test:hello [ ! -e hello.morph ] [ -e goodbye.morph ] [ -e newfile.txt ] diff --git a/tests.merging/rename-stratum.script b/tests.merging/rename-stratum.script index a7ba8699..64fb7e15 100755 --- a/tests.merging/rename-stratum.script +++ b/tests.merging/rename-stratum.script @@ -29,7 +29,7 @@ fi # Create system branch. cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" branch baserock:morphs baserock/newbranch +"$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 @@ -37,7 +37,7 @@ cd "$DATADIR/workspace" # Rename the stratum "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum -cd baserock/newbranch/baserock:morphs +cd baserock/newbranch/test:morphs sed -e 's/"morph": "hello-stratum"/"morph": "goodbye-stratum"/'\ -i hello-system.morph @@ -53,6 +53,6 @@ git commit -q --all -m "Rename hello-stratum to goodbye-stratum" # Merge changes back to master (this should fail, because we don't support # adding strata inside branches yet). cd "$DATADIR/workspace" -"$SRCDIR/scripts/test-morph" checkout baserock:morphs master +"$SRCDIR/scripts/test-morph" checkout test:morphs master cd master "$SRCDIR/scripts/test-morph" merge baserock/newbranch diff --git a/tests.merging/rename-stratum.stderr b/tests.merging/rename-stratum.stderr index ff408036..760501fc 100644 --- a/tests.merging/rename-stratum.stderr +++ b/tests.merging/rename-stratum.stderr @@ -1 +1 @@ -ERROR: goodbye-stratum.morph was not found in TMP/workspace/master/baserock:morphs at ref 804a475402fb6ded64a2749c7adf5b33c7c8ce1e +ERROR: goodbye-stratum.morph was not found in TMP/workspace/master/test:morphs at ref 48d38ef3f39857d7dba4ed1ffc51653c6bed4906 diff --git a/tests.merging/setup b/tests.merging/setup index f075e7b1..c0dfd969 100755 --- a/tests.merging/setup +++ b/tests.merging/setup @@ -29,7 +29,7 @@ source "$SRCDIR/scripts/fix-committer-info" # Create a morph configuration file cat <<EOF > "$DATADIR/morph.conf" [config] -repo-alias = baserock=file://$DATADIR/%s#file://$DATADIR/%s +repo-alias = test=file://$DATADIR/%s#file://$DATADIR/%s cachedir = $DATADIR/workspace/.morph/cache log = $DATADIR/morph.log keep-path = true @@ -58,7 +58,7 @@ cat <<EOF > "$DATADIR/morphs/hello-system.morph" "strata": [ { "morph": "hello-stratum", - "repo": "baserock:morphs", + "repo": "test:morphs", "ref": "master" } ] @@ -72,7 +72,7 @@ cat <<EOF > "$DATADIR/morphs/hello-stratum.morph" "chunks": [ { "name": "hello", - "repo": "baserock:hello", + "repo": "test:hello", "ref": "master", "build-depends": [] } diff --git a/tests.merging/warn-if-merging-petrified-morphologies.script b/tests.merging/warn-if-merging-petrified-morphologies.script index 12e726ed..a81c0237 100755 --- a/tests.merging/warn-if-merging-petrified-morphologies.script +++ b/tests.merging/warn-if-merging-petrified-morphologies.script @@ -21,12 +21,12 @@ set -eu cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" checkout baserock:morphs master -"$SRCDIR/scripts/test-morph" branch baserock:morphs test/petrified +"$SRCDIR/scripts/test-morph" checkout test:morphs master +"$SRCDIR/scripts/test-morph" branch test:morphs test/petrified -cd "$DATADIR/workspace/test/petrified/baserock:morphs" +cd "$DATADIR/workspace/test/petrified/test:morphs" "$SRCDIR/scripts/test-morph" petrify git commit --quiet --all -m "Petrify branch" -cd "$DATADIR/workspace/master/baserock:morphs" +cd "$DATADIR/workspace/master/test:morphs" "$SRCDIR/scripts/test-morph" merge test/petrified |