summaryrefslogtreecommitdiff
path: root/tests/sources/patch.py
Commit message (Collapse)AuthorAgeFilesLines
* exceptions: Expose ErrorDomain, ErrorLoadReasonThomas Coldrick2020-01-231-1/+1
| | | | | | | Plugin tests are already accessing this API, but using imports from private modules. For motivation for this to be exposed publicly, note that ErrorDomain is an argument for most things in runcli.py, and LoadErrorReason may be another.
* Reformat code using BlackChandan Singh2019-11-141-52/+41
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* plugintestutils: Rename 'plugintestutils' package to 'testing'phil/rename-plugintestutilsPhil Dawson2019-04-161-1/+1
| | | | | | | | | - 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.
* tests: str(datafiles) instead of a longer thingAngelos Evripiotis2019-03-211-10/+10
| | | | | | | | | | | | | | | | | | | 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)'
* tests:lint: disable 'unused-import' checks on pytest fixturesBenjamin Schubert2019-03-201-1/+1
| | | | | Pylint can't know that pytest's fixtures are used in a file and therefore reports false positives. Silencing all those errors
* tests:lint: silence redefined-outer-name in files using fixturesBenjamin Schubert2019-03-201-0/+3
| | | | | Pylint doesn't play well with pytest fixtures, we therefore need to silence this error.
* tests:lint: remove all unneccessary-parens errors from pylintBenjamin Schubert2019-03-201-4/+4
|
* tests: Remove unused parameters in functionsBenjamin Schubert2019-03-011-6/+6
| | | | | For parameters that are required as part of an API, prefix them by "_" to make it clear they are unused
* tests: Remove unused variablesBenjamin Schubert2019-03-011-3/+1
|
* 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
* Mark 'old' checkout command as obsoleteJames Ennis2019-01-221-4/+4
| | | | | | | | | | | 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.
* tests: add additional tests to patch pluginTiago Gomes2018-08-021-9/+36
|
* patch plugin: validate project pathsTiago Gomes2018-08-021-5/+7
|
* _stream.py: Add StreamError exceptionTristan Van Berkom2018-05-081-2/+2
| | | | Use Stream error for Stream errors.
* source.py, element.py, _pipeline.py: Streamling preflighting.Tristan Van Berkom2018-04-161-2/+2
| | | | | | | | | | | Instead of having the pipeline preflight all sources separately from elements, have the element preflight it's sources. This is in order to simplify the shared code path for the pipeline and the loader to use for instantiating elements. Also updated tests to expect the new ElementError and SourceError instead of the PipelineError which was raised for preflighting before.
* local & patch source tests: Preflight errors now report PipelineErrorTristan Van Berkom2018-01-061-2/+2
|
* tests/sources: Use new error checking tools for source testsTristan Van Berkom2018-01-011-19/+28
| | | | | | Also added a test case for the `patch` plugin which checks for graceful failure when the specified patch file is not a regular file (but a block device or a named pipe instead).
* tests/sources/patch.py: Converted to use CLI fixturesTristan Van Berkom2017-11-041-96/+75
|
* Add patch source pluginChandan Singh2017-09-091-0/+136
Fixes #63