summaryrefslogtreecommitdiff
path: root/morphlib/buildenvironment_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* One 'arch' to rule them allSam Thursfield2013-03-151-18/+27
| | | | | | | | | | | | | Define a specific set of 4 architectures that Morph supports, and only expose that value to morphologies. Since GNU triplets are very common we also expose a GNU triplet. Other morphologies should work out their configuration based on MORPH_ARCH. This commit also removes the morphlib.util.arch() function, which detected the machine Morph is running on via 'uname -m'. Morph's architecture names do not necessarily map to the output of 'uname -m' so we should not rely on it anywhere.
* Add 'prefix' property for chunks within strataSam Thursfield2013-03-131-1/+5
| | | | | | | | | Morph no longer supports setting the prefix using the --prefix argument / setting. This was only used in tests and during bootstrap. If a chunk build-depends on a chunk within a stratum which has a custom prefix, that prefix is appended to the PATH in the build environment.
* Set environment variables defining target for build-essentialSam Thursfield2013-03-131-10/+17
| | | | | | In the future we will allow this to be modified to provide a cross-bootstrap mode, but for now we use the same target as the host compiler.
* Refactor build processSam Thursfield2013-03-131-22/+11
| | | | | | | | | | | | | | | | | | 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.
* Remove features used by old bootstrap methodSam Thursfield2013-03-131-30/+2
| | | | | | 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.
* Fix default setting for compiler cache dir; update testsJannis Pohlmann2012-12-171-8/+0
| | | | Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
* python scripts: pep8ize codebaseRichard Maw2012-08-011-0/+1
| | | | | | | | | 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.
* Fix how we set TMPDIR in the build environmentLars Wirzenius2012-04-261-0/+1
|
* buildenvironment: fix whitespaceRichard Maw2012-04-121-3/+3
|
* morphlib: add buildenvironment and testsRichard Maw2012-04-121-0/+137
BuildEnvironment should contain all the information about whatever settings affect the build. A subset of these will affect the cache key, but CacheKeyComputer filters them itself. BuildEnvironment has consumed the purpose of Morph.clean_env() because the build environment is a good place to store this information. The environment variables are decided based on the current settings. The current environment can be accessed by the env attribute. The tests are a little invasive because it reads environment variables and most of the work is done in the constructor, but they should test everything useful.