| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This test was added to consider the edge case when a unreadable file is being
added to CAS.
|
|
|
|
|
| |
This makes the 'Node' API public, and available for use directly for
plugins.
|
|
|
|
| |
- adapt all call sites to use the new API
|
|
|
|
|
|
|
| |
This new methods is here to replace the previous 'new_node_from_dict'
that will be moved to a private method.
Adapt all call sites to use the new 'from_dict' method.
|
|
|
|
|
| |
Now that both are equivalent, we can skip the sanitization part before
the yaml call.
|
|
|
|
|
|
| |
- Implement __setitem__ on 'MappingNode'
- Implement __setitem__ on 'SequenceNode'
- Adapt all call sites to use the new calling way.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- 'as_bool()' casts a ScalarNode into a boolean, understanding both
'True' and 'False' as truthy-falsy values, as per node_get(type=bool)
behavior
- 'is_none()' allwos checking whether the scalar node contains a 'None'
value. Since 'None' cannot be used when working with booleans, we need
to have a way of checking for 'None' when we actually need the
information of whether the value is unset.
- Adapt all call places to use the new API
|
|
|
|
|
|
|
|
|
|
| |
- 'get_scalar()' allows retrieving a scalar node from a mapping.
- 'as_str()' casts a ScalarNode into a string (thus removing the node
information).
Both together, those replace 'node_get(mapping, key, type=str)' but
also allow retrieving the 'Node' itself, which will allow in the future
lazier provenance computation.
|
|
|
|
|
|
|
|
| |
This allows to get a mapping node from another 'MappingNode',
replacing 'node_get(my_mapping, key, type=dict)'
Also changes all places where 'node_get' was called like that by
the new API.
|
|
|
|
|
| |
This is needed in the case where the temp directory permissions
are changed between creation and deletion.
|
|
|
|
| |
Fixes #1052
|
|
|
|
|
|
| |
Calling '_yaml.dump' will itself call '_yaml.node_sanitize', therefore
we can remove all calls to it in places where we directly after call
dump.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update 'source_config' of Git and _SimpleGit to match the Repo base
class. This ensures that they are fully substitutable Repos.
Introduce 'source_config_extra' to allow explicit usage of extended
functionality, which wouldn't necessarily be supported by a different
subclass.
By making the signatures deliberately match, we can use PyLint to ensure
the signatures don't accidentally differ.
|
|
|
|
|
|
|
|
| |
We have two different 'site' files that are redundant and both
define some variables in BuildStream environment.
Remove HAVE_SANDBOX from tests/testutils/site.py and change all imports
to point to the other one
|
|
|
|
|
|
|
| |
We have two different 'site' files that are redundant and both
define some variables in BuildStream environment.
Moving all the arpy related ones in a single place.
|
|
|
|
|
|
|
| |
We have two different 'site' files that are redundant and both
define some variables in BuildStream environment.
Moving all the lzip related ones in a single place.
|
|
|
|
|
|
|
| |
We have two different 'site' files that are redundant and both define
some variables in BuildStream environment.
Moving all the git related ones in a single place.
|
|
|
|
|
|
|
| |
We have two different 'site' files that are redundant and both define
some variables in BuildStream environment.
This is a first step in consolidating them in a single file
|
| |
|
|
|
|
|
|
|
| |
This is an element option that allows sources to be staged more
seperately where possible rather than on a per element option.
Part of #982
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the refs in the job process (but doesn't write), to ensure
following sources can see consistency of previous sourcse has been
updated. `_save_ref` is renamed `_set_ref` with writing to file now
optional.
This also changes the previous_source_access test to use a remote, so
that it actually tests this cornercase.
Fixes #1010
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'local' kind is hard coded in the parameter list of on test in
testing._sourcetests as so will always run regardless of what plugins
have been registered.
Remove this special casing by duplicating the test in the local source
specific test.
Ideally, the local source should have a Repo implementation and be
registered with the templated tests.
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Part of a fix for !1124
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix all pylint unused-variable issues
|
|
|
|
|
| |
- Remove all wrong-import-order from pylint
- Order some subgroups of imports
|
|
|
|
|
|
|
| |
Move the templated tests in tests/frontend/workspace.py into
sources/generic/workspace.py
This is part of the preparation work for #944
|
|
|
|
|
|
|
| |
Move the templated tests in tests/frontend/source-determinism.py into
sources/source_determinism.py
This is part of the preparation work for #944
|
|
|
|
|
| |
Move the templated tests in tests/frontend/track.py into
sources/generic/track.py
|
|
|
|
|
|
|
| |
Move the templated tests in tests/frontend/track_cross_junction.py into
sources/generic/track_cross_junction.py
This is part of the preparation work for #944
|
|
|
|
|
|
|
| |
Move the templated tests in tests/frontend/buildcheckout.py into
sources/generic/buildcheckout.py
This is part of the preparation work for #944
|
|
|
|
|
|
|
| |
Move the templated tests in tests/frontend/mirror.py into
sources/generic/mirror.py
This is part of the preparation work for #944
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Subprocesses can return decoded strings if we give them a
"universal_newlines=True" argument. We can therefore offload that to
them, and not explicitly decode output ourselves.
This also fixes multiple bugs where we would not be respecting the
locale used by the user, and in some cases force it to "ascii".
|
| |
|