summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests/integration/shell.py: Updated shell teststristan/shell-mountsTristan Van Berkom2018-03-021-27/+17
| | | | | | | o Added new test for `bst shell --mount` o Removed the test that a directory is refused in `host-files`, this is no longer a requirement
* Adding --mount option to `bst shell`Tristan Van Berkom2018-03-023-5/+18
| | | | | | | This allows users to explicitly mount whatever they want into the sandbox environment for `bst shell`. This closes issue #274
* doc/source/projectconfig.rst: Warn about directories in `host-files`Tristan Van Berkom2018-03-021-5/+15
| | | | | | Tweaked the documentation surrounding shell `host-files` to allow directories, but added a warning that data belonging to a user should not be specified here.
* element.py: Dont require `host-files` to not be directoriesTristan Van Berkom2018-03-021-2/+0
| | | | | We need to specify directories to mount from `project.conf` after all.
* _sandboxbwrap.py: Force cleanup when in interactive modeTristan Van Berkom2018-03-021-7/+24
| | | | | | | | | | | | | | | | | | | | When running a sandbox in interactive mode (implies `bst shell` was launched or an interactive shell for debugging), dont bail out when cleaning up directories which are not empty. We treat this as a bug, if any of the base sandbox directories (/dev, /tmp or /proc) are not empty when tearing down the sandbox, because it would indicate something is wrong with bwrap. When in interactive mode however, the user/project may have mounted additional directories inside these base directories; for which we need to create intermediate directories for the mount. Instead of keeping track of every intermediate directory, just force remove in interactive mode, as this is safe. Ideally, we should fix upstream bwrap to cleanup the debris it creates when exiting.
* _sandboxbwrap.py: Allow device nodes to be bind mountedTristan Van Berkom2018-03-021-1/+10
|
* NEWS: Adding missing entries for recently added featuresTristan Van Berkom2018-03-021-0/+15
|
* _frontend/cli.py: Adjust help output for `bst shell`Tristan Van Berkom2018-03-021-1/+1
| | | | | Dont specify how we fallback to launching a shell with `sh -i`, since this is now configurable in project.conf.
* _frontend/cli.py: Better help output for the `--option` main option.Tristan Van Berkom2018-03-021-1/+1
| | | | | | Added metavar, making it more clear that you specify: bst --option OPTION VALUE
* tests: Add filter element testsJonathan Maw2018-03-0114-0/+168
|
* Add Filter elementJonathan Maw2018-03-013-0/+134
|
* Pipeline: Give more helpful errors when opening a workspace for an element ↵Jonathan Maw2018-03-012-3/+7
| | | | | | | | | that has no sources When trying to look at the source code for an element, elements that modify artifacts (e.g. script and compose elements) don't have sources, so we suggest some other elements that they might try opening workspaces for.
* scriptelement: Use built-in checks on runtime depends and sourcesJonathan Maw2018-03-011-10/+8
|
* compose: Use built-in checks on runtime depends and sourcesJonathan Maw2018-03-011-11/+9
|
* Allow plugins to forbid runtime dependencies and sourcesJonathan Maw2018-03-014-2/+36
| | | | | | The flags BST_FORBID_RDEPENDS and BST_FORBID_SOURCES can be set in the plugin's class declaration, and exceptions will be raised during pre-flight checks
* Add a test for default and custom loggingJim MacArthur2018-03-011-0/+81
|
* Remove brackets added inside widgetsJim MacArthur2018-03-012-20/+7
| | | | | | | | Brackets can now be added as plain text in a custom logging format string, so there's no need to add them in widgets. widget.py: Remove brackets. _status.py: Remove the 'brackets' optional argument to TimeCode.
* Add logfile format tokeniserJim MacArthur2018-03-014-13/+52
| | | | | | widget.py: Main body of tokenizer. _context.py: Read message-format from user config YAML. main.py: Pass in context message-format to LogLine constructor.
* Add the FixedText and WallclockTime widgetsJim MacArthur2018-03-012-0/+23
| | | | | | | | | | WallclockTime is set at the time a message is created. Since messages can be placed in queues before being rendered, this is not always the same time as the wallclock time when rendering the message, so it needs to be stored in the message. widget.py: Add the two new widgets _message.py: record system time when a message is created.
* Add sequence ID and widget for it.Jim MacArthur2018-03-013-6/+27
| | | | | | | | | | The idea of a sequence number/ID is to tie together all messages associated with a given timed activity, to make performance analysis easier. _context.py: Add sequence number with atomic increment _widget.py: SequenceID widget, which displays this value _message.py: sequence_id variable storing the sequence for a message.
* widget.py: Modify TimeCode to take a microseconds argumentJim MacArthur2018-03-011-1/+9
|
* widget.py: Make the displayed text for LogLine messages a widget tooJim MacArthur2018-03-011-10/+22
| | | | | Adds MessageOrLogFile widget, which contains the same functionality previously used to display messages.
* Update expected cache keys in testsJames Ennis2018-02-286-6/+6
|
* compose.py: key dictionary is now correctly initialisedJames Ennis2018-02-281-4/+3
|
* Modify how the INTEGRATION_CACHE environment var is interpretedSam Thursfield2018-02-282-3/+3
| | | | | | | | When specifying a location for the integration tests cache directory, we would previously append '/integration-cache' to whatever path we were given. This is regarded as confusing. See: https://gitlab.com/BuildStream/buildstream/issues/267
* Store integration tests cache inside the current directory by defaultSam Thursfield2018-02-281-6/+6
| | | | | | | | Previously the code would default to a directory in `/tmp`, but this is often unsuitable as the Linux 'tmpfs' filesystem doesn't support extended file attributes and thus cannot store OSTree repositories. See: https://gitlab.com/BuildStream/buildstream/issues/267
* doc/source/projectconf.rst: Documenting `host-files` shell configurationTristan Van Berkom2018-02-281-0/+42
|
* tests/integration/shell.py: Added tests for host-filesTristan Van Berkom2018-02-282-0/+98
| | | | | | | | | | | | | | | | | Newly added tests: o Test that bind mounting a file works o Test that bind mounting a file into a non-existing directory works o Test that bind mounting is disabled in an isolated shell o Test that the shell still works, but a warning is printed and the mount is refused in case the specified file on the host was found to be a directory o Test that the shell still works, but a warning is printed in the case that the file specified on the host does not exist
* sandbox/_mount.py: Ensure file existence for bind mountsTristan Van Berkom2018-02-281-1/+17
| | | | | | | This logic existed but is now a bit more complex with the addition of allowing explicit bind mounts to be defined for the shell; the change is that now files can also be mounted into the sandbox instead of just directories.
* element.py: Inform the sandbox of host-files when running a shellTristan Van Berkom2018-02-281-0/+10
| | | | Does not apply to isolated shells.
* _project.py: Added 'host-files' shell configurationTristan Van Berkom2018-02-281-2/+16
| | | | | | | | | | | A shell configuration allowing one to bind mount files into the shell sandbox. This bumps the BST_FORMAT_VERSION to 2. This is related to #223, and solves #241 (name resolution problems) by making it possible to specify a bind mount for `/etc/resolv.conf` in the project configuration.
* tests/integration/shell.py: Generate project.conf on the flyTristan Van Berkom2018-02-282-7/+28
|
* tests/frontend/workspace.py: Add cache key checks to test_buildJürg Billeter2018-02-271-0/+2
| | | | Regression test for #273
* Determine as early as possible whether a build is pendingJürg Billeter2018-02-272-4/+41
| | | | | | | | | Workspaced sources are considered unstable if a build is pending as the build will modify the contents of the workspace. Determine as early as possible if a build is pending to be able to discard unstable cache keys. Fixes #273
* tests/frontend/pull.py: Do not use a workspace for the non-strict testJürg Billeter2018-02-271-2/+3
| | | | | The cache status of reverse dependencies of workspaced elements cannot always be determined upfront.
* element.py: Remove unused _get_strict_cache_key() methodJürg Billeter2018-02-271-12/+0
| | | | Cache key handling is now contained within the Element class.
* element.py: Add _can_query_cache() methodJürg Billeter2018-02-273-4/+13
| | | | | Keep the knowledge about which cache key is required for cache queries within the Element class.
* Remove unused _KeyStrength importsJürg Billeter2018-02-273-5/+0
|
* _artifactcache: Add key parameter to pull() methodJürg Billeter2018-02-273-34/+61
| | | | Contain cache key logic in Element class.
* _artifactcache: Add keys parameter to push() methodJürg Billeter2018-02-273-14/+16
| | | | Contain cache key logic in Element class.
* _artifactcache: Add key parameter to push_needed() methodJürg Billeter2018-02-273-7/+10
| | | | Contain cache key logic in Element class.
* _artifactcache: Add keys parameter to commit() methodJürg Billeter2018-02-274-26/+24
| | | | Contain cache key logic in Element class.
* _ostree.py: Use list of refs as commit parameterJürg Billeter2018-02-272-11/+7
|
* _artifactcache: Add key parameter to extract() methodJürg Billeter2018-02-274-22/+22
| | | | Contain cache key logic in Element class.
* _artifactcache: Add key parameter to contains() methodJürg Billeter2018-02-274-43/+14
| | | | Contain cache key logic in Element class.
* _artifactcache/artifactcache.py: Add pull() to abstract base classJürg Billeter2018-02-271-0/+12
|
* _artifactcache/artifactcache.py: Add push() to abstract base classJürg Billeter2018-02-271-0/+17
|
* _artifactcache/tarcache.py: Remove unused remove() methodJürg Billeter2018-02-271-14/+0
|
* element.py: Remove unused strength parameter from _cached()Jürg Billeter2018-02-271-22/+4
| | | | | | Remove unused strength parameter from _cached() and _remotely_cached(), which makes them simple accessor functions as `__cached` is equivalent to `__strong_cached` with a strict build plan.
* Integration tests: Removing some dead codeTristan Van Berkom2018-02-278-29/+4
| | | | | | | | | | o Removing format_files() helper in testutils o Removing imports of format_files() o Removing imports of walk_dir() where it's not used o Removing `element_path` variables that are unused