| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This is a regression test to skip push only if server has identical
artifact.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Test various scenarios of overriding junctions, including
deep paths as junctions to override, and as junctions to use
to override.
* Test conflicting junction configurations, ensuring that we
report both provenances of where the junctions were declared.
* Test circular references in element paths while declaring overrides,
for instance when trying to override a subproject using a deeper
definition of the same subproject.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit refactors the junctions test to use more parameterization
and to remove copy_subproject(), using statically committed data as
much as possible.
This is because copy_subproject() causes data to be shared among tests
in such a way that when such data get's modified, it easily causes
unintended side effects on adjacent test cases, better to keep this
data separate.
Overview of changes:
* Remove copy_subproject()
* Split up test data into case specific directories, sometimes
reusing a directory among various related tests
* Use @pytest.mark.parameterize() as much as possible for better
coverage and more clearly expressed test cases
* Adds update_project() to modify a project.conf inline, as is
done in some other tests like tests/plugins/loading.py
* Removes tests related to junction name coalescing, this feature
will be removed later in this branch and other tests related
to junction overrides will replace these.
* Removes some redundant tests
* Removes a comment about how junction name coalescing can cause
errors when trying to open a junction but the project.conf is
missing. We continue to test missing project.conf files in a
variety of scenarios, but the comment will be rendered irrelevant
with the removal of junction name coalescing.
* Change the git related tests to use tar instead, this serves
the same purpose, but tar will remain a core plugin in BuildStream 2.
|
|
|
|
|
| |
Otherwise some of BuildStream's config will fail and it is therefore
impossible to just run `pytest tests/`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of passing around many details though calling signatures
throughout the loader code, create a single LoadContext object
which holds any overall loading state along with any values which
are constant to a full load process.
Overall this patch does:
* _frontend/app.py: No need to pass Stream.fetch_subprojects() along anymore
* _loader/loadelement.pyx: collect_element_no_deps() no longer takes a task argument
* _loader/loader.py: Now the Loader has a `load_context` member, and no more
`_fetch_subprojects` member or `_context` members
Further, `rewritable` and `ticker` is no longer passed along through all
of the recursing calling signatures, and `ticker` itself is finally removed
because this has been replaced a long time ago with `Task` API from `State`.
* _pipeline.py: The load() function no longer has a `rewritable` parameter
* _project.py: The Project() is responsible for creating the toplevel
LoadContext() if one doesn't exist yet, and this is passed through
to the Loader() (and also passed to the Project() constructor by the
Loader() when instantiating subprojects).
* _stream.py: The `Stream._fetch_subprojects()` is now private and set
on the project when giving the Project to the Stream in `Stream.set_project()`,
also the Stream() sets the `rewritable` state on the `LoadContext` at the
earliest opportunity, as the `Stream()` is the one who decides this detail.
Further, some double underscore private functions are now regular single
underscores, there was no reason for this inconsistency.
* tests/internals/loader.py: Updated for API change
|
| |
|
|
|
|
|
|
| |
Remove tests which check for a user message to be issued upon closing
a workspace who's metadata was used to launch BuildStream and find
the BuildStream project directory.
|
|
|
|
|
| |
Do not copy file mode from casd object file. Do not change
non-executable mode bits if file is executable.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of raising a customized error message which adds little
value to the provenance, just pass the provenance along.
This is important so that the Loader is aware of the provenance
of loaded junctions, so that it can more precisely report errors
about conflicting junctions when includes cause conflicts.
This commit also adjusts tests/format/includes.py
|
| |
|
|
|
|
|
|
|
|
| |
* Test that we succeed to load links with full path targets
* Test that we get correct provenance information in errors when
linking to non-existing elements in existing subprojects, using
full paths.
|
|
|
|
|
|
|
|
|
|
| |
Added tests to cover:
* Successfully loading plugins with full paths in junction origins
* Failing to load missing plugins in sub-junctions which are successfully loaded
* Failing to load missing plugins in sub-junctions which are invalid and couldnt load
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verifying for variables (all used variables defined and no cycle) is
much faster than flattening them. It also uses much less memory. Only
`bst show -f "%{vars}"` requires to flatten all variables. For other
cases we can improve performance by only checking rather than
flattening.
Also flattening very nested variables could lead to very long lists of
empty strings. The memory usage for flattening could be a lot bigger
than the resulting value. Force flattening and caching every
variable definitions can improve intermediate memory consumption and
only consume memory of the size of the result.
Finally, an optimization allowed inifinite cycles leading to
segmentation fault. This was solved by simplifying the code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes:
* The `target` feature from the junction plugin
* Special case code in the loader for the `target` feature
* The `target` related cases in tests/format/junctions.py
This also adjusts the `target` related documentation in
the `junction` element to suggest using a `link` element for
the purpose of using a subproject junction configuration to
access a common sub-subproject.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
While adding a mock task object to track progress in some loader
tests in commit 17144d84c2b63daf6e3aa9b42c6c773f134e8660, a new
`_NO_PROGRESS` object was added as an explicit marker to denote
that progress information should not be reported.
This complicates the code, None should be a sufficient value
for not reporting progress, while still permitting mock task
objects to capture progress if desired.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug introduced by d7d18c1a2e454c507afd9e1d3f1358639dd43871,
where public data integration commands and others would never get their
data expanded and would thus fail to run.
The previous however revelead a previous bug, where variables values in
public data of elements would not be part of the cache key of an element
or it's reverse dependencies, and thus, on variable change, rebuilds
would not happen when they would have been needed.
This ensures that all the public data is always resolved and part of the
element's cache key. This however will bring a rebuild of an element
whenever its integration commands variables change, which is simpler to
handle than to try to push that responsibility on reverse dependencies,
since public data can contain plugin-defined values.
|
| |
|
| |
|
|
|
|
| |
Make sure build-only dependencies are pulled only when necessary.
|
| |
|
|
|
|
|
| |
This ensures that when resolving variables, we do not overwrite the
values for a different element in the case we were using composition.
|
|
|
|
|
|
|
|
| |
Use non-greedy search to ensure that we stop at the next closing brace.
Otherwise, for a string like `%{variable} {variable}`, the second
variable will also get substituted.
Fixes #1307.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we are not recursing, `Element.dependencies()` uses a much more
light weight codepath since it just needs to print the direct
dependencies. However, this simple codepath was not accounting for
duplicates, in case something is both a build time and run time
dependency.
One way this manifested itself was in `bst show --format %{deps}`, but
it would also affect anything that was using this method to iterate on
the dependencies.
Fixes #1308.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This can be quite handy when one is preparing to open a build shell.
This originally came up in
https://gitlab.com/BuildStream/buildstream/-/issues/685#note_105460896.
|
| |
|
|
|
|
|
| |
This automatically expands the variables from the element into
the sources config
|
|
|
|
|
|
|
|
|
|
| |
`command-subdir` was previously missing from the cache key. This patch
makes it a part of the cache key _if_ it was specified. It means that
the cache key will not change for elements that had not defined a
`command-subdir`. However, it will change for every element that did
define it.
Fixes #1295.
|
|
|
|
|
| |
This allows plugin authors to implement cache keys tests
more easily
|
|
|
|
|
|
|
| |
The result of `bst artifact checkout` invocation was not correctly
assigned to the result object in a few places. Hence the assertion on
the next line was really testing the same thing as the previous
assertion, i.e. the result of `bst build`.
|
|
|
|
| |
Also fix linting errors coming with new version of pylint
|
| |
|
|
|
|
|
| |
The pip element was copied already to bst-plugins-experimental.
We don't need to have two copies of it.
|
| |
|
|
|
|
|
|
|
| |
This test is automatically skipped when the required package is
not installed, which can happen when running pytest directly, which
is supported in order to help distribution maintainers test whether
BuildStream works properly on their distribution.
|
|
|
|
|
|
|
|
|
|
| |
This commit:
* Adds a bare bones BuildStream pip plugin package structure at
tests/plugins/pip-samples/sample-plugins
* setup.cfg: Adds tests/plugins/pip-samples to the norecursedirs so that
we don't consider the dummy plugins as test code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly a semantic change which defines how deprecation warnings
are suppressed in a more consistent fashion, by declaring such suppressions
in the plugin origin declarations rather than on the generic element/source
configuration overrides section.
Other side effects of this commit are that the warnings have been enhanced
to include the provenance of whence the deprecated plugins have been used in
the project, and that the custom deprecation message is optional and will
appear in the message detail string rather than in the primary warning text,
which now simply indicates that the plugin being used is deprecated.
Documentation and test cases are updated.
This fixes #1291
|
|
|
|
| |
This new test replaces the test in tests/format/project.py.
|