| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
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.
|
|
|
|
|
| |
This allows pytest to show a better report of the difference between
the two lists and not just tell that one entry is wrong.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
- Remove all wrong-import-order from pylint
- Order some subgroups of imports
|
| |
|
|
|
|
| |
The removed tests duplicate tests in the same file with the same name.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we're creating a project for a junction, then don't go looking for
the project directory - the path has already been given to us.
This means that we can now detect when junctions are missing a
'project.conf', and importantly we don't accidentally start resolving
elements in the enclosing project.
Add tests to cover workspaced, local, and git repo cases. Note that
this is also the first test coverage for the INVALID_JUNCTION path.
In later work we might extract the _find_project_dir magic out of the
Project class, so that there are no surprises when instantiating it.
|
| |
|
|
|
|
|
|
|
| |
boundaries
These include assertions for the expected provenance in the errors,
protecting against regressions of #947
|
|
|
|
|
| |
These also assert that the provenance of the references to missing
files are reported, guarding for regressions of issue #947
|
| |
|
|
|
|
|
| |
For parameters that are required as part of an API, prefix them
by "_" to make it clear they are unused
|
| |
|
|
|
|
|
| |
Don't create and remove temp dirs unnecessarily when they are not used,
looks like these were just copy-pastes without intended side-effects.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, include a directory result in an error like this:
mydir is a directory. bst command expects a .bst file.
Note that the file containing the include was not mentioned.
Now we get an error like this instead:
element.bst [line 12 column 0]: Include block references a
directory instead of a file: 'mydir'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a missing include would result in an error like this:
Could not find file at not-a-file.include
Note that the file containing the include was not mentioned.
Now we get an error like this instead:
element.bst [line 7 column 5]: Include block references a file that
could not be found: 'not-a-file.include'.
|
|
|
|
| |
Use the provenance of the include block, instead of the whole node.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 marks 'bst checkout' as a 'hidden' command. If used,
the user will be prompted to use the new 'bst artifact checkout'
command.
All tests which used 'bst checkout' have been modified to use
the new artifact sub-command.
This partially solves #822.
|
|
|
|
| |
This is the directory for all things related to loading.
|
| |
|
|
|
|
| |
Remove some redundancy from the test lines.
|
|
|
|
|
|
| |
This is where other load time related plugin error handling is
checked, and is the last thing to remove in the `tests/pipeline`
directory.
|
|
|
|
|
|
|
| |
The tests/format/project.py test already has some tests about how
we error gracefully for bad plugins and bad plugin configurations,
lets put it there rather than tests/pipeline/load.py which we
will remove.
|
|
|
|
|
|
| |
Created new `tests/format/iteration.py` which tests the order in
which elements are iterated over in various scopes in a loaded
data model.
|
|
|
|
| |
This used to be an internal test, converted this to use the `cli` fixture.
|
| |
|
|
|
|
|
|
| |
dictionaries
This adds a regression test for issue #803
|
|
|
|
| |
Same format as OptionArch tests, but with OS's.
|
|
|
|
| |
Also update tests to be consistent with this
|
|
|
|
|
|
|
| |
cmake sometimes misinterprets relative paths as relative to the current directory
if this is not specified. See freedesktop-sdk/freedesktop-sdk#431
adjust tests/format/variables.py accordingly.
|
| |
|
|
|
|
|
|
|
| |
Adding the conf-root variable makes creating out of source builds
slightly easier.
For issue #512 in Gitlab.
|
|
|
|
|
|
|
|
|
| |
The issue happens on Silverblue where /home is a symlink to /var/home.
With this element-path is something like
/var/home/user/project/elements, when the project path is
/home/usr/project. Comparing canonical paths solves the issue.
Fixes #673
|
| |
|
|
|
|
| |
This is a regression test for issue #658
|
|
|
|
|
| |
Note: This modifies the docker containers used for testing to supply the
pytest-timeout package.
|
|
|
|
| |
Fixes #331.
|
| |
|
|
|
|
|
|
|
|
| |
When initializing the project, BuildStream will continue searching for
project.conf in parent directories in case it is not found in the
current directory.
Fixes #368.
|
|
|
|
|
|
| |
We have machine readable errors for this purpose, and the
strings happen to change causing tests to break if we test the specific
UI (reported error strings are UI).
|
| |
|
|
|
|
|
|
|
| |
This uses the build tool mode of cmake to have a single command that can call
either make or ninja.
I've also modified the tests to take the new commands into account
|