| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Changed the error (exception) to list all obsolete fields.
|
| | |
|
| | |
|
|/
|
|
|
| |
Reviewed-by: Dan Firth
Reviewed-by: Richard Maw
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
This includes amending the test suite to use the old petrify, since the
old unpetrify depends on some implementation details of it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
They were missing build depends or were empty.
Now that edit does validation, this is not permitted.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Self-review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This output varies depending on the version of git, which currently
causes the test to fail on systems with git 1.7.10.
|
|
|
|
| |
The pattern is COMMAND-assertion, not morph-COMMAND-assertion.
|
|
|
|
|
| |
tests.branching/edit-uses-ref-from-stratum tests behaviour that is
already verified by tests.branching/edit-clones-chunk
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
| |
As we use ordererdict for python < 2.7 as well
See 37f8d84d7ab356169bf7c04bdecb39a61b85c88d
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| | |
into baserock/merge-queue
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Be consistent about placement of test description, blank lines, etc.
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| | |
git://git.baserock.org/baserock/morph
|
| |
| |
| |
| |
| | |
Currently the message is still displayed "Updating xxx" but no
update is actually done.
|
|\ \
| |/
| |
| | |
git://git.baserock.org/baserock/morph
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
| |
Merge is by far the most complex of the branching and merging commands.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| | |
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
|