summaryrefslogtreecommitdiff
path: root/morphlib/builder2_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Add morph cross-bootstrapSam Thursfield2013-07-301-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cross-bootstrap is a way to build baserock on an architecture that does not currently have Baserock. It can be used by `morph cross-bootstrap <ARCH> <REPO> <REF> <MORPH>`, and will build an artifact that can be used as a root filesystem with a basic build environment with a script named `native-bootstrap` which will build and install every chunk in the system. If done with a devel system, this will give you a suitable environment for building a proper Baserock system. This does not currently provide a kernel for the target architecture. Apart from adding the cross-bootstrap plugin, it also makes the following changes: * Moves the lit of valid_archs into morphlib (instead of locally-scoped in MorphologyFactory) * BuildCommand takes an extra argument, build_env * split BuildCommand's get_artifact_object into create_source_pool and resolve_artifacts (plus changes things that use get_artifact_object to use the new way) * setup_mounts finds out whether to do so by whether build_mode is 'staging', instead of by whether the setting 'staging-chroot' is true. * Makes ChunkBuilder's get_sources use the morphlib.builder2.extract_sources() method, and moved set_mtime_recursively into morphlib.builder2, since it's not currently used anywhere else. * moved ChunkBuilder's get_commands into the Morphology class (plus changes to anything that used get_commands)
* Refactor build processSam Thursfield2013-03-131-5/+4
| | | | | | | | | | | | | | | | | | Reorganise the build_artifact() and build_artifacts() functions to allow more complex work when setting up chunk builds in build_artifact(). The staging area now holds the BuildEnvironment object (the environment variables that should be set during build). This makes sense because all build commands should be run inside the staging area and therefore through the StagingArea object. The BuildEnvironment object is now considered immutable after it is created. The environment is used in cache key computation when computing what artifacts are required; if it changes after that point we risk either computing different artifact keys for the same artifact or missing data in the cache key that should be included in the hash. Better to force changes into a separate 'extra_env' variable.
* Make metadata include the repo-alias.Richard Maw2013-02-111-1/+2
| | | | | | | | | This is required for reproducing the morphologies that created the artifacts. It is possible, but expensive, to `unexpand` a url, provided your repository aliases are the same as the morphology's, but this may not always be the case.
* python scripts: pep8ize codebaseRichard Maw2012-08-011-19/+21
| | | | | | | | | This was done with the aid of the pep8 script, available by running `easy_install pep8`. It may be worth making this part of ./check, but that will require putting pep8 into the development tools stratum. This should be easy, given pep8 has no external dependencies.
* morphlib.builder2: write stratum metadataRichard Maw2012-06-141-4/+20
| | | | | | Stratum metadata was getting lost because it is not part of the chunks. Now metadata is written to the cache, then when the system builder assembles the strata it copies the metadata in.
* morphlib.builder2: fix unit testsRichard Maw2012-06-141-1/+19
|
* morph: remove dead code and replace Execute with app.runcmdRichard Maw2012-05-301-4/+12
|
* Use dedicated <cachedir>/artficats directory for local artifact cache.Jannis Pohlmann2012-05-031-2/+3
| | | | | | Make sure that this directory is actually created before trying to save artifacts to it. Also adjust all tests to use this new directory for looking up artifacts.
* Fix unit testsw for builder2Lars Wirzenius2012-04-251-2/+3
| | | | | From Richard Maw, I'm just applying the patch. Having trouble with the git server so can't do this via it.
* Merge remote-tracking branch 'origin/master' into rm/timings-backRichard Maw2012-04-241-1/+4
|\
| * Make builder get submodule cache repo path cleanlyLars Wirzenius2012-04-241-1/+4
| |
* | builder tests: cover metadata writing to cacheRichard Maw2012-04-241-1/+69
|/
* morph: add cache id to the meta filesRichard Maw2012-04-201-0/+1
| | | | This is probably excessively large right now
* Fix minor problemsLars Wirzenius2012-04-181-2/+2
|
* Start a new builder classLars Wirzenius2012-04-181-0/+155