| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Adds functions to the `buildstream.testing` package to allow plugins to
dump elements and projects on the fly. Before this plugins were just
accessing the private yaml API for tests and loading/dumping directly. I
also allow access to just `_yaml.load()` from testing.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the early call to get whether sources are locally cached
in `_update_source_state` by delegating it to the call of `is_cached`.
Once it is cached, the element is assumed to stay that way for the
duration of the pipeline, we can therefore cache the result once it is
true.
Also remove `Consistency.IS_CACHED`, which is not used anywhere else.
|
|
|
|
|
| |
This is not needed now that we have 'is_resolved' and 'is_cached'.
We can therefore drop all calling places and implementations of it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the need to use consistency in Sources, by asking
explicitely whether the source is cached or not.
This introduces a new public method on source: `is_cached` that needs
implementation and that should return whether the source has a local
copy or not.
- On fetch, also reset whether the source was cached or set if as
cached when we know it was.
- Validate the cache's source after fetching it
This doesn't need to be run in the scheduler's process and can be
offloaded to the child, which will allow better multiprocessing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`get_consistency` is coarse grained and hard to optimize, in addition
to being un-userfriendly.
This adds a new `is_resolved` that has for default implementation
`get_ref() is not None`, which is true for most sources in BuildStream.
Sources for which this is not true can override the method to give a
more accurate description.
Checking for this before looking whether the source is cached can
reduce the amount of work necessary in some pipeline and opens the
door for more optimizations and the removal of the source state check.
|
|
|
|
|
|
| |
'_source_cached' is not explicit enough as it doesn't distinguishes
between sources in their respective caches and sources in the global
sourcecache.
|
|
|
|
|
| |
There are no tests that rely on these plugins anymore, so remove the
corresponding declarations from project.conf.
|
|
|
|
|
|
|
|
|
|
|
| |
This runs two versions of the plugins:
- The latest stable is not allowed failures and is run on every platform
- The master version is allowed failure, and only runs on a single
architecture
This also adds a new entrypoint to register source tests to run against
BuildStream.
|
|
|
|
|
| |
These tests don't do anything, as they have no plugins registered at
all.
|
| |
|
|
|
|
| |
This stops the tests from being interlinked for BuildStream itself.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Instead output "junction" in magenta for info. Also include test
in format/junctions.py
|
|
|
|
| |
Monkeypatch is *really* scared of non-str values. Let's calm it down.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* `uname -m` is unusable in case of IBM AIX 7 as it reports the serial
number of the machine. As a workaround, special case it and use the
reported processor identifier.
* tests/format/optionos.py: Don't use AIX for unsupported architecture
`AIX` is special-cased in BuildStream, so use a different system for
testing unsupported architectures.
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
While this is deep in our test suite, and should therefore never
create files that leak information, our code security linter
complains about setting broad file permissions.
We should really be using `utils._force_rmtree` here anyway, to stop
duplicating code, so that's what we do.
|
|
|
|
| |
Individual commands are not logged with command batching.
|
|
|
|
| |
Individual commands are not logged with command batching.
|
|
|
|
| |
Individual commands are not logged with command batching.
|
|
|
|
| |
Logging differs with command batching.
|
|
|
|
| |
Bind mounting is not supported.
|
|
|
|
| |
The root directory can't be marked read-only with buildbox-run.
|
| |
|
|
|
|
|
|
| |
The purpose of the test is to ensure POSIX shared memory objects are
supported in the sandbox. On Linux this requires /dev/shm to be a tmpfs.
However, this should be supported by any full featured sandbox.
|
|
|
|
|
|
| |
Makes sure that `cache-junction-elements` and `ignore-junction-remotes`
work together correctly, and that setting `ignore-junction-remotes`
doesn't just remove all remote caches.
|
| |
|
| |
|
|
|
|
|
| |
Add tests for interactive `bst init` command using
[pexpect](https://pexpect.readthedocs.io).
|
|
|
|
|
|
|
|
| |
To protect the local cache of buildbox-casd from corruption without the
use of FUSE, buildbox-casd has to run as a different user.
Use less restrictive umasks in the source determinism tests to allow
buildbox-casd to function when it is running as a separate user.
|
|
|
|
| |
This is not necessary and doesn't work with CASD_SEPARATE_USER.
|
|
|
|
| |
This is not necessary and doesn't work with CASD_SEPARATE_USER.
|
|
|
|
|
| |
Linux does not allow hardlinks to read-only files of other users by
default since Linux 3.6 (see /proc/sys/fs/protected_hardlinks).
|
|
|
|
|
|
| |
This also involves a number of changes to tests and other parts of the
codebase since they were hacking about wit API that shouldn't have
existed.
|
|
|
|
|
|
|
|
| |
This updates all dependencies on the project, which is mainly needed
by python3.8 but can be done independentely.
This also disables multiple false positive lint errors and disable a
new check that we don't need.
|
|
|
|
|
|
| |
This gives a potentially more explicit understanding of what went
wrong, and pytest can give better information about that exception
than just us asserting the return code.
|