| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These tests were quite hard to follow what they were testing, and
did not cover the error cases thoroughly either. Instead, use some
test parametrization to implement more succinct tests which cover
the API surface more thoroughly.
Due to parametrization and discrete testing of various use cases,
this was going to be very expensive, so this patch introduces some
pytest module scope fixtures.
This allows multiple discrete tests to be run against a prebuilt
ArtifactShare with specific artifacts already built and available
in the share, so that this discrete testing is quite optimized.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In errors pertaining to failing to launch a shell with a buildtree.
Other related updates:
- _frontend/cli.py: Propagate machine readable error codes in `bst shell`
This command prefixes a reported error, so it rewraps the error into
an AppError, this needs to propagate the originating machine readable
error.
- tests/integration/shell.py, tests/integration/shellbuildtrees.py:
Updated to use new machine readable errors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stack elements cannot be build-only dependencies, as this would defeat
the purpose of using stack elements in order to directly build-depend on
them.
Stack element dependencies must all be built in order to build depend
on them, and as such we gain no build parallelism by allowing runtime-only
dependencies on stack elements. Declaring a runtime-only dependency on
a stack element as a whole might still be useful, but still requires the
entire stack to be built at the time we need that stack.
Instead, it is more useful to ensure that a stack element is a logical
group of all dependencies, including runtime dependencies, such that we
can guarantee cache key alignment with all stack dependencies.
This allows for stronger reliability in commands such as
`bst artifact checkout`, which can now reliably download and checkout
a fully built stack as a result, without any uncertainty about possible
runtime-only dependencies which might exist in the project where that
artifact was created.
This consequently closes #1075
This also fixes the following tests such that the no longer
require build-depends or runtime-depends to work in stack elements:
* tests/frontend/default_target.py: Was not necessary to check results of show,
these stacks were set to runtime-depends so that they would have the same
buildable state as their dependencies when shown.
* tests/format/dependencies.py: tests/frontend/pull.py, test/frontend/show.py,
tests/integration/compose.py:
These tests were using specific build/runtime dependencies in stacks, but
for no particular reason.
|
|
|
|
|
|
| |
This new test tests that environment variables are preserved in generated
artifacts, and that artifact data is observed rather than irrelevant
local state when integrating an artifact checked out by it's artifact name.
|
|
|
|
|
| |
`--use-buildtree` is now a boolean option for `bst shell`. If no
buildtree is available, an error is raised.
|
|
|
|
|
|
| |
Use single scheduler run for pulling dependencies and buildtree.
Deduplicate cache checks and corresponding warning/error messages
with and without pulling enabled.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As per #819, BuildStream should pull missing artifacts by default. The
previous behavior was to only pull missing buildtrees. A top-level
`--no-pull` option can easily be supported in the future.
This change makes it possible to use a single scheduler session (with
concurrent pull and push jobs). This commit also simplifies the code as
it removes the `sched_error_action` emulation, using the regular
frontend code path instead.
|
|
|
|
|
| |
This tests that built filter artifacts don't depend on build
dependencies for integration.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of relying on Element.search(), use Element.configure_dependencies() to
configure the layout.
Summary of changes:
* scriptelement.py:
Change ScriptElement.layout_add() API to take an Element instead of an element name,
this is now not optional (one cannot specify a `None` element).
This is an API breaking change
* plugins/elements/script.py:
Implement Element.configure_dependencies() in order to call ScriptElement.layout_add().
This is a breaking YAML format change.
* tests/integration: Script integration tests updated to use the new YAML format
* tests/cachekey: Updated for `script` element changes
|
|
|
|
|
|
| |
builds
The old one tested that retrying the failed build doesn't actually retry
|
|
|
|
|
|
|
| |
buildbox-run is the only local sandbox and there are no plans to add
other sandboxing backends in the future. New platforms can be supported
by new buildbox-run implementations without requiring any changes in
BuildStream.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`command-subdir` was previously missing from the cache key. This patch
makes it a part of the cache key _if_ it was specified. It means that
the cache key will not change for elements that had not defined a
`command-subdir`. However, it will change for every element that did
define it.
Fixes #1295.
|
|
|
|
|
|
|
| |
The result of `bst artifact checkout` invocation was not correctly
assigned to the result object in a few places. Hence the assertion on
the next line was really testing the same thing as the previous
assertion, i.e. the result of `bst build`.
|
|
|
|
| |
Also fix linting errors coming with new version of pylint
|
|
|
|
|
| |
The pip element was copied already to bst-plugins-experimental.
We don't need to have two copies of it.
|
|
|
|
|
|
|
| |
Part of https://gitlab.com/BuildStream/buildstream/-/issues/1068.
Make behavior of `shell` command similar to other commands that need
sources like `build`, `workspace open`, `source checkout` etc.
|
|
|
|
| |
This is no longer needed now that we support caching buildtrees in CAS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* "min-version" is specified as a <major>.<minor> point version
and uses the installed BuildStream version instead of having
a separate versioning number for the format.
* The presence of "format-version" is now used to indicate
that we might be loading a BuildStream 1 project.
* For now, where parsing the version at startup is concerned, and
also where `bst init` is concerned, we artificially bump the
detected BuildStream version to 2.0 if we detect a version < 2.0,
these exceptions can be removed once 2.0 is tagged and released.
Summary of changes:
_project.py: Now parse "min-version" and detect "format-version" to
warn about loading a BuildStream 1 project
_versions.py: Remove obsolete BST_FORMAT_VERSION numbers from here
data/projectconfig.yaml: Remove old "format-version" from defaults
utils.py: Added new private _parse_version() helper function, and another
_get_bst_api_version() to get an adjusted API version.
frontend/app.py, frontend/cli.py: Updated `bst init` implementation
testing (buildstream.testing): Updated testing utilities to generate
and use projects with min-version instead of format-version.
tests and examples: Updated to use min-version across the board.
|
|
|
|
|
| |
Using "" as a directory is invalid starting from pytest 5.4.0, let's
use the __file__ name instead
|
|
|
|
| |
buildbox-fuse now supports SubtreeReadOnly.
|
|
|
|
| |
buildbox-run-bubblewrap now supports custom uid/gid.
|
| |
|
|
|
|
| |
also add a test
|
| |
|
|
|
|
| |
Verify basic incremental build and proper mtime handling.
|
|
|
|
|
| |
Add file to workspace directory to ensure second `bst build` is actually
building the element.
|
|
|
|
| |
Object files are no longer stored in the workspace directory.
|
|
|
|
|
|
| |
Avoids testing for file times when testing for umask. These tests are
known to be flaky and are overly specific in that they implicitly test
more than just umask.
|
| |
|
|
|
|
|
| |
When commands are batched, the failure message can't include the command
group label with buildbox-run.
|
|
|
|
|
|
|
| |
Plugin tests are already accessing this API, but using imports from
private modules. For motivation for this to be exposed publicly, note
that ErrorDomain is an argument for most things in runcli.py, and
LoadErrorReason may be another.
|
|
|
|
|
|
|
| |
Ensure that if a buildtree isn't cached locally, it's only fetched
if --pull and pull-buildtrees config are set. Also, only attempt to
fetch if it's plausible that it could be pulled, with appropriate
messaging based on local cached state.
|
|
|
|
|
| |
There are no tests that rely on these plugins anymore, so remove the
corresponding declarations from project.conf.
|
| |
|
|
|
|
|
| |
When commands are batched, the failure message can't include the command
group label with buildbox-run.
|
|
|
|
|
|
|
|
| |
This adds a timed activity message to bring batch command logging for
REAPI-based sandboxes in line with the default sandbox as far as
possible.
Thix fixes 3 xfails with buildbox-run.
|
| |
|
|
|
|
| |
buildbox-run-userchroot requires a shell.
|
|
|
|
|
|
|
|
| |
The root directory is not allowed to be writable by userchroot.
+ sh -c -e echo 'I can write to root' > /test
sh: can't create /test: Permission denied
|
|
|
|
|
|
|
| |
The root directory is not allowed to be writable by userchroot.
+ sh -e -c touch /foo
touch: /foo: Permission denied
|
|
|
|
|
|
|
|
| |
The root directory is not allowed to be writable by userchroot.
+ sh -e -c mkdir -p /tests
mkdir: can't create directory '/tests': Permission denied
Command 'mkdir -p /tests' failed with exitcode 1
|
|
|
|
|
| |
The tests are flaky due to non-deterministic timestamps in the output of
`ls -l`. See https://gitlab.com/BuildStream/buildstream/issues/1218
|
| |
|
| |
|
|
|
|
| |
Individual commands are not logged with command batching.
|