| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This is a regression test for issue #990
|
| |
|
|
|
|
|
|
| |
A subset of the functionality provided by this module is not
available from buildstream._site but is necessary for the templated
source plugin tests.
|
|
|
|
|
| |
Copy tests.testutils.junction into plugintestutils._utils. This is
needed for use by the templated source tests.
|
|
|
|
|
|
|
|
| |
This needs to be exposed as part of the plugin author facing API so
that plugin authors can define custom repo types which will can be
passed to the set of tests which iterate over multiple source types.
Part of the work towards #944
|
| |
|
|
|
|
|
|
|
|
|
| |
The 'platform' module in the standard library provides a more portable
version of uname(), which also works on Windows.
In CPython, the platform version is implemented in terms of the os
version:
https://github.com/python/cpython/blob/60875db2f67815d7d181c552bfac59e8c97619e3/Lib/platform.py#L747
|
|
|
|
|
|
|
|
|
|
|
| |
Combine the very similar override_uname_arch() and override_uname_os()
in a new helper function, to reduce duplication.
Also use a 'try/finally' block to ensure that the original
os.uname() is restored.
This will make it simpler to adopt platform.uname() instead in later
work.
|
|
|
|
|
| |
As the `bst push` is now called `bst artifact push`, update the
remaining comments in testsuite that still refer to it as `bst push`.
|
|
|
|
|
| |
As the `bst pull` is now called `bst artifact pull`, update the
remaining comments in testsuite that still refer to it as `bst pull`.
|
|
|
|
| |
Part of #965
|
|
|
|
|
|
|
| |
Now that we permit `key in somenode` remove the no longer needed function
to check if a node contains a key.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|
|
|
|
|
|
| |
Now that we permit `key in somenode` again, remove the unnecessary extra
API of Plugin.node_has_member()
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|
|
|
|
|
|
|
| |
Cyclic imports can be confusing because the order in which we import
dependencies can make the import fail or not. We should not rely on
ordering of imports for our code. This fixes everywhere possible the
imports and silence explicitely some which are not convenient or would
require big refactors
|
| |
|
|
|
|
|
|
|
|
|
| |
This adds the initial Artifact 'abstractions', taking existing
test methods into a dedicated Artifact class. The class is
accessed via an instance attribute of the generic Cli() fixture.
This is in preperation for AaaP, to ensure existing tests pass
whilst creating an entry point for further abstractions when
necessary.
|
|
|
|
|
|
|
|
|
|
|
| |
By default the reachable set() includes all file digests from a
given reachable directory/tree digest, however this does not
guarantee the file objects are actually reachable.
testutils/artifactshare.py has_artifact() ascertained if a given
artifact is available by ensuring any 'reachable' digests are
actually on the filesystem, this is made redudant with the optional
check_exists objpath check during the reachable set creation.
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace YAML internals with a new Node type, and refactor everything
to use it cleanly.
This work was also by James Ennis <james.ennis@codethink.co.uk>
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|
|
|
|
|
|
| |
The new YAML world order doesn't need the YAML cache, so remove it
before we begin the change.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|
|
|
| |
push_directory() is unused and will be removed.
|
| |
|
|
|
|
| |
Test that we error correctly when we junction-depend on a non-junction.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the tests that currently cover _get_loader ensure that we are
getting the expected provenance.
Note that for some tests, we must use yaml_file_get_provenance, as the
generated yaml is not stable across versions of ruamel.
In later work we may replace all instances of provenance string tests
with yaml_file_get_provenance, as it will be more robust to future
changes.
|
|
|
|
|
|
| |
Add a new helper - testutils.yaml_file_get_provenance, this will let us
make less fragile assertions about the presence of provenance in
BuildStream output.
|
|
|
|
| |
https://gitlab.com/BuildStream/buildstream/issues/629
|
|
|
|
| |
https://gitlab.com/BuildStream/buildstream/issues/629
|
|
|
|
|
|
|
|
| |
Unlike the --integration option that activates additional tests marked
with 'integration', this new --remote-execution option deactivates all the
tests except those marked with 'remoteexecution'.
https://gitlab.com/BuildStream/buildstream/issues/629
|
|
|
|
|
|
|
| |
Workspaced elements should not push their sources as consistency is
marked as cached even if the sources are not necessarily available.
Part of #440
|
|
|
|
|
|
|
| |
Adds a plugin build element that always fails. The test tries to build
an element of this kind.
Part of #440
|
|
|
|
|
|
| |
Ensures that remote source cache and artifact caches work fine together.
Part of #440
|
|
|
|
| |
Part of #440
|
|
|
|
| |
Part of #440
|
|
|
|
| |
Part of #440
|
|
|
|
|
|
|
| |
Updates other queues and widget to have consistent naming and display,
and tests have been updated to reflect this.
Part of #440
|
|
|
|
| |
Part of #440
|
|
|
|
|
|
|
| |
Checks buildstream calls fetch method when remote source cache does not
have a source.
Part of #440
|
|
|
|
| |
Part of #440
|
|
|
|
|
|
|
| |
Move both `has_push_remotes` and `has_fetch_remotes` from
`ArtifactCache`.
Part of #440
|
|
|
|
|
|
| |
Outside tests, CASCache.checkout() is used only in
CasBasedDirectory.export() and we don't want to silently ignore missing
directories when exporting files.
|
| |
|
|
|
|
| |
Part of a fix for !1124
|
|
|
|
|
|
| |
This means that keys are only generated after tracking.
Part of a fix for !1124
|
|
|
|
|
| |
This allows pytest to show a better report of the difference between
the two lists and not just tell that one entry is wrong.
|
|
|
|
|
|
|
|
| |
No need to define CACHE_SIZE_FILE in _artifactcache, it is not used here
by the main application, and it is already defined and used in
_cas.cascache.
Fixup the reference in tests to refer to _cas.cascache instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace some popular copypasta.
This important-looking invocation:
os.path.join(datafiles.dirname, datafiles.basename)
is equivalent to this shorter invocation:
project = str(datafiles)
It seems like it's very popular copypasta, replace it with the shorter
one thus:
# Use 'gsed' or 'sed' etc. as appropriate for your system.
git config --global alias.sub '!f() { git grep --name-only --null "$1" | gxargs --null gsed --in-place --expression "s/$1/$2/g" ; }; f'
git sub 'os.path.join(datafiles.dirname, datafiles.basename)' 'str(datafiles)'
|
|
|
|
|
|
|
|
|
|
| |
- Tests that the target is still built even when a workspace is open
on a runtime dependency of a build-only dependency.
- Tests that the target is still built even when a workspace is open
on a runtime dependency of a runtime dependency of a build-only
dependency
This adds the regression test provided by Matthew Yates for issue #919
|
|
|
|
|
| |
Pylint can't know that pytest's fixtures are used in a file and
therefore reports false positives. Silencing all those errors
|
|
|
|
|
| |
Pylint doesn't play well with pytest fixtures, we therefore need to
silence this error.
|
| |
|