summaryrefslogtreecommitdiff
path: root/tests.branching
Commit message (Collapse)AuthorAgeFilesLines
* Make morph show-branch-root print the pathRichard Maw2014-08-126-93/+0
| | | | | | | | | The help for the show-branch-root command said it returns a path, but the command and the yarns just showed the aliased url it was cloned from. Given I found myself needing the path in some scripts, not the repo url, I think it's more useful to reconcile the difference this way.
* Remove petrify and unpetrify commandsRichard Maw2014-08-126-193/+0
| | | | | | | We don't use this any more, and instead prefer to always keep definitions.git petrified, and update the refs ourselves. branch-from-image still uses some of the remaining petrify code.
* Exorcise some old and unused commandsRichard Maw2014-07-076-145/+0
| | | | | | | | | | | | | `morph merge` only worked for a small subset of cases, and has been left to bit-rot, since we don't use it. `morph tag` is just a `git tag` when we have petrified definitions repository. We don't use it, nor do we need it, so it can go away rather than take up valuable development time fixing it when requirements change. `old-foo` have all been superceded by newer versions and are no-longer used.
* Fix tests for new `morph edit` syntaxPaul Sherwood2014-06-0912-19/+16
|
* Remove morph tag cmdtestsRichard Maw2014-03-144-177/+0
| | | | | | | | They hard-code the expected sha1, so break the test suite for anything but x86_64. If we decide tag has a place in the new world order, yarns can be made, but until then, we're better off without these tests.
* Use morph print-architecture to generate morphologiesRichard Maw2014-03-141-1/+1
| | | | | uname tends to only give us a valid morph architecture on x86_64, this makes it work on other architectures.
* Fix paths for chunk directories in cmdtestsLars Wirzenius2014-03-0622-113/+129
|
* cmdtests: Use new morphology field orders in tag testsRichard Maw2014-02-172-8/+8
|
* cmdtests: Update to use new orderingRichard Maw2014-02-177-74/+71
|
* Warn and default to null if repo or ref are givenRichard Maw2014-02-134-43/+6
| | | | | | | | | | | | | | | | | | This now means that the system morphology is not altered when chunks are altered, so some tests had to change. Since this uses the python warnings API, these warnings can be ignored by running python -W ignore:"stratum morphology" \ -W ignore:"system morphology" \ "$(which morph)" ...` or turned into errors with python -W error:"stratum morphology" \ -W error:"system morphology" \ "$(which morph)" ...`
* Don't use repo or ref in test suiteRichard Maw2014-02-131-3/+1
|
* Remove edit-updates-stratum-build-depends testRichard Maw2014-02-122-95/+0
| | | | | | | | | | This test stopped being fit for purpose after an accidental edit made it no longer check the stratum build depends. However, rather than fixing it, it should be removed, since we're changing morph's behaviour to not support morphologies in different repositories, which means that updating these refs is no longer necessary.
* Remove test for tagging with multiple morphs reposRichard Maw2014-02-122-289/+0
| | | | | We don't support this any more, it makes morphologies complicated to implement and reason about.
* Merge remote-tracking branch 'origin/danielfirth/RT189'Lars Wirzenius2013-10-087-52/+22
|\ | | | | | | Changed the error (exception) to list all obsolete fields.
| * Dropped support for 'system-kind' from system morphology filesDan Firth2013-09-277-49/+20
| |
| * Dropped support for 'disk-size' from system morphology files'Dan Firth2013-09-272-9/+8
| |
* | Fix test suite to work with current gitLars Wirzenius2013-10-082-5/+5
|/ | | | | Reviewed-by: Dan Firth Reviewed-by: Richard Maw
* tests.branching: Add build after petrify testRichard Maw2013-09-241-0/+31
| | | | | | | | This was missing from the test suite, and allowed a broken petrify to slip through. This was not added to the set of yarns, since they do not currently have any build tests.
* tests.branching: Make defined systems buildableRichard Maw2013-09-242-2/+2
|
* Merge branch 'baserock/richardmaw/S8717/refactor-petrify-v4'Richard Maw2013-09-163-10/+17
|\ | | | | | | | | | | | | | | Reviewed-by: Lars Wirzenius Reviewed-by: Daniel Silverstone Daniel gave his +1 with the caveat that he would like tests for petrifying a system branch other than master.
| * b&m: re-implement morph unpetrifyRichard Maw2013-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This also undoes the test suite change to keep it using the old petrify. Petrify and Unpetrify have the same structure: 1. Set up 2. Load all the morphologies 3. Make changes to the morphologies 4. Write back any changes This suggests some re-use in the form of passing a function callback to a morphology visitor.
| * b&m: Re-implement morph petrifyRichard Maw2013-09-051-1/+1
| | | | | | | | | | This includes amending the test suite to use the old petrify, since the old unpetrify depends on some implementation details of it.
| * MorphSet: keep old ref as unpetrify-refRichard Maw2013-09-053-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes petrify much simpler, since adding unpetrify-ref is handled by MorphSet. This has the side-effect of adding unpetrify-ref when editing, but this information is also useful for this use-case. The edit tests now have different diffs and commits, so those have been updated. Also, the old merge code currently warns that now there appears to be petrified changes, since it detects if a branch is petrified by the presence of the unpetrify-ref field, even though the ref is not a SHA1. The old code does not handle undoing an edit the new way, so I did not feel it was worth attempting to comprehend it to fix this bug, which will be later fixed by the introduction of the new merge code.
* | foreach: sort repositories asciibeticallyRichard Maw2013-09-164-17/+17
|/ | | | | | | | | | | | | | | | | | | The test suite checks the output of the foreach command, this requires repositories to be returned in a stable order. The order returned from os.listdir differs by the filesystem used. btrfs returns roughly in insertion order, tmpfs alphabetically. This allowed the failure to sort pass through unchecked, since I was testing on btrfs, but people discovered issues when using /tmp, which is a tmpfs. To fix this, foreach sorts the result of list_git_directories() by directory name. The previous code would always return the root repository first, this was a unnecessary complication, so now everything is returned asciibetically and the tests amended to reflect this.
* b&m: Re-implement morph foreachRichard Maw2013-09-045-0/+9
| | | | | | | | | | | | | | The previous version attempted to separate the output of the commands run with newlines by printing a newline at the beginning if it wasn't the first repository. The check it used was for the first repository was flawed by assuming that the root repository was the first repository processed. Since the complication was not worth keeping the output identical, it has been changed to separate by printing a newline after every command and the test output has been amended to include the extra trailing newline.
* edit: Unset defaults before writingRichard Maw2013-08-304-56/+25
| | | | | | | | This also amends the test suite. The git apply command to alter the stratum proved inflexible when anything changed, so it has been replaced by a small in-line python script.
* Revert "Merge branch 'liw/restore-old-cmds'"Richard Maw2013-08-298-9/+9
| | | | | | | | | | | | | | | This reverts commit 2dc382a2a9ae977b1158002cd2631ec5593959c1, reversing changes made to 89a019af088ff62459699a6efdadf8ac8fe35dd9. We decided to restore the old commands for the release, as we weren't confident the new implementations were correct yet. To gain that confidence we need to use them, so the old versions are no longer available, and the new edit code is used when the edit subcommand is invoked. Doing so also requires the test suite to use the edit command instead of new-edit.
* tests: Make dummy strata pass validationRichard Maw2013-08-2310-78/+139
| | | | | They were missing build depends or were empty. Now that edit does validation, this is not permitted.
* Use new edit instead of old one in testsLars Wirzenius2013-08-198-12/+12
| | | | | | | The test suite got adapted so it requires the new edit instead of the old one. So use the new edit instead of the old one in the test. This is a kluge, and needs to be reverted after the BR10 release.
* Disable tests broken by "morph edit"Lars Wirzenius2013-08-141-1/+1
| | | | | | | | | | | | | | To the best of my ability to understand the old "morph build" code, these tests fail with this error: Conflicting versions of stratum 'hello-stratum' appear in the build. because of how the old "morph build" code creates temporary build refs, and gets them wrong. I believe the new "morph edit" is correct, but have not been able to find out what the root problem in "morph build" is, because the code is beyond my ability to understand it within two hours. Since I have a deadline for "morph edit", I reluctantly disable these tests, temporarily, rather than back out of all "morph edit" changes.
* Disable test cases (lack of time, may not need feature)Lars Wirzenius2013-08-143-2/+19
| | | | | | | We don't know if we want to support keeping system and stratum morphologies in different git repositories, and adding the support is too much work for this deadline. I'm keeping the tests, but disabling them, in case we want to enable it again.
* Fix test suite to patch YAML instead of JSONLars Wirzenius2013-08-1414-430/+347
| | | | | | | | | | | | | I shouldn't be doing this in the middle of refactoring, but trying to get the new code to emit exactly the right kind of JSON is too much pain, and these tests need to be rewritten to use YAML in the near future anyway (we'll drop JSON support eventually), so I don't want to spend more time on this than necessary. The changes in this commit convert morphologies in JSON to YAML, and fix test code that modifies the morphologies to work with the YAML. There is probably more JSON lurking about.
* Disable workflow-petrify testLars Wirzenius2013-07-032-225/+0
| | | | | | | | | The (modified) petrify code does not handle strata in different git repositories, but works well enough for us to use it releases, and our releases don't need strata in different repos. The code needs to be re-thought starting from requirements. For now, it's enough to get the test suite to pass, so disabling the tests is good enough, even if not great.
* Fix the petrify-no-double-petrify test caseLars Wirzenius2013-07-031-0/+1
|
* Fix test case for petrifyLars Wirzenius2013-07-032-2/+5
|
* tests: don't put cachedir in the workspaceRichard Maw2013-06-057-21/+1
| | | | | | This was a wild idea when we first designed the branch structure. It causes more problems than it's worth as you may have multiple workspaces, and it needed to be set manually in the first place.
* Fix tests to use rootfs-tarball system-kinds, instead of disksLars Wirzenius2013-04-238-19/+19
|
* Fix tests to match new outputLars Wirzenius2013-03-273-3/+6
| | | | Self-review.
* Add 'build-mode' field for chunks in a stratumSam Thursfield2013-03-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Allowed values: staging: build with a staging chroot (default) test: build with the host's tools bootstrap: build with the host's tools, and do not include this chunk in the final stratum artifact In the past, 'normal mode' has been used to describe building a chunk with the host's tools. We don't want that mode to ever be used, because it is a huge hole in reproducability, but we need to keep it around to avoid making Morph's cmdtest suite depend on Baserock. Hopefully naming it 'test' should discourage potential abusers. It is unfortunate that the build tests now take a separate code path compared to real-world usage of Morph. However, this is necessary to avoid a circular dependency between Morph's test suite and the build-essential stratum in Baserock. We do whole-build testing of Baserock, too, so the 'staging' code path is still tested outside of Morph. However, testing a staging area requires populating it with at minimum a working shell, and this is a bit too complex to go in Morph's test suite.
* Remove features used by old bootstrap methodSam Thursfield2013-03-131-2/+1
| | | | | | That means that bootstrapping Baserock is currently not possible with this branch of Morph, but there's no reason it cannot be bootstrapped using an older version of Morph instead.
* Add test for adding a chunk then editing itRichard Maw2013-03-073-0/+102
| | | | | | This works sub-optimally, `morph edit $system $stratum` needs to be done first as `morph edit $system $stratum $chunk` fails if $chunk is not defined in the parent branch.
* 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