summaryrefslogtreecommitdiff
path: root/morphlib/stagingarea_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove old cruftTiago Gomes2015-11-201-1/+0
| | | | | | | Static analysis showed this code is not being used, and we can always bring it back if necessary through git. Change-Id: Id8bf7d73436b5c3d0dfe050befaae034a05afc86
* Improve reliability of the staging area unit testsTiago Gomes2015-11-031-5/+5
| | | | | | | | | | | Accordingly to [1], the listdir function (called by os.walk) returns a list of filepaths on an arbitrary order. Sort the list of file paths to produce always the same list. [1]: https://docs.python.org/2/library/os.html Change-Id: I4bb9842b1722f27a8becb9c50391cda089bb0a33
* Simplify StagingArea classTiago Gomes2015-09-221-22/+11
| | | | | | | | | | | | Pass the Source to the staging area constructor so that we don't need to pass it as a parameter when we call some StagingArea methods. Also move the creation of the build and destdir directories to the constructor so that we can get rid of the chroot_open() and chroot_close() methods. Also, provide API to retrieve the relative locations for buildir and destdir. Change-Id: I6e8085392e19ff3d8df807f260acf90eec9e0901
* Stop moving staging areas of failed buildsTiago Gomes2015-09-011-3/+14
| | | | | | | | | | | | | | | | | | | | | Stop moving staging areas of failed builds from the 'staging' directory to the 'failed' directory. Moving staging areas make it very difficult to debug build failures on the build essential chunks, as the paths set on the configure scripts and some environment variables (e.g. STAGE2_SYSROOT, DESTDIR) will be invalid after moving the staging area. This change will also make it easier to create scripts that chroot n environment similiar to the one where the build failure occurred. To make it still possible to safely do a build an run `morph gc` in parallel, we use flock(2) to control access to the staging area directory. Also, move the `test_supports_non_isolated_mode` test into a different class, as it requires a different SetUp() routine (the staging area is contructed with different parameters). Change-Id: I06c3c435ad05c12afabc0adc2a9d4f8a284ccc02
* Use the modern way of the GPL copyright header: URL instead real addressJavier Jardón2015-03-161-3/+2
| | | | Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
* FIXUP: Fix up unit tests from change allowing multiple sourcesRichard Maw2014-09-191-0/+1
| | | | | This is logically part of the previous patch, but has been split out to ease reviewing.
* Fix copyright date in stagingarea_testsRichard Maw2014-03-141-1/+1
|
* Reduce spam from setting up staging areaLars Wirzenius2014-03-101-1/+1
| | | | | | | | | | | Make the message "Installing chunk..." be chatty, i.e., only displayed when the user turns verbosity higher. Most of the time the chunk is already unpacked in the cache, so installing it takes a fraction of a second. Add a new message, at default verbosity, when a chunk needs to be unpacked. This can take a while, so a message is appropriate, so the user knows what is happening.
* Added chunkname prefix to some elements of the debug log.Dan Firth2013-10-111-0/+3
|
* stagingarea tests: create chunks subdirectoryRichard Maw2013-08-061-0/+4
| | | | | | | | It is expected that the Application creates directories that will be used, to keep the code for using them cleaner. The FakeApplication wasn't updated to do this, as it was not yet needed, but changes for atomicity require it to exist.
* Refactor build processSam Thursfield2013-03-131-1/+16
| | | | | | | | | | | | | | | | | | 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 support for bootstrap mode in staging areaSam Thursfield2013-03-131-7/+2
| | | | | This involved having a staging area with split personalities and was generally a bit ugly.
* Hardlink files into the staging-areaJonathan Maw2013-02-281-3/+23
| | | | | | Instead of repeatedly unpacking tarballs into a succession of staging- areas, it will unpack each tarball only once, then hardlink all the files into the staging-area instead.
* Revert "Merge branch 'liw/hardlink-staging-area-pre-rebase'"Jannis Pohlmann2012-11-301-17/+2
| | | | | | | | | | | | | | This reverts commit c859d70d86423a52bc7053abf64e9ca21f62a487, reversing changes made to 3085a672d1e8b5177be33f0463385de72a0ef5bf. Unfortunately, hardlinking and linux-user-chroot both break builds in various ways. Hardlinking breaks the bootstrap process by creating symlinks like /usr/libexec that can then not be overwritten with real files by install scripts from morphologies like gcc. linux-user-chroot caused problems by breaking privileged operations such as chgrp and CAP_SETFCAP. As a consequence, chunks like util-linux and libcap can no longer be built.
* Refactor and fix to make it pass (more of) the test suiteLars Wirzenius2012-11-291-2/+17
|
* python scripts: pep8ize codebaseRichard Maw2012-08-011-11/+10
| | | | | | | | | 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.
* morph: remove dead code and replace Execute with app.runcmdRichard Maw2012-05-301-2/+3
|
* Make StagingArea get temporary directory separately from root directoryLars Wirzenius2012-04-181-2/+2
| | | | | | When we are not using --staging-chroot (e.g., bootstrap), we need to specify the temporary directory separately, because it needs to obey things like $TMPDIR.
* Make StagingArea create build and install directories, run commandsLars Wirzenius2012-04-181-1/+31
|
* Add a class to manage the staging area for buildsLars Wirzenius2012-04-121-0/+75