summaryrefslogtreecommitdiff
path: root/tests/frontend/track.py
Commit message (Collapse)AuthorAgeFilesLines
* Expose basic api for testing external plugins.phil/plugin-testing-apiPhil Dawson2019-02-081-1/+2
| | | | | | | | | | | | | | | | | | 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
* tests/frontend/track.py: test_track_error_cannot_write_file() fixupTristan Van Berkom2019-01-241-4/+3
| | | | | | | | | This tests how BuildStream reacts when it fails to write the tracking results to the element files or project.refs file, which is an operation that plugins do not play a part in. As such, removing the per repo kind parameterization from this test as multiple runs are redundant here.
* tests/frontend/track.py: Refactored to use get_element_states()Tristan Van Berkom2019-01-241-8/+12
|
* tests/testutils/runcli.py: Make get_element_states() take a list of targetsTristan Van Berkom2019-01-241-2/+2
| | | | | Instead of a single target, we can always provide a single target in a list.
* tests/frontend/track.py: Use test_track_recurse() to stress test SourcesTristan Van Berkom2019-01-181-13/+47
| | | | | | | | This causes multiple source instances to interact with the same backing data store at the same time, increasing the likelyhood of triggering issues around concurrent access. This more reliably triggers issue #868
* Introduce new "source" command groupChandan Singh2018-12-141-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Report processing errors from trackingValentin David2018-08-301-0/+34
| | | | | | Failures to write files when tracking were not reported. Fixes #533.
* Fix tracking of junctions used in project.conf.Valentin David2018-08-131-0/+22
| | | | | | | | | | | | | | Stream._load() now returns early without resolving build pipeline when only tracking. Resolving track pipelines does not require to fully load project configurations when when elements to track are only junctions. However build pipelines require to fully load project configurations. This might not be possible in the case a project configuration includes a file from a junction that yet needs to be tracked. Fixes #565.
* Add support for include '(@)' in project.conf and .bst filesValentin David2018-08-021-0/+132
| | | | Fixes #331.
* Move tests.frontend.generate_junction to test.testutilsValentin David2018-08-021-2/+2
|
* Allow tracking dependencies within sub-projects.Valentin David2018-06-081-0/+43
| | | | | | | --track-cross-junctions now concerns crossing junctions rather than forbidding elements in sub-project to be tracked. Part of #359.
* _stream.py: Add StreamError exceptionTristan Van Berkom2018-05-081-2/+2
| | | | Use Stream error for Stream errors.
* tests/frontend/track.py: Added test for `bst track --deps none`Tristan Van Berkom2018-04-191-0/+40
| | | | This guards against regressions of issue #367
* _frontend/cli.py, _pipeline.py: Add options for cross junction tracking.Tristan Van Berkom2018-04-121-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | This patch makes cross junction tracking disabled by default, which was the initial intention when landing project.refs but never got around to doing this (intended to get addressing of junctioned elements via command line sorted first, but didnt happen). This adds the following options to enable cross-junction tracking: o bst build -J / --track-cross-junctions o bst fetch -J / --track-cross-junctions o bst track -J / --cross-junctions This also fixes `bst fetch --track` which had a bug, it was avoiding to track and fetch elements which are in a `cached` consistency state, which is wrong when `--track` is specified. This also updates some test cases which were broken by this change. This fixes issue #354
* tests/frontend/track.py: Added junction related testsTristan Van Berkom2018-04-051-2/+76
| | | | | | | | | | | o Test that we bail out with the expected errors when the junction element in question is Consistency.INCONSISTENT o Test that tracking the junction itself, causes a subsequent show of the pipeline to not bail out anymore (tests that tracking works and persists for a junction element). Again these use both ref-storage modes.
* tests/frontend: Share the configure_project() functionTristan Van Berkom2018-04-051-6/+2
| | | | Make buildtrack.py and track.py share the same configure_project() helper.
* tests/frontend/track.py: Test that we fail gracefully for post tracking errorsTristan Van Berkom2018-03-211-0/+21
| | | | | | This tests that we handle errors from Source.get_consistency() in the post tracking state updates gracefully, one test added for a handled failure, and another test added for an unhandled/unexpected exception.
* tests/frontend/track.py: Testing behavior of cross junction trackingTristan Van Berkom2018-03-201-0/+74
| | | | | | | | o Test that this fails gracefully when the toplevel project uses inline ref-storage o Test that we successfully track cross junctioned elements when the project uses project.refs
* tests/frontend/track.py: Test tracking with optionalityTristan Van Berkom2018-03-201-4/+56
| | | | | | | Tests that `bst track` sets the ref in the expected node if the node containing the ref is conditionalized with a project option. This tests both the regular inline behavior, and also the project.refs behavior.
* tests/frontend/track.py: Testing that this works with project.refsTristan Van Berkom2018-03-201-1/+18
| | | | | | Only added condition to the simplest case here, the other cases are mostly testing that track commands get the correct selection of elements when using `--deps all` and `--except` arguments.
* tests/frontend: Updating tests to use new error checksTristan Van Berkom2018-01-011-6/+6
| | | | | This also fixes #177 - the problem here was solved simply by passing the project directory to `cli.run(project=project...)`
* Remove unused imports in test filesGökçen Nurlu2017-12-071-1/+0
|
* tests/frontend/track.py: Added tests for recursive tracking and --exceptTristan Van Berkom2017-10-301-10/+103
|
* Fix tests for other platformsTristan Maat2017-09-281-0/+1
|
* Restructuring tests using the Repo and CliTristan Van Berkom2017-09-041-4/+2
| | | | | | Make all the test batteries which run on all the source backends we have repo scaffoldings for discover the list of Repo implementations automatically.
* tests/frontend/track.py: Added test case for `bst track`Tristan Van Berkom2017-09-041-0/+57