summaryrefslogtreecommitdiff
path: root/yarns
Commit message (Collapse)AuthorAgeFilesLines
* Add `morph upgrade` command, deprecate `morph deploy --upgrade`Sam Thursfield2014-09-012-2/+2
| | | | | | The arguments to `morph deploy` can get quite long, any way we can make it shorter and clearer is useful. We can also avoid having the strange --no-upgrade flag in future.
* yarns: Use a more realistic simulation of a git serverbaserock/richardmaw/yarn-git-daemonRichard Maw2014-08-287-11/+62
| | | | | | | | | | | Previously we would use file: URIs to point to the git repositories. This was fast and simple, but had the drawback that it bypassed all the git cache logic, so changes to the git cache weren't adequately covered by the test suite. Now we spool up a simulated git server per scenario, and shut it down at the end.
* Add yarn for building uncommitted changesRichard Maw2014-08-281-1/+33
| | | | This replaces an old cmdtest.
* yarns: Use run_morph for pushing branchesRichard Maw2014-08-281-1/+2
| | | | We're using the wrong morph if we don't use run_morph
* Fix `morph edit` when repo has the same ref as system branchRichard Maw2014-08-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | There was a check in it to see whether it needed to do the git branch and git checkout based on whether the name of the branch matched that in the morphology. This had a couple of problems: 1. Now that we aren't always building from HEAD, we need to be able to roll its commit back, so using the existing branch isn't always the best idea. 2. It only checks the "ref" field, not "unpetrify-ref", so even though we clone the right ref in there, it's checking the commit id against the system branch name, so would always try to re-create the branch, and fail when it already exists. So now, we remove the original ref and re-create it with our preferred HEAD. A better solution might be to change the clone logic to not automatically checkout HEAD, and instead require an explicit branch then checkout, but the initial clone logic is shared with build, and I didn't feel like tracking down all the different places that it was used.
* Make morph show-branch-root print the pathRichard Maw2014-08-122-6/+6
| | | | | | | | | 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.
* yarns: Start from petrified refsRichard Maw2014-08-124-30/+36
| | | | | | | | | This is closer to our current workflow, where we are always petrified and update the ref field when we need to update a component. This required rearranging the operations to create the chunk repository before the definitions repository, and remove a check that assumes we weren't already petrified.
* Remove petrify and unpetrify commandsRichard Maw2014-08-122-83/+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.
* Merge remote-tracking branch ↵Richard Maw2014-08-123-7/+246
|\ | | | | | | | | | | 'origin/baserock/richardmaw/S11416/no-unnecessary-temp-branches' Reviewed-by: Daniel Silverstone
| * Add yarns for checking the state of temporary build branchesbaserock/richardmaw/S11416/no-unnecessary-temp-branchesRichard Maw2014-08-122-0/+239
| |
| * Yarns: Preserve the output of morph foo in out-fooRichard Maw2014-08-121-2/+3
| |
| * Yarns: implement pushing a whole system branchRichard Maw2014-08-121-2/+1
| |
| * Yarns: misc fixesRichard Maw2014-08-122-3/+3
|/
* yarns: Make test-chunk use files from its source repoRichard Maw2014-07-221-3/+16
| | | | | | It is entirely possible that we could accidentally give chunks that use morphologies from the definitions repository, the definitions repository to build from, rather than the source repository.
* yarns: Test building and deployment of a system with a chunk in definitionsAdam Coldrick2014-07-223-23/+26
|
* Remove use of "morph" field in chunk specs in yarnsRichard Maw2014-07-223-7/+6
| | | | | | We don't use this in definitions.git, and we're going to change its semantics, so the test suite would break until we introduced the new semantics, unless we remove its use of the old semantics first.
* Use run_morph in yarnsRichard Maw2014-07-221-1/+1
| | | | | | This is required to ensure the right version of morph is used. I have a .bashrc that causes `morph` to be "$HOME/morph/morph", so it fails to find morph, because HOME is set to a directory inside DATADIR.
* yarns: Adapt to put morphologies in subdirsbaserock/richardmaw/S11284/morphologies-by-path-v4Richard Maw2014-07-107-190/+190
| | | | | | | | | | | | | We want to move our morphologies in our definitions repository into subdirectories, so they're more organised. We'd prefer to only refer to morphologies by file path, rather than a name that loosely corresponds to the file path, but we need to support that for backwards compatibility until we can move all of our morphologies into the definitions repository. However, since we want to eventually remove this, and we want to ensure that file paths work, we change the yarn tests to use file paths.
* Exorcise some old and unused commandsRichard Maw2014-07-072-53/+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.
* Remove check on checkout/branch that there are systemsRichard Maw2014-07-071-9/+0
| | | | | | | This was the wrong response to the problem of accidentally checking-out morph when trying to check out morphs. Now that it's called definitions, this is irrelevent, and aborting a checkout when this check fails is the wrong thing to do.
* Add yarn tests for new deployment functionalitybaserock/adamcoldrick/deploy-specific-systems-v5Adam Coldrick2014-06-182-0/+110
|
* Merge branch 'baserock/richardmaw/S11226/yarns-v2'Richard Maw2014-06-092-0/+126
|\ | | | | | | Reviewed-by: Sam Thursfield and Richard Ipsum
| * Add yarn to test initramfs deploymentsRichard Maw2014-06-062-0/+126
| |
* | Fix tests for new `morph edit` syntaxPaul Sherwood2014-06-092-21/+2
|/
* Raise the disk image size for deployment testRichard Maw2014-03-141-1/+1
| | | | Older versions of btrfs fail with just 10M.
* Revert "tests: Allow running ./check on 32-bit x86"Richard Maw2014-03-141-1/+1
| | | | | | | | | This reverts commit f366960273b026322f7e7cc3c1eb0cd632ebc73e. These changes break building on x86_64, which is our main development platform. Better patches will be forthcoming later.
* tests: Allow running ./check on 32-bit x86Richard Maw2014-03-141-1/+1
| | | | | | | | uname will return the same string morph expects as an architecture on x86_64, but the canonical x86_32 architecture names match i?86 instead. To make it work on 32-bit, we replace calls to uname with morph print-architecture, which does the translation for us.
* Test nested deploymentsRichard Maw2014-03-144-30/+125
|
* yarns: set deployment name based on system nameRichard Maw2014-03-144-7/+8
|
* Convert colons to slashes for chunk nameLars Wirzenius2014-03-062-3/+14
|
* Fix directory names for chunks to use slashes, not colonsLars Wirzenius2014-03-061-5/+5
| | | | | These are _directory_ names, not chunk repo URLs, so a slash is correct now.
* Fix pathname (colon to slash) in test implementationsLars Wirzenius2014-03-061-21/+21
|
* Pass in user's PYTHONPATH to morph when run from yarnsLars Wirzenius2014-03-061-1/+10
| | | | | | | | | | | | | We carefully _add_ to PYTHONPATH in ./check, if it was set by the user. However, yarn cleans the environment when it runs tests, so we tell it to add PYTHONPATH from ./check to the test environment. Additionally, we change yarns/morph.shell-lib so it doesn't override PYTHONPATH, but adds to it. All of this is necessary to get morph, when run by yarn steps, to have the right PYTHONPATH, which can be (and currently is) to allow the user to specify un-installed versions of dependencies, such as cliapp.
* Remove setting of SRCDIR in morph.shell-libLars Wirzenius2014-03-051-9/+0
| | | | | Yarn in Baserock now sets SRCDIR, so it is not necessary for us to set it anymore.
* yarns: Fix how Morph is runSam Thursfield2014-03-041-6/+2
| | | | | | | | As we are running Morph from the source dir we need to set PYTHONPATH so that extensions are correctly loaded. Also, the version of Yarn in Baserock sets 'SRCDIR' so we do not need to set a default any more.
* deploy: Add upgrading to deployment.yarnSam Thursfield2014-03-042-1/+39
|
* Merge remote-tracking branch ↵Richard Maw2014-02-172-5/+33
|\ | | | | | | | | | | | | | | 'origin/baserock/richardmaw/10312/ensure-not-add-repo-ref' This includes a typo fix of Unpertify -> Unpetrify Reviewed-by: Lars Wirzenius
| * yarns: Ensure machine altered morphologies don't include repo/refRichard Maw2014-02-142-0/+29
| |
| * yarns: Remove code to check refs to strataRichard Maw2014-02-141-5/+4
|/ | | | | | | | It should no longer be possible to set these fields. Either we create the morphologies with them in a GIVEN, at which point we already know it's there, so checking whether it is there is pointless; or we check that morph doesn't create them, but the current implementation would not allow it, since yarn doesn't have THEN NOT.
* Warn and default to null if repo or ref are givenRichard Maw2014-02-131-12/+3
| | | | | | | | | | | | | | | | | | 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)" ...`
* Remove tests for working with null refsRichard Maw2014-02-133-80/+1
| | | | | Refs should be completely omitted, and this is now the standard behaviour, so there's little value in testing the behaviour separately.
* Don't use repo or ref in test suiteRichard Maw2014-02-133-14/+0
|
* yarns: Add regression test for cache-key clashRichard Maw2014-01-222-0/+34
|
* yarns: Move system artifact inclusion implementationRichard Maw2014-01-222-15/+14
| | | | | | This moves the GIVEN system $system uses $artifacts from $source to the generic implements section, and the Python implementation into the edit-morph helper script.
* yarns: install misc files in /etc, not /usr/etcRichard Maw2014-01-221-1/+1
|
* yarns: Add test for not building unnecessary chunksRichard Maw2014-01-221-0/+55
| | | | | | | | | | | | | | | | It's an unintended, but possibly not unwelcome feature, that if you have a system that includes stratum artifacts that don't require building the whole stratum, that those chunks are not built. It's debatable whether the confusion of being able to have chunks defined that aren't built outweighs reduced build-times, indeed the test works by having a chunk that can never successfully build, which shows that one pitfall is the possibility of not noticing some chunks fail to build. However, whether it's a good thing or not, we should document this behaviour with a test, so that we don't accidentally break behaviour that someone depends on.
* yarns: Add commentary for splitting scenariosRichard Maw2014-01-221-0/+36
|
* yarns: Add tests for building systems with splittingRichard Maw2014-01-162-0/+138
| | | | | | | This includes tests for systems with the default splits and a system that selects only one of the produced stratum artifacts to go into the system artifact, since this is roughly the expected use-case for the tiny system morphologies.
* yarns: Add a deploy testRichard Maw2014-01-152-3/+49
|
* yarns: Make test chunk create representative filesRichard Maw2014-01-151-2/+134
| | | | | | | It's useful for the splitting tests that will be implemented later, for there to be files that are representative of the files that would be on a common root filesystem, so the match rules can be tested by the right chunk artifacts containing the right files.