summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests/sources/git.py: Test that we ignore inconsistent submodules.Tristan Van Berkom2018-03-222-0/+40
| | | | | | | Test this at `bst track` time, when encountering a new ref which adds a .gitmodules file but does not actually add the submodule, we check that the expected warning is in the stderr and that BuildStream does not error out for this.
* tests/testutils/repo/git.py: Add new add_file() convenienceTristan Van Berkom2018-03-221-1/+11
| | | | To write tests which add and commit a file.
* git.py source plugin: Ignore inconsistent submodules.Tristan Van Berkom2018-03-221-4/+11
| | | | | | | | | If a submodule is listed in either the buildstream git source definition, or in the .gitmodules file; but is not a valid submodule which was added with `git submodule add`, we now emit a warning and avoid exploding in the user's face. This fixes issue #299
* _scheduler/trackqueue.py: Remove unsafe calls to push/pop message depthTristan Van Berkom2018-03-211-3/+0
| | | | | These messages have been silenced more reliably already in Source._update_state(), using the Context._silence() context manager.
* _context.py: Fix Context._silence() context manager.Tristan Van Berkom2018-03-211-2/+4
| | | | | | This needs to yield in a try: block, otherwise messages remain silenced after an exception passes through this context manager.
* tests/frontend/fetch.py: Test failure modes of Source.get_consistency()Tristan Van Berkom2018-03-211-4/+29
| | | | | | | | | | 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
* tests/frontend/track.py: Test that we fail gracefully for post tracking errorsTristan Van Berkom2018-03-218-0/+110
| | | | | | 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.
* _scheduler/queue.py: Handle errors in task post processing gracefully.Tristan Van Berkom2018-03-211-10/+46
| | | | | | | | | When errors occur after having processed an element, leaving these unhandled results in a stack trace that is partially covered up by the status area, and a hang is caused because we fail to update the queues properly with the failed element. This greatly improves the situation for issue #197
* _message.py, _frontend/widget.py: Reviving MessageType.ERRORTristan Van Berkom2018-03-212-5/+12
| | | | | | | | | | We need to distinguish between: o Errors which occurred in a task, and are related to a log file and an elapsed time. o Errors which occurred in the main process and are not related to any timed activity
* .gitlab-ci.yml: Pin the sphinx version to 1.7.1tristan/fix-docs-builds-in-ciTristan Van Berkom2018-03-211-1/+1
| | | | | | | The new version today 1.7.2 causes the following build error: Warning, treated as error: /builds/BuildStream/buildstream/dist/buildstream/doc/source/buildstream.sandbox.rst:document isn't included in any toctree
* _scheduler/trackqueue.py: Fixed to report proper processed status.Tristan Van Berkom2018-03-211-1/+3
| | | | This was a regression from the project.refs branch recently landed.
* source.py: Source._save_ref() should return saved stateTristan Van Berkom2018-03-211-0/+5
| | | | So we can report proper processed status from tracking queues
* index.rst: Fixed typo in About BuildStreamJames Ennis2018-03-201-1/+1
|
* source/conf.py: Update copyright year to 2018Javier Jardón2018-03-201-1/+1
|
* source/conf.py: Keep documentation version in syncJavier Jardón2018-03-201-2/+4
|
* source/install.rst: put Debian version under the same subsectionJavier Jardón2018-03-201-4/+8
|
* source/index.rst: Separate general and reference documentationJavier Jardón2018-03-201-4/+4
| | | | | | | Move artifacts from Installing section to general documentation This change is needed to make the TOC work correctly with the new theme
* Change theme to sphinx_rtd_themeJavier Jardón2018-03-204-25/+21
| | | | | The sphinx_rtd_theme is a sphinx theme designed to look modern and be mobile-friendly http://sphinx-rtd-theme.readthedocs.io/en/latest/index.html
* filter: Reword docstring to explain what the element does278-filter-documentation-could-be-betterJonathan Maw2018-03-201-8/+9
| | | | | | | | The docstring included instructions on what it *should* be used for, which is unnecessary. Further, it was vague on what the element actually did. The new docstring should be more explicit on what it does.
* source.py and loading: Refactoring of origin handlesTristan Van Berkom2018-03-203-22/+7
| | | | | | | | | | | The Source object previously stored the __origin_node, __origin_toplevel and __origin_filename, this is from a time when we did not hold on to the plugin's Provenance object explicitly. Since this information comes from the same place, let's just use Plugin._get_provenance() to derive these values, instead of redundantly carrying them along separately.
* NEWS: Adding news entry for new ref-storage options (project.refs)Tristan Van Berkom2018-03-201-0/+12
| | | | Also announce --track-save deprecation
* Documenting project.refsTristan Van Berkom2018-03-204-21/+143
| | | | | | | | | o Adding explanation of the `ref-storage` option in project.conf o Adjusting some adjacent relevant documentation o Adding a new projectrefs.rst section for the project.refs format itself, and linking it from the main authoring page.
* tests/frontend/track.py: Testing behavior of cross junction trackingTristan Van Berkom2018-03-205-0/+96
| | | | | | | | 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-208-4/+132
| | | | | | | 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.
* testutils/repo/git.py: Added branch() methodTristan Van Berkom2018-03-201-0/+3
| | | | | In order to test tracking on multiple branches, lets use the Git repo scaffolding.
* tests/format/project.py: Test that conditional statements are supported in ↵Tristan Van Berkom2018-03-204-0/+56
| | | | project.refs
* tests/pipeline/load.py: Testing source without load_ref() implementationTristan Van Berkom2018-03-204-0/+83
| | | | | | Test that we have no error when loading a project that doesnt use project.refs, and that we get the expected graceful failure when attempting to use project.refs with a Source which doesnt support it.
* tests/frontend/buildtrack.py: Modified to test saving with project.refsTristan Van Berkom2018-03-201-5/+44
| | | | | Test that we get the same functionality from the complex build + track test regardless of whether we are saving refs inline or to a project.refs file.
* Source plugins: Implement load_ref() in all source pluginsTristan Van Berkom2018-03-206-7/+20
|
* Fix #248 - Support project.refs in the core.Tristan Van Berkom2018-03-205-34/+235
| | | | | | | | | | | | | | | | | | | | | | | | | This adds a new Source.load_ref() API which is technically optional to implement, projects which make use of a project.refs file must only use source plugins which implement the new load_ref() method. * source.py: Added load_ref() API to load a ref from a specified node. This also adds _load_ref() and _save_ref() wrappers which handle the logistics of when to load and save a ref to which location. This also fixes _set_ref() to apply the ref to the node unconditionally, this must be done independantly of whether the ref actually changed. o Modifications to the loading process such that Source now can have access to the element name and source index. o _pipeline.py: Delegate abstract loading of source refs to Source._load_ref() - Print a summarized warning about redundant source references - Assert that one cannot track cross-junction elements without project.refs. o _scheduler/trackqueue.py: Delegate saving refs to Source._save_ref()
* _project.py: Load project.refs while loading the project.Tristan Van Berkom2018-03-202-5/+26
| | | | | This also bumps the format version to signify a new format where storing refs centralized in project.refs is now supported.
* _projectrefs.py: Adding the ProjectRefs refs management objectTristan Van Berkom2018-03-201-0/+165
| | | | This object manages the project.refs file in a project directory.
* _downloadablefilesource.py: Support None values in ref accessors.Tristan Van Berkom2018-03-201-0/+7
|
* source.py: Document ref accessors to mandate support for None values.Tristan Van Berkom2018-03-201-3/+12
| | | | | | | This is technically an API break, but will be transparant for the vast majority of the current hand full of source implementations which exist at this time. This is a lesser evil than bloating the API with new methods.
* Deprecate `--track-save` option from `bst build`Tristan Van Berkom2018-03-204-37/+27
| | | | | | | | | | | | | | | | | | It makes no sense to support this now that we are adding project.refs, instead of removing the option completely, we document it as deprecated and print a warning. o _frontend/cli.py: Mark the option as deprecated, warn if it's used o _scheduler/trackqueue.py: Remove save optionality o _pipeline.py: Remove save optionality o tests/frontend/buildtrack.py: Stop testing for no-save functionality, This test was actually broken, and only save functionality was being tested. This was due to using a list [True] or [False] in the @pytest.mark.parameterize() statement, both of which are truthy values.
* .gitlab-ci.yml: Remove superfluous pytest-pylint installTristan Maat2018-03-191-2/+0
|
* .gitlab-ci.yml: Fix lack of setuptools_scm causing CI failureTristan Maat2018-03-191-1/+1
|
* source/install.rst: Add instructions to install Arch packagesRafael Fontenelle2018-03-171-0/+9
|
* source/install.rst: Divide in two sectionsJavier Jardón2018-03-171-29/+27
| | | | | - installing from distro packages - installing from source
* docs/source/install.rst: fix terminal box for ArchLinuxJavier Jardón2018-03-171-1/+1
|
* docs/source/install.rst: Arch -> Arch LinuxJavier Jardón2018-03-171-2/+2
|
* Make pylint and pep8 tests run by defaultjennis/add_gi.repository_to_ignored_pylint_modulesJames Ennis2018-03-162-8/+1
|
* .pylintrc: Ensure pylint ignores gi.repository module as it dynamically adds ↵James Ennis2018-03-161-1/+1
| | | | classes
* doc/source/format.rst: Fix misnomer in documentationTristan Van Berkom2018-03-161-1/+1
| | | | | | The provided example shows the `tar` source ref being expressed with a `sha256sum` key name, lets make the example correct here and call it `ref`.
* _project.py and docs: Move defaults into the defaults yaml fileTristan Van Berkom2018-03-164-193/+229
| | | | | | | | | | | Over time, the _project.py module has regressed into expressing some defaults only hard coded into the python file instead of properly exposing their default in the base configuration file in data/projectconfig.yaml, where the default values can be observed by users. This patch rectifies that, and also restructures the relevant surrounding documentation a bit.
* scriptelement.py: Mark install-rootJürg Billeter2018-03-151-0/+3
| | | | This matches BuildElement.
* _sandboxchroot.py: Ensure the cwd existsJürg Billeter2018-03-151-0/+6
| | | | This matches SandboxBwrap.
* element.py: Do not allow unplanned build jobsJürg Billeter2018-03-151-0/+3
|
* buildqueue.py: Do not mark assembly complete on build failureJürg Billeter2018-03-151-3/+4
| | | | | | This fixes internal error when build is retried. Fixes #299