| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`tests/frontend/buildcheckout.py` is already very crowded with all sorts
of tests. Since this test is not really about testing `bst build` but
rather about testing whether BuildStream can detect the default targets
correctly, move it to a separate test module.
At the same time, also improve the actual tests. Currently the test
compares the number of sub-directories in BuildStream log directory with
the number of elements. Change it such that we directly query
BuildStream about what's been built rather than trying to guess.
While doing so, sanitize its project directory to make it clearer what's
being tested.
|
|
|
|
|
|
|
|
|
|
| |
These were caused by unhandled errors from plugins when calling
`Source.get_consistency()`. This doesn't really solve the problem,
since that interface is still used un-wrapped elsewhere, but it
enables removing `Element.__schedule_tracking()` and fixes a bug.
Ultimately we'd like to remove `Source.get_consistency()`, so this
isn't too long-term of a problem.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This replaces the helper method by adding a 'get_provenance' on the node
directly
- Adapt all call sites
- Delay getting provenance wherever possible without major refactor
|
|
|
|
|
| |
Now that both are equivalent, we can skip the sanitization part before
the yaml call.
|
|
|
|
|
|
| |
This function is hard to make generic and, with the new API, the access
is simplified. Therefore, removing this function and migrating all its
usages
|
|
|
|
|
|
|
|
| |
Now that the `buildstream` module is inside `src` directory, `pylint`
treats `buildstream` as a third party module inside `tests`. As such, it
wants the imports from `buildstream` to be placed before imports from
`tests`. Adopt this style to fix the lint errors, which is probably also
good for readability.
|
|
|
|
|
|
| |
non-strict mode
This is a regression test for #1018
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)'
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Removes all the ones thare were not needed
Whitelist the ones that are actually needed for side effects
|
|
|
|
|
|
|
|
| |
Create tests/sources/basic_functionality.py for templated source
tests and move the templated tests in tests/frontend/fetch.py into
sources/generic/fetch.py
This is part of the preparation work for #944
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following the message thread
https://mail.gnome.org/archives/buildstream-list/2018-November/msg00106.html,
implement a new command group called `source`. Move existing `track`,
`fetch`, and the recently added `source-checkout` commands under this
group.
For `track` and `fetch`, this is a BREAKING change, as the old commands
have been marked as obsolete. Using them will result in an error message
that refers people to use the new versions, like `bst source fetch`
instead of old `bst fetch`. `source-checkout` will now become
`source checkout` (the dash has turned into a space), and is not a
breaking change as it was added in the current development cycle.
Note that the functionality to hide commands from help output was added
only recently in Click, so the minimum version of Click that we now
require is 7.0.
Summary of changes:
* _frontend/cli.py: Add `source` command group, mark previous versions
as obsolete and hide them from the help output.
* _frontend/complete.py: Fix completion for hidden commands.
* setup.py: Bump Click minimum version to 7.0.
* tests: Update to cope with the new command names.
Fixes #814.
|
| |
|
|
|
|
|
|
| |
'a.bst:b.bst' gets interpreted as 'b.bst' from junction 'a.bst'.
Part of #359.
|
|
|
|
|
|
|
|
|
|
|
|
| |
o _projectrefs.py: Additional constructor option to choose the base name
o _project.py: Load two ProjectRefs objects, one for the junctions
o source.py: Load and save junctioned source refs with the appropriate ProjectRefs object
o tests: Updated some tests to expect junctions to be stored in junction.refs
This fixes issue #361
|
|
|
|
|
|
|
|
|
|
| |
o This tests that a Consistency.RESOLVED junction will automatically be fetched
when `bst fetch` is run on a pipeline which refers to a junction.
o Further, it tests that a Consistency.INCONSISTENT junction will bail
out with the expected error message
Again testing with both ref-storage modes
|
|
|
|
|
|
|
|
|
|
| |
Added a test that handled errors are reported at load time as expected.
Added another test that we get the expected exception. This needs to
be fixed, test contains FIXME: comment explaining that we could be
doing much better here.
This should be fixed in the context of issue #197
|
|
|
|
|
| |
This also fixes #177 - the problem here was solved simply
by passing the project directory to `cli.run(project=project...)`
|
|
|
|
|
|
| |
Make all the test batteries which run on all the
source backends we have repo scaffoldings for discover
the list of Repo implementations automatically.
|
|
|