diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-02-14 10:22:46 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-02-14 10:22:46 +0000 |
commit | 8f8fc96b884e7f175d4a01bc2d91452d7149bf33 (patch) | |
tree | d0d19252c154fb030f7dfa1c4784ef60e45bc40e /yarns | |
parent | 2decdcdd27567e99e3bc53347d34064ab34f7932 (diff) | |
parent | fbf70e2e5595d0cc7edaf7240a732cc5d2632c34 (diff) | |
download | morph-8f8fc96b884e7f175d4a01bc2d91452d7149bf33.tar.gz |
Merge branch 'baserock/richardmaw/S10310/invalid-repo-ref-v2'
Reviewed-by: Sam Thursfield
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/branches-workspaces.yarn | 78 | ||||
-rw-r--r-- | yarns/implementations.yarn | 21 | ||||
-rw-r--r-- | yarns/morph.shell-lib | 7 | ||||
-rw-r--r-- | yarns/regression.yarn | 2 | ||||
-rw-r--r-- | yarns/splitting.yarn | 2 |
5 files changed, 4 insertions, 106 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn index b928f628..15d31cb1 100644 --- a/yarns/branches-workspaces.yarn +++ b/yarns/branches-workspaces.yarn @@ -187,21 +187,14 @@ all the refs are unchanged. GIVEN a workspace AND a git server WHEN the user creates a system branch called foo - THEN in branch foo, system test-system refs test-stratum in master - AND in branch foo, stratum test-stratum refs test-chunk in master - -Then edit the stratum. - - WHEN the user edits the stratum test-stratum in the system test-system in branch foo - THEN in branch foo, system test-system refs test-stratum in foo + THEN in branch foo, stratum test-stratum refs test-chunk in master Edit the chunk. We make use of special knowledge here: `test:test-chunk` is a chunk repository created in the mocked git server, for testing purposes. WHEN the user edits the chunk test-chunk in the stratum test-stratum in the system test-system in branch foo - THEN in branch foo, system test-system refs test-stratum in foo - AND in branch foo, stratum test-stratum refs test-chunk in foo + THEN in branch foo, stratum test-stratum refs test-chunk in foo AND the edited chunk test:test-chunk has git branch foo Morph edit should only work with a system argument. @@ -228,9 +221,7 @@ repositories referenced in the system branch. THEN morph reports no outstanding changes in foo WHEN the user edits the stratum test-stratum in the system test-system in branch foo - THEN morph reports changes in foo in test:morphs only - - WHEN the user edits the chunk test-chunk in the stratum test-stratum in the system test-system in branch foo + AND the user edits the chunk test-chunk in the stratum test-stratum in the system test-system in branch foo THEN morph reports changes in foo in test:morphs only WHEN creating file foo in test:test-chunk in branch foo @@ -300,69 +291,6 @@ Creating a tag twice should fail. WHEN the user attempts to tag the system branch called foo as test123 THEN morph failed -Working with null repositories and refs ---------------------------------------- - -It is convenient to not explicitly name the repository and branch of -a stratum morphology, instead assuming it is the same as the current -morphology. - -These can be checked out like normal system branches. - - SCENARIO check out an existing system branch with null refs - GIVEN a workspace - AND a git server - AND null refs for local strata - WHEN the user checks out the system branch called master - THEN the system branch master is checked out - -Likewise we can also create new system branches from these, and we -wouldn't need to worry about changing the system branch ref. - - - SCENARIO branch off a system branch with null refs - GIVEN a workspace - AND a git server - AND null refs for local strata - WHEN the user creates a system branch called foo - THEN the system branch foo is checked out - -When we edit a morphology with null refs, they stay null. - - SCENARIO editing with null refs - GIVEN a workspace - AND a git server - AND null refs for local strata - -When creating the branch, the refs remain null. - - WHEN the user creates a system branch called foo - THEN in branch foo, system test-system refs test-stratum in None - -After editing the stratum they remain null. - - WHEN the user edits the stratum test-stratum in the system test-system in branch foo - THEN in branch foo, system test-system refs test-stratum in None - -Refs to chunks are still altered as usual - - WHEN the user edits the chunk test-chunk in the stratum test-stratum in the system test-system in branch foo - THEN in branch foo, system test-system refs test-stratum in None - AND in branch foo, stratum test-stratum refs test-chunk in foo - AND the edited chunk test:test-chunk has git branch foo - -Petrifying also leaves null refs unmolested - - SCENARIO morph petrifies null refs - GIVEN a workspace - AND a git server - AND null refs for local strata - WHEN the user creates a system branch called foo - AND the user pushes the system branch called foo to the git server - AND remembering all refs in foo - AND petrifying foo - THEN in branch foo, system test-system refs test-stratum in None - Generating a manifest works SCENARIO morph generates a manifest diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index b4d8e7ce..2a46dfa2 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -78,8 +78,6 @@ another to hold a chunk. arch: $arch strata: - name: test-stratum - repo: test:morphs - ref: master morph: test-stratum EOF @@ -293,8 +291,6 @@ have a morphology using the test architecture. kind: stratum build-depends: - morph: build-essential - ref: master - repo: test:morphs chunks: - name: test-chunk repo: test:test-chunk @@ -312,12 +308,8 @@ have a morphology using the test architecture. name: $MATCH_1 strata: - name: build-essential - repo: test:morphs - ref: master morph: build-essential - name: core - repo: test:morphs - ref: master morph: core EOF @@ -326,17 +318,6 @@ have a morphology using the test architecture. run_in "$DATADIR/gits/morphs" git add "$MATCH_1.morph" run_in "$DATADIR/gits/morphs" git commit -m "Added $MATCH_1 and strata morphologies." -Morphologies need to support having a null ref, which means look for the -stratum in the same repository and ref. Testing this requires different -morphologies. - - IMPLEMENTS GIVEN null refs for local strata - nullify_local_refs test:morphs master \ - "$DATADIR/gits/morphs/test-system.morph" \ - "$DATADIR/gits/morphs/test-stratum.morph" - run_in "$DATADIR/gits/morphs" git add . - run_in "$DATADIR/gits/morphs" git commit -m "Use null refs." - Implementation sections for system branch operations ---------------------------------------------------- @@ -469,8 +450,6 @@ print-architecture` to get a value appropriate for morph. name: $MATCH_1 strata: - name: test-stratum - repo: test:morphs - ref: master morph: test-stratum EOF diff --git a/yarns/morph.shell-lib b/yarns/morph.shell-lib index 66abd076..31dcc7af 100644 --- a/yarns/morph.shell-lib +++ b/yarns/morph.shell-lib @@ -3,7 +3,7 @@ # The shell functions in this library are meant to make writing IMPLEMENTS # sections for yarn scenario tests easier. -# Copyright (C) 2013 Codethink Limited +# Copyright (C) 2013-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 @@ -152,11 +152,6 @@ assert_morphologies_are_petrified() } -nullify_local_refs() -{ - "$SRCDIR/scripts/nullify-local-refs" "$@" -} - # Currently, yarn isn't setting $SRCDIR to point at the project source # directory. We simulate this here. diff --git a/yarns/regression.yarn b/yarns/regression.yarn index 71431ff7..d8eedea2 100644 --- a/yarns/regression.yarn +++ b/yarns/regression.yarn @@ -77,8 +77,6 @@ Implementations arch: $arch strata: - morph: bootstrap-stratum - repo: test:morphs - ref: master EOF cat << EOF > "$DATADIR/gits/morphs/bootstrap-stratum.morph" diff --git a/yarns/splitting.yarn b/yarns/splitting.yarn index 40da5fb4..3da397f5 100644 --- a/yarns/splitting.yarn +++ b/yarns/splitting.yarn @@ -158,8 +158,6 @@ Implementations arch: $(run_morph print-architecture) strata: - name: test-stratum - repo: test:morphs - ref: master morph: test-stratum artifacts: - test-stratum-runtime |