| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
This was done so that the files can be re-used with different
project.conf.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
A LocalPath was being passed into os.path.isabs, which failed when it
tried to call the path's startswith method.
Converting it to a string before using _yaml.dump seemed to solve the
problem.
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new test for parsing artifact cache configuration, which
calls the helper function from the 'artifactcache' module directly
rather than trying to assert based on blind push and pull commands
whether or not we got the complex precedence rules exactly right.
This means frontend push/pull tests no longer need to be so thorough
about testing precedence but they are instead expanded to assert that
multiple caches work correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extends the 'artifacts' configuration block such that a list of
`url` mappings can be given instead of a single entry. For example:
artifacts:
- url: http://example.com/artifacts1
- url: ssh://ostree@example.com/artifacts2
The OSTreeCache class is updated to set up multiple remotes and query
remote refs from all of them.
There are no automated tests for this yet.
Empty URLs ('') now raise an exception. They cause breakages internally
if we allow them through, and they can only occur if the user or our
tests are misconfiguring things somehow.
We report failure to fetch from the cache by printing a message to
stderr for now. This is because BuildStream's actual logging
functionality can't be used during frontend init -- see issue #168.
|
|
|
|
|
| |
Minor tweak to hopefully make the test cases a bit shorter and more
readable, in preparation for adding more.
|
|
|
|
|
|
|
|
| |
This works around an inconsistent behavior with setuptools.
Newer versions of setuptools fail to preserve symbolic links when
creating a source distribution, meaning that tests run from the
dist tarball will fail.
|
|
|
|
|
|
|
| |
We had a cache key instability issue with local sources generating
inconsistent cache keys due to iterating over their files in
a random order. Tests did not catch this previously due to the local
source sample only using one file to iterate over.
|
|
|
|
| |
error time
|
| |
|
|
|
|
|
|
| |
Enhanced the error checking Result() methods to always assert that
the CLI actually exited, there are no cases worth testing for where
buildstream would be expected to exit on an unhandled exception.
|
| |
|
|
|
|
|
|
|
|
|
| |
It looks like this newly added test assumes the user has a very recent
version of pytest, which supports treating the `tmpdir` fixture like
a string.
A reasonable alternative to this patch would be require at minimum
a version of pytest which supports this newly introduced API.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a context manager that can be used to divert file writes into a
temporary file, which is then renamed into place once writing is
complete. It is primarily intended for use by source plugins which
download files, so they can ensure that their downloads appear atomic
and there is no risk of leaving half-downloaded files in the cache.
So far this is not used in the core, but it is needed by the Docker
source plugin that is proposed for the bst-external plugins repo. See:
https://gitlab.com/BuildStream/bst-external/merge_requests/9
|
|
|
|
|
| |
This has remained without test coverage mostly due to upstream
pytest-datafiles bug https://github.com/omarkohl/pytest-datafiles/issues/1
|
|
|
|
|
|
|
|
| |
Seems that local.py is an appropriate plugin to use for testing
errors which originate from the abstract Source class.
This test checks that we raise the appropriate error in the case
that we attempt to stage to a directory that is a regular file.
|
|
|
|
|
| |
This also fixes #177 - the problem here was solved simply
by passing the project directory to `cli.run(project=project...)`
|
| |
|
| |
|
|
|
|
|
|
| |
Also added a test case for the `patch` plugin which checks for graceful
failure when the specified patch file is not a regular file (but a block
device or a named pipe instead).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this, we only stored the last exception to have been raised in the main
process, now we additionally provide some Result members allowing tests to
inspect a machine readable error `domain` and `reason` describing why
a task has "failed".
This adds some new APIs to the Result() object for tests:
assert_main_error() - asserts the nature of the main buildstream error
assert_task_error() - asserts the nature of the error from a child task
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Checking for plugins with the same name no longer happens in the
plugincontext, it happens in project, so the old test was removed and a
new one added.
|
|
|
|
| |
And also adapted them to remove any occurrences of HAVE_ROOT.
|
|
|
|
|
| |
There is no scenario worth testing where this condition is
not true, removing this.
|
|
|
|
|
| |
We need this now in order to properly test the frontend and
parse logs from stderr or output from stdout.
|
| |
|
|
|
|
|
|
|
|
| |
Pulls will fail from the cache if there's no summary file, so we should
always create one.
If you need a cache that breaks when pulled from, pass an empty
directory that hasn't been initialized as a repo at all.
|
|
|
|
|
|
|
|
|
|
|
| |
The cache parameters are now in highest-to-lowest precidence
order corresponding to left-to-right along the line where they are
specified.
Once we make it possible to specify a list of URLs for each of these
parameters, the precidence will continue to always read from highest
to lowest corresponding to left-to-right since each list of URLs
will also read left-to-right.
|
| |
|
|
|
|
|
|
|
|
|
| |
o Test that we fail gracefully when there is already data in
the checkout target
o Test that we still checkout into dirty directories with --force
o Test hardlink checkouts
|
|
|
|
|
|
|
|
|
|
| |
Pytest defaults to capturing stdout, which has the side effect of making
BuildStream realise it's not outputting to a terminal and disabling its
ANSI colour code output.
If you pass `--capture=no` then BuildStream detects the terminal and the
colour codes are emitted, which breaks all of the tests which match on
specific output from `bst`. Forcefully disable colours to fix that.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the common practice with cmake
Actually, some modules will fail to build if this is not follow. For
example for llvm you wil get this error when configuring:
"
CMake would overwrite the makefiles distributed with LLVM.
Please create a directory and run cmake from there, passing the path
to this source directory as the last argument.
"
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This is possible now that the SSH protocol can redirect to the
appropriate pull URL.
Note that this commit makes no attempt at backwards compatibility.
Everthing will break!
|
|
|
|
|
|
|
|
| |
On interruption, this makes buildstream to accept the first character of all
the possible choices as if it was the full command. This behavior has been
added to the failure screen and to the interruption screen.
Fixes https://gitlab.com/BuildStream/buildstream/issues/130
|
|
|
|
|
|
|
| |
This reverts commit d05f0f433979a6ae79667bb51d4a7a5f365941d6.
Reverting this commit, seems to consistently break the cmake
integration test when running on gitlab
|
|
|
|
|
|
|
|
| |
On interruption, this makes buildstream to accept the first character of all
the possible choices as if it was the full command. This behavior has been
added to the failure screen and to the interruption screen.
Fixes https://gitlab.com/BuildStream/buildstream/issues/130
|
|
|
|
|
|
|
|
|
| |
Make this into a single paramaterized test case and test a few more
combinations:
o Ensure that excepting works with multiple targets in play
o Ensure that multiple exceptions succeed in excepting the commonly
depended elements which are otherwise referred to by the target
|
|
|
|
| |
argument
|
| |
|
| |
|