| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
min-version
This test was broken as it was failing for the wrong reason, even though
in both cases it was a missing yaml key. Fix the test to fail due to it
being missing the required cert specified in the cache config.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This also enables local builds on non-Linux platforms, if a buildbox-run
implementation is available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* "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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
As discussed over the mailing list, reformat code using Black. This is a
one-off change to reformat all our codebase. Moving forward, we
shouldn't expect such blanket reformats. Rather, we expect each change
to already comply with the Black formatting style.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|
|
|
|
| |
This allows us to remove the platform reset helpers in
tests/conftest.py.
|
|
|
|
|
| |
Now that both are equivalent, we can skip the sanitization part before
the yaml call.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We currently have two sites file containing redundant information.
- tests/testutils/site.py: Remove IS_{LINUX,WSL,WINDOWS}
- rest: Change imports to import those from
buildstream/tests/_utils/site.py
|
|
|
|
|
| |
tests/sandboxes was missing an __init__.py, which meant pylint
was never run there.
|
|
|
|
|
|
|
|
|
| |
- Rename plugintestutils to testing.
- Don't run the tests from bst-plugins-template. This imports
buildstream.plugintestutils so will have to be disabled to get
through CI. This can be re nabled once bst-plugins-template has been
patched.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)'
|
| |
|
|
|
|
|
| |
For parameters that are required as part of an API, prefix them
by "_" to make it clear they are unused
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want external plugins to be able to make use of the core testing utils.
This commit exposes the basic utilities which are currently in use in
bst-external plugins. If necessary, more utilities could be exposed in the
future.
Moves the following files from tests/testutils/ to
buildstream/plugintestingutils/:
o runcli.py
o integration.py
As part of this, this commit makes the following changes to runcli.py
and integration.py:
o runcli.py: Fix linting errors
o runcli.py: Add user facing documentation
o Integration.py: Add user facing documentation
|
|
|
|
|
| |
This commit also ensures that if we try to use the 'old' commands,
BuildStream will fail and instruct the user to use the new command.
|
| |
|
|
|
|
|
|
|
|
|
| |
Other components will start to reply on cas modules, and not the artifact cache
modules so it should be organized to reflect this.
All relevant imports have been changed.
Part #802
|
|
|
|
|
| |
Tests that we get a sensible error message when we specify incomplete
or wrong information in the configuration for remote execution.
|
|
|
|
|
| |
The Context was only used to obtain a reference to the CASCache
and set the unused cas_directory field.
|
|
|
|
|
| |
This adds a `reason` to the SandboxEror thrown in sandboxdummy
to be able to understand where the error comes from
|
| |
|
|
|
|
|
|
|
| |
Before running a command in the sandbox, check its existence and fail
early if it does not.
This fixes issue #289.
|
| |
|
|
|