| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the documented path [1] to `pytest_cov.embed.cleanup_on_sigterm()`,
to avoid crashing on some versions.
It turns out that pytest_cov v2.6.1 on my machine doesn't like the way
that we were accessing cleanup_on_sigterm(). Access it in such a way
that we will either get the function or an ImportError, as per the
documentation.
[1]: https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
|
|
|
|
|
|
|
|
| |
Remove a couple of cases where it's possible to make the main test
process hang, waiting for something to appear on a queue.
Raise a friendlier exception, earlier, if there was a problem starting
the server process.
|
|
|
|
| |
Correct version number for BST_KEY_REQUIRES_STAGE
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BREAKING CHANGE: Remove all tracking related options and flags from
`bst build` command, as discussed on mailing list previously.
See
https://mail.gnome.org/archives/buildstream-list/2019-October/msg00009.html
for the original proposal, and
https://mail.gnome.org/archives/buildstream-list/2019-October/msg00024.html
for a summary.
At the same time, remove use of the removed options from our test suite.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Symlink `git` into the separate tools bin directory. BuildStream needs
`git` in order to be able to determine its version.
This missing dependency is revealed when you run these tests in `spawn`
mode, as it will re-run the base __init__.__version__ logic in a new
process.
Also take the opportunity to extract _symlink_host_tools_to_dir(), to
re-use some code.
|
|
|
|
|
|
|
| |
tests:
* local sources are cached
* use git sources instead of local when removing objects
* update expected cache keys
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Note that unittest.MagicMock is unfortunately not pickable, so if one
tries to cross over to a ChildJob then we're in trouble.
Sacrifice some convenience and a bit of safety by implementing our own
_DummyTask instead of using MagicMock.
Don't try to pickle the 'simple_task' context manager, if it's been
overridden when creating a test context.
|
|
|
|
|
|
| |
Print what we set to, not what was set before us. This enables us to
test that `spawn` mode is really enabled by looking at output from the
tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains two changes:
* tests/sources/keytest.py: Ensure that the element state before/after
BuildStream operations is updated as expected. Previously we were just
checking that the command succeeded.
* tests/sources/project_key_test/plugins/sources/key-test.py: Update the
dummy plugin that's used for tests, such that it conforms to the
expectations of a BuildStream source class.
Fixes #1179.
|
|
|
|
|
| |
It seems we don't need this anymore, thanks to cleaning up gRPC
background threads.
|
|
|
|
|
|
| |
tests: manually close channels when interacting with the cache
cascache.py: disable the usage monitor if start method is spawn
|
| |
|
| |
|
|
|
|
|
| |
'strip_node_info' would be useful for multiple plugins. We should
therefore allow users to use it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
To ensure that we only disable element loading task progress reporting
for very specific code paths, we need to teach the test suite to be a
bit smarter.
For this reason we now mock a _Task object and return it in our mock
context's relevant method invocations.
Other code paths that deliberately invoke the loader without task
reporting now mark their loads with NO_PROGRESS.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By avoiding this, loading metaelements of junctions becomes cheap even
for junctions with erroneous dependencies, and we can ignore their
task reporting.
Task reporting for junction metaelement loading is confusing, since
the junction element itself will never be part of the pipeline, so
we'd rather not have this show up as an actual loaded element.
Elements loaded from the junction are loaded separately, therefore
this does not affect their progress display.
|
|
|
|
|
|
| |
If a remote has some missing blobs for a source, we should not fail
abruptly but instead continue to the next remote, and, in the worst
case, fetch the source again.
|
|
|
|
|
|
|
|
| |
Extract the configuration of the BuildStream cli as it is every
time the same into a separate function.
This helps seeing what is setup of the tests and what is the actual
test itself.
|
|
|
|
|
|
| |
All tests in this file use the same method for creating an element.
It is easier to write new tests to have this factored out.
|
|
|
|
|
| |
This removes the need of having a hardcoded element name, by simply
reusing the 'element_name' variable.
|
|
|
|
| |
This method can be reused and shared, and makes the tests more readable.
|
|
|
|
| |
tests: remove strict kwargs from xfail marks
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously, if an artifact proto had no files at all in it, we would
fail at pushing it, making BuildStream crash.
When no files are part of an artifact proto, we can short-circuit
the call and avoid pushing them unecessarily.
- Add a test to ensure this doesn't come back.
|
|
|
|
|
|
|
|
|
| |
Windows checks out symlinks as a file with content is the path of the
symlink. This makes it impossible to mount the buildstream folder in
a docker container and run the tests.
This removes the symlink, and creates it on the fly for tests that use
it, which fixes the problem.
|
|
|
|
|
|
|
|
|
| |
Remove XFAIL mark from test_workspace_visible and remove the explicit
SourceCache.commit() in the workspace source plugin. Allow buildstream
to handle the commit logic.
Add handling for non-cached workspace sources in
`source.Source._generate_keys()`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A fix was made in
https://gitlab.com/BuildStream/buildstream/merge_requests/1244
in order to set xdg_* env variables inside of the test's directory
to avoid importing data from the host.
There was however still two problems:
- When a variable was not set, it was set with a relative path, which
would create a configuration for BuildStream that is invalid.
- When a variable was set and running with pytest directly, we would
still use the variable's value, which would be the host one.
This ensure this can never happen, by not relying on the same variable's
name and always overriding them.
|
|
|
|
|
|
|
| |
Remove call to Element._source_cached() in _calculate_cache_key and
do not recalculate workspace keys.
tests: shell browsing of workspaces is currently broken
|
|
|
|
|
|
|
| |
Workspace keys are determined by contained files at time of opening and
are not forcibly reset
tests: workspaces have keys when they're opened and are not recalculated
|
|
|
|
|
| |
Save all casd logs in a log file under its cas/ directory, and
keep only the last 10 of them.
|
|
|
|
|
|
|
| |
This adds messages in the various mis-termination of Buildbox-casd, to
notify users that something might have gone wrong there.
It also adds a few tests to validate the various behaviors.
|
|
|
|
| |
Workspace changes are now detectable when using BuildBox as the sandbox
|
|
|
|
|
| |
Opening and building workspaces when buildbox is the sandbox is now
supported.
|
|
|
|
|
|
|
|
| |
Workspaces will be handled via the workspace source plugin methods. This
does not currently support reflecting build artifacts in the open
workspace.
tests: Mark incremental workspace builds as xfail (strict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check that sources are cached even if they are workspaced and do not
reset workspace cache data
partially reverts !1470
closes #1088
element.py: remove workspaces in cache key calc
Using the workspace source plugin, workspaces should now be handled like
sources for the purpose of calculating element cache keys.
partially reverts !1470
works towards #1073
Since the source keys are now calculated using the unique keys of the
workspace source, this change will break external tracking for open
workspaces. In future attempting to track an open workspace might raise
a SourceError. The test is rewritten to close the workspace before
tracking.
|
| |
|
|
|
|
|
|
|
|
| |
pytest-cov 2.7 calls os._exit() in its SIGTERM handler, skipping
cleanup, unless another SIGTERM handler was already registered.
Add our own SIGTERM handler to the subprocess to ensure proper cleanup
such as terminating buildbox-casd.
|
|
|
|
|
| |
Adds an integration test to check the `pass-integration` option for
filter elements works.
|
|
|
|
|
|
|
|
| |
Currently the stack element does not produce an artifact, and sometimes
has to be treated differently because of this. It is conceivable that
someone will write a plugin that must be treated similarly and doesn't
produce an artifact. As a result this commit abstracts this "not
producing an artifact" feature of elements.
|
|
|
|
|
|
|
|
|
|
|
| |
As stack elements do not provide any artifacts, it is misleading to
allow them as dependencies for filter elements. This commit makes a
dependency on a stack element a failure with a descriptive error
message.
Additionally adds a test to make sure this works.
Addresses #1104
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is tedious to manually copy the integration commands of the parent
element into a filter element, so this allows it to be done
automatically. Here we modify FilterElement.integrate() to allow us to
pass through the parent's integration commands, iff an option is set.
Also adds a test for the new feature, but this is not as comprehensive
as would be idea, as getting to the integration commands which are run
is a little more difficult.
Addresses #1107
|
|
|
|
|
|
|
|
| |
source checkout supports --deps all, so we should be
consistent.
Additionally, a user may want to have build deps in a
potential chroot so you could rebuild any component.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This MR changes the behaviour of source checkout so that it is more
like artifact checkout. That is, a --directory option can be provided,
rather than a mandatory LOCATION.
In addition to this, the --tar option is no longer a boolean flag,
rather it expects a tarfile name (just like artifact checkout)
The appropriate tests have also been altered so that they support
the new API
|
|
|
|
|
|
| |
In "test_source_checkout_force()" we had a commented out line
of code. This has been removed and a more useful comment has been
added.
|
| |
|