summaryrefslogtreecommitdiff
path: root/tests.branching
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright yearsSam Thursfield2013-01-224-4/+4
|
* Remove needless git output from test resultSam Thursfield2013-01-222-14/+4
| | | | | This output varies depending on the version of git, which currently causes the test to fail on systems with git 1.7.10.
* Rename morph tag tests to follow patternSam Thursfield2013-01-229-0/+0
| | | | The pattern is COMMAND-assertion, not morph-COMMAND-assertion.
* Remove superfluous testSam Thursfield2013-01-222-33/+0
| | | | | tests.branching/edit-uses-ref-from-stratum tests behaviour that is already verified by tests.branching/edit-clones-chunk
* Merge branch 'jjardon/python_compatibility_fixes' of ↵Richard Maw2013-01-216-24/+6
|\ | | | | | | | | | | | | | | | | | | ssh://git.baserock.org/baserock/baserock/morph This includes the following fixups: - altering the bootstrap script to install ordereddict and simplejson. - Adding a comment to clarify that it is intentional to use simplejson if collections does not have OrderedDict - Amending the copyright years to include 2013
| * tests.branching/*: Remove check to run only the teset with Python 2.7Javier Jardón2013-01-186-18/+0
|/ | | | | As we use ordererdict for python < 2.7 as well See 37f8d84d7ab356169bf7c04bdecb39a61b85c88d
* morph edit: Update build-depends that refer to the edited stratumSam Thursfield2012-12-182-0/+125
| | | | | | | The code took some refactoring. The core functionality is now all inside one function with make_available() separate, as this is used other places. The code is still far from perfect, but will hopefully be rewritten to use the new abstractions of system branches etc. soon
* Drop committer info from git tag environment; update tag test outputsJannis Pohlmann2012-12-177-22/+30
| | | | | | | | | | | The committer information in the environment used to run git in morph tag is not needed. In morph build it makes sense as morph commits without the user knowing. With morph tag, it's the user that decides to create the commit and tag. There is something weird going on, where morph tag may end up generating commits with different SHA1s on different machines. The full log output in the morph tag tests might help investigate what happens.
* Merge remote-tracking branch 'remotes/origin/samthursfield/ambiguous-refs' ↵Jannis Pohlmann2012-12-131-2/+4
|\ | | | | | | into baserock/merge-queue
| * Always use `git rev-parse --verify` to resolve refsSam Thursfield2012-12-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously some code used `git show-ref`, which is wrong -- given two refs named 'alpha/master' and 'master', `git show-ref master` will return both, sorted alphabetically. This can lead to build failures, etc. due to refs resolving to the wrong SHAs. We should also use `git rev-parse --verify` to verify SHA1s, which we previously did with `git rev-list`. Finally, `git rev-parse --verify` is more than twice as fast as `git show-ref`.
* | Fix bashism in morph tag test scriptsJannis Pohlmann2012-12-134-4/+4
| |
* | Add an initial implementation of "morph tag"Jannis Pohlmann2012-12-139-0/+530
|/ | | | | | | | | | | | | | | | | | | | | | | | | | In order to make releases and freeze system branches entirely, we need to be able to 100% petrify a system branch (that is, resolve ALL refs into SHA1s) and tag this state to be able to check it out again later. This is essentially what "morph tag" does. It takes a tag name and an arbitrary amount of arguments to "git tag", petrifies all morphologies of the current system branch behind the scenes, creates a dangling commit and attaches an annotated tag to it. Petrifying in this case means that all refs used for chunks are resolved into commit SHA1s. For stratum and system morphologies, the refs are replaced by the name of the tag that's being created. The "tag" command also supports tagging when stratum morphologies are spread across multiple repositories. In this case, it will include all statum morphologies from other repos in the tag commi in the branch root repo. The references to these morphologies are updated so that they point to the branch root repo and the tag being created. This commit also adds a few tests for "morph tag" to verify that all this works.
* Tidy up command testsSam Thursfield2012-11-1442-97/+132
| | | | Be consistent about placement of test description, blank lines, etc.
* Consolidate checks for python versionRichard Maw2012-11-135-27/+7
| | | | | | | | Most of the bespoke logic for the version check is unnecessary, since the output to display can be easily inferred from the filename. This fixes some test failures where the version check would cat a file to fake the output, but fail because the file was removed.
* Merge branch 'samthursfield/build-without-push' of ↵Richard Maw2012-11-126-11/+0
|\ | | | | | | git://git.baserock.org/baserock/morph
| * Avoid caching repos that are on the local machine anywaySam Thursfield2012-11-126-11/+0
| | | | | | | | | | Currently the message is still displayed "Updating xxx" but no update is actually done.
* | Merge branch 'samthursfield/test-tidying' of ↵Richard Maw2012-11-1255-207/+207
|\ \ | |/ | | | | git://git.baserock.org/baserock/morph
| * tests: Use test: URL prefix instead of baserock: throughoutSam Thursfield2012-11-0755-207/+207
| | | | | | | | | | | | | | | | | | | | 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.
* | Fix spelling mistakesSam Thursfield2012-11-121-1/+1
|/
* Split merge tests out from the other branching testsSam Thursfield2012-10-2928-764/+3
| | | | Merge is by far the most complex of the branching and merging commands.
* Simplify checkout-non-aliased-repos testRichard Maw2012-10-262-44/+2
| | | | | | | | | | The output of the list-tree depended on the value of TMPDIR. Instead we replace this with a test that the required directory exists. merge-with-stratum-renamed also fails with a TMPDIR different to /tmp, but I have no idea why. Signed off by Daniel Silverstone in person
* Merge branch 'samthursfield/morph-status-in-workspace-sorted'Sam Thursfield2012-10-181-1/+1
|\ | | | | | | Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
| * morph status: Sort list of system branches in a workspaceSam Thursfield2012-10-181-1/+1
| | | | | | | | | | Output needs to be stable, not least so that the test doesn't fail sporadically.
* | morph petrify: Avoid petrifying chunks that have already been editedSam Thursfield2012-10-184-5/+91
|/ | | | | | | | | | | | | This change causes 'morph petrify' to avoid petrifying any chunk whose ref matches the current system branch, because it makes no sense to petrify something that is also being edited. It also improves efficiency slightly and adds warning where different systems point to different refs of the same stratum. A non-obvious effect of this is that if you try to petrify 'master', many of the chunks won't get petrified because they are built from 'master'. However, petrifying master makes no sense so I'm not sure that we need to worry.
* morph status: Add initial version of commandSam Thursfield2012-10-126-0/+106
| | | | This provides a user-friendly summary of the workspace or branch status.
* Merge remote-tracking branch ↵Daniel Silverstone2012-10-114-1/+36
|\ | | | | | | | | | | 'origin/samthursfield/S4873-warn-when-merge-causes-petrification' Renamed petrification test slightly as merge fixup.
| * Add test for petrify warningSam Thursfield2012-10-112-0/+33
| |
| * morph merge: Warn if a merge will cause unexpected petrificationSam Thursfield2012-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The concept of a component path is new. This is simply a concise way of referring to a component in an error message, and looks like this: base-system-x86_64-generic.bsp-x86_64-generic.linux We currently only touch the 'edited chunks' in merge_stratum(), i.e. those in the FROM branch where 'morph edit' was run. However, the petrification can affect any chunk so there is a new method added to obtain all components in a morphology. This function also returns the differences between the two, which we will make use of at a later date.
| * Fix test that should have been doing 'morph edit'Sam Thursfield2012-10-111-0/+2
|/
* morph foreach: Handle repos addressed by full URLs correctlySam Thursfield2012-10-102-0/+30
| | | | | | | | | | This should not normally be used, because we make no attempt to detect when a full URL and a keyed URL are equivalent, so they cannot be used interchangably. However, 'foreach' would previously fail completely if the branch root happened to be a full URL because it didn't call convert_uri_to_path() correctly.
* Handle submodules in 'morph edit'Sam Thursfield2012-10-032-0/+71
| | | | | | | | | | | | | | | | We often have .gitmodules edited to contain a URI such as upstream:gnulib, so that we can transparently mirror these in different locations. It would be nice to set up git url.insteadOf rules to expand these for the submodules, but 'git submodule update' uses 'git clone' to fetch them, which will not take into account the configuration of the parent repository. Instead, we set up the submodules automatically and rewrite the URLs directly in the configuration. The user will need to recreate their system branch checkouts if their URL configuration changes, or update the URLs manually, but that should not happen often.
* Fix after reviewSam Thursfield2012-10-032-1/+1
|
* morph merge: Rework how we interact with gitSam Thursfield2012-10-036-24/+9
| | | | | | | | | | | | | Upsides: - clearer error messages on conflicts (we no longer dump the git output) - merge base is available during morphology merging - we no longer need to go through the complexity of implementing a git merge driver We now manually fetch and then merge, instead of using git pull. This is not strictly necessary, but it makes it clearer in the code how FETCH_HEAD is involved in the process.
* Use origin/ref for all refs other than the system branch ref itselfSam Thursfield2012-10-031-0/+49
| | | | | | | | | | The rationale here is that inside a checkout of a system branch, the user should only be committing to the refs for that system branch, because those are the only ones that 'morph merge' will look at. This removes a problem where we could be confused by a ref with a name that would be sorted before 'master' in the result of 'git show-ref'.
* Remove obsolete merging hack from merge conflict testSam Thursfield2012-09-271-12/+0
| | | | | | Previously we had to manually use git merge to resolve the ref conflicts in the morphologies, but the morphology merge driver now takes care of them.
* morph merge: Use a special git merge driver for morphology filesSam Thursfield2012-09-273-5/+6
| | | | | | | | | | We now have a two-stage merge process. Stage one only runs if there are changes in both branches on the same file. At the end of stage one we assume that all the components that were edited in the FROM branch still have their 'ref' field set to the FROM branch. Morph then iterates through these repositories, performing a merge in each one, and then updates the refs in the morphologies again with the correct target branches.
* Remove dead code from the end of testSam Thursfield2012-09-271-20/+1
| | | | | This code made no sense, but since the previous command was expected to fail it didn't have any effect on the test.
* morph merge: Error message wranglingSam Thursfield2012-09-272-2/+2
| | | | | These do need to be quite clear, because merge failures will happen a lot and we are relatively unhelpful at the moment.
* Fix merge tests on Squeeze, by disabling them correctlySam Thursfield2012-09-274-1/+18
|
* Add merge conflict testsSam Thursfield2012-09-258-0/+239
|
* Disable tests on Debian Squeeze that require Python 2.7Sam Thursfield2012-09-245-1/+28
| | | | | Our non-destructive morphology editing requires at least Python 2.7, which is not available on Squeeze.
* Test that 'petrify' is safe against multiple invocationsSam Thursfield2012-09-212-0/+54
| | | | | Make sure we don't lose the 'unpetrify-ref' field in this case, or unpetrify will break.
* Add petrify/unpetrify workflow testSam Thursfield2012-09-214-112/+355
| | | | Split out the external strata scripts to share between workflow tests.
* Add 'morph unpetrify'Sam Thursfield2012-09-212-0/+21
| | | | Tested in the petrify test, to avoid duplication.
* morph petrify: Rewrite in the style of todaySam Thursfield2012-09-212-3/+3
|
* morph foreach: Fix with cliapp < 1.20120630Sam Thursfield2012-09-211-1/+1
| | | | | | Use cliapp.Application.runcmd_unchecked() instead of runcmd() to get the full command output, without requiring AppException.msg (which is an inferior way to get the output in any case)
* Update branching tests to use 'morph foreach'Sam Thursfield2012-09-174-31/+27
|
* Add failure test for 'morph foreach'Sam Thursfield2012-09-174-0/+32
|
* tests.branching: Make workflow test to use system branches moreSam Thursfield2012-09-171-9/+39
| | | | | We now add the strata in one branch, merge, and then make the changes in another.
* tests.branching: Add complex merge testsSam Thursfield2012-09-1711-0/+265
| | | | | | | | | | | | * Spot completely unmergable cases * Make sure that changes in a chunk repo are merged to the back to that chunk's original ref, which is not necessarily the same as the TO system branch. * Test renaming a chunk (works fine if repo is the same) * Try adding a new chunk or stratum and editing it too.