summaryrefslogtreecommitdiff
path: root/tests/sources/local.py
Commit message (Collapse)AuthorAgeFilesLines
* testing._sourcetests: Don't special case 'local' in parameter listphil/separate-local-testsPhil Dawson2019-04-291-0/+60
| | | | | | | | | | | | 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.
* 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-9/+9
| | | | | | | | | | | | | | | | | | | 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-9/+9
|
* tests: Remove unused parameters in functionsBenjamin Schubert2019-03-011-5/+5
| | | | | 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-2/+1
|
* tests/sources/local.py: Add directory symlink testJürg Billeter2019-02-111-0/+20
|
* 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-3/+3
| | | | | | | | | | | 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 local pluginTiago Gomes2018-08-021-2/+47
|
* local plugin: validate project pathsTiago Gomes2018-08-021-3/+3
| | | | | | The autotools example had to be copied over inside of the junction example, as referring to a path outside of the project directory is now disallowed.
* _stream.py: Add StreamError exceptionTristan Van Berkom2018-05-081-1/+1
| | | | Use Stream error for Stream errors.
* source.py, element.py, _pipeline.py: Streamling preflighting.Tristan Van Berkom2018-04-161-1/+1
| | | | | | | | | | | 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-1/+1
|
* tests/sources/local.py: Adding test for staging a symlink.Tristan Van Berkom2018-01-021-0/+26
| | | | | This has remained without test coverage mostly due to upstream pytest-datafiles bug https://github.com/omarkohl/pytest-datafiles/issues/1
* tests/sources/local.py: Testing failures to create staging directoriesTristan Van Berkom2018-01-021-0/+11
| | | | | | | | Seems that local.py is an appropriate plugin to use for testing errors which originate from the abstract Source class. This test checks that we raise the appropriate error in the case that we attempt to stage to a directory that is a regular file.
* tests/sources: Use new error checking tools for source testsTristan Van Berkom2018-01-011-8/+6
| | | | | | 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/local.py: Removed some more unneeded steps in the testTristan Van Berkom2017-11-041-10/+2
|
* tests/sources/local.py: Remove one line of deadcodeTristan Van Berkom2017-11-041-1/+0
|
* tests/sources/local.py: Migrated test to use frontend fixturesTristan Van Berkom2017-11-041-38/+43
|
* local source tests: Removed test case for get_unique_key()Tristan Van Berkom2017-09-011-18/+0
| | | | | | | | This somewhat arbitrarily tests what the local source generates as a unique key but is not really the requirements of a unique key. This is also subject to change and is a pain to update. Instead this is pretty much handled by the cache key test anyway.
* Fix testsTristan Maat2017-07-171-1/+1
|
* local source test: Use the common fixture thingyTristan Van Berkom2016-12-191-48/+18
|
* Simplify exceptions a bitTristan Van Berkom2016-12-181-2/+2
| | | | | | | | | | | Instead of declaring per operation exceptions, like PreflightError and FetchError etc, just declare exceptions per domain. Replaced the former errors with SourceError for Source implementations and ElementError for element implementations. The core will be able to report errors differently depending on what they asked given plugins to do, and handle a reduced set of exceptions.
* Adding first source test for local sourceTristan Van Berkom2016-12-151-0/+109