summaryrefslogtreecommitdiff
path: root/tox.ini
Commit message (Collapse)AuthorAgeFilesLines
* tox.ini: Add ability to run tests in a randomized orderBenjamin Schubert2019-12-101-0/+4
| | | | | | | | | | Also register them to run nightly. Running tests in a randomized order is a good way of checking whether our tests depend on each others or not. Since we order them globally, tests will take longer to run, but that will give us higher confidence that they are correct.
* Start linting doc/source/conf.pyChandan Singh2019-11-141-3/+3
| | | | | | | | | | | Add `doc/source/conf.py` to the filelist for Black and Pylint. Previously this file was not covered by any of the linters, so this patch includes one-off sweeping changes for the formatting. To make pylint happy, we had to disable a warning about defining a variable called `copyright` since that's a built-in. It's unlikely that we will ever need the built-in `copyright()` in this module, so it seems safe to disable it.
* Remove pycodestyleChandan Singh2019-11-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the formatting-related warnings from `pycodestyle` are covered by Black, and almost all of the remaining ones are covered by `pylint`. Based on that, remove `pycodestyle` so that we don't have to maintain another set of configuration. More details on warnings/errors covered by `pycodestyle` below. --- Here's the big list of pycodestyle error/warning codes: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes. They are broken down into following categories: 1. Indentation 2. Whitespace 3. Blank line 4. Import 5. Line Length 6. Runtime 7. Deprecation warning 8. Statement Out of the above, 1-5 are purely formatting related so we don't needd to care about them. 6 is runtime issues like syntax error that are hard to miss (even mypy will complain about these). 7 is about deprecation warnings. Half of them don't apply to us since we only support Python 3.5+ and the other half is covered by `pylint`. That leaves us with the "E7*" codes, that pycodestyle groups under "Statement" heading. After verifying each of them, the only ones that is really not covered by either Black or Pylint is the following: * E731 do not assign a lambda expression, use a def This sole check does not seem worth keeping another tool.
* Add configuration to run BlackChandan Singh2019-11-141-0/+20
| | | | | | | | | | Introduce two new tox environments - `format` and `format-check`. The `format` environment will reformat the code using `black` whereas the `format-check` envrionment will simply print the diff without modifying any files. Configure Black to use the same line lengths that we use currently, i.e. 119.
* tox.ini: Fix pylint configurationChandan Singh2019-11-131-1/+1
| | | | | | | Running it like `src/buildstream` apparently doesn't report the warnings correctly, as pylint does not like file paths. Fixes #1206.
* Add tests that the basic functionality of buildstream works in win32Jonathan Maw2019-10-311-1/+19
| | | | i.e. `bst help` and `bst init`
* tox.ini: pass through BST_FORCE_START_METHODAngelos Evripiotis2019-10-181-0/+1
| | | | Otherwise we won't actually be testing the spawn code path.
* .gitlab-ci.yml: Update bst-plugins-experimental versionbschubert/bump-bst-experimental-versionBenjamin Schubert2019-10-181-1/+1
| | | | Update to the plugins to work with the new YAML updates.
* tox.ini: pin mypy 0.730traveltissues/1172Darius Makovsky2019-10-171-1/+1
|
* setup.cfg: Fix xdg env vars to not affect the hostbschubert/fix-xdg-temppathsBenjamin Schubert2019-10-081-4/+4
| | | | | | | | | | | | | | | | A fix was made in https://gitlab.com/BuildStream/buildstream/merge_requests/1244 in order to set xdg_* env variables inside of the test's directory to avoid importing data from the host. There was however still two problems: - When a variable was not set, it was set with a relative path, which would create a configuration for BuildStream that is invalid. - When a variable was set and running with pytest directly, we would still use the variable's value, which would be the host one. This ensure this can never happen, by not relying on the same variable's name and always overriding them.
* tox.ini: Add bst-plugins-experimental to docs depsctolentino82019-10-071-0/+1
|
* Use distutils plugin from bst-plugins-experimentalJavier Jardón2019-09-121-1/+1
|
* Add initial mypy configuration and typesChandan Singh2019-09-021-0/+10
| | | | | | | | | | As a first step, add type hints to variables whose type `mypy` cannot infer automatically. This is the minimal set of type hints that allow running `mypy` without any arguments, and having it not fail. We currently ignore C extensions that mypy can't process directly. Later, we can look into generating stubs for such modules (potentially automatically).
* Set HOME environment variable for testsJürg Billeter2019-08-301-0/+1
| | | | This fixes host contamination for tools that use HOME, e.g., bzr.
* Move qmake plugin to bst-plugins-experimentalcoldtom/move-qmakeThomas Coldrick2019-08-141-1/+1
|
* Move modulebuild plugin to bst-plugins-experimentalThomas Coldrick2019-08-141-1/+1
| | | | Continuing moving plugins over to bst-plugins-experimental.
* Move makemaker plugin to bst-plugins-experimentalThomas Coldrick2019-08-121-1/+1
| | | | Continuing moving plugins to bst-plugins-experimental.
* Move make plugin to bst-plugins-experimentalcoldtom/move-makeThomas Coldrick2019-08-091-1/+1
|
* Move meson element to bst-plugins-experimentalThomas Coldrick2019-08-081-1/+1
|
* Move cmake plugin to bst-plugins-experimentalcoldtom/move-cmakeThomas Coldrick2019-08-081-0/+1
| | | | | | | | | | | | It was agreed on the mailing list to move all plugins to a single repository, before moving them into domain-specific repositories. As a result it seems reasonable to move everything to the bst-plugins-experimental repo as this stepping stone, rather than creating a whole new repo. This commit starts the process of moving things over by moving only the cmake plugin to bst-plugins-experimental, and altering the tests to reflect the new location.
* tox.ini: Allow linter to run on target filesAlexandru Fazakas2019-07-301-2/+2
| | | | | Currently the linter can only lint everything we want. With this change, it should be able to only lint onre (or more) files.
* Refactor of Platform and SandboxWilliam Salmon2019-07-121-0/+1
|
* Introduce Cython to the project and documentBenjamin Schubert2019-05-291-1/+13
| | | | | | | | | | | | | Cython requires a plugin to allow coverage of cython files, which was updated in coveragerc. It also means we need to build the dependencies and install cython for coverage. Cython requires access to both source and compiled files when running coverage. We therefore need to install project in develop mode. Updated documentation to explain how to run tests without tox but with coverage
* Introduce pyproject.tomlBenjamin Schubert2019-05-291-0/+6
| | | | | | | | | Using pyproject.toml, defined in PEP518, allows us to have an isolated build environment, ensuring that Cython can be installed before calling setup.py in tox. This allows us to use cython helpers in the setup.py script. This is a prerequisite for introducing Cython in the codebase
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-211-1/+1
| | | | | | This was discussed in #1008. Fixes #1009.
* tox.ini: Coverage does not need module installedChandan Singh2019-05-211-2/+1
| | | | | Coverage does not need the module, or its dependencies, to be installed. Save time by not installing them extraneously.
* tox.ini: do not hardcode sphinx versionjjardon/sphinx_2Javier Jardón2019-05-041-1/+1
| | | | | This is not needed anymore since 431e578bf1b80074bd0f0ca8559e998dad59d4c0
* plugintestutils: Rename 'plugintestutils' package to 'testing'phil/rename-plugintestutilsPhil Dawson2019-04-161-2/+2
| | | | | | | | | - 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.
* tox.ini Allow movement of coverage files to fail for external testsPhil Dawson2019-04-161-1/+2
| | | | | | | If the list of external plugin tests is empty, tox -e pyXX-external will fail attempting to move a coverage file which doesn't exist. Allow the offending mv command to fail.
* tox.ini: Add tox env as a wrapper for running individual templated testsphil/expose-templated-testsPhil Dawson2019-04-121-0/+20
|
* tox.ini: pin [testenv:docs] sphinx dependency to 1.8.5Tom Pollard2019-03-291-1/+1
| | | | | | In sphinx 2.0.0 sphinx.apidoc has moved to sphinx.ext.apidoc, which causes a build import error. Pin the version to 1.8.5 to allow docs to be built until issues can be fixed.
* Generate and publish HTML coverage reportMartin Blanchard2019-03-251-2/+3
| | | | https://gitlab.com/BuildStream/buildstream/issues/629
* .gitlab-ci.yml: Add a CI test job for remote executionMartin Blanchard2019-03-251-0/+3
| | | | https://gitlab.com/BuildStream/buildstream/issues/629
* tests:lint: enable pylintBenjamin Schubert2019-03-201-1/+1
|
* tox.ini: Override/relocate XDG_ environment variables when running testsTristan Van Berkom2019-03-201-0/+4
| | | | | | This is not necessary to fix #966 as it is already done in the setup.cfg, however this just provides a consistent environment in case we do run tests which use configurations in the default `XDG_` driven locations.
* Move external plugin tests to seperate tox environment.Phil Dawson2019-03-131-30/+5
| | | | | | | | | Having the external plugins in the same tox env as the internal tests is inconvenient for developers. Move the external tests into their own environment. In order to run the external tests locally, append `-external` to an environment name. For example tox -e py35-external.
* Allow testing of external plugins via toxphil/external-plugin-testingPhil Dawson2019-03-081-2/+29
|
* test: Pass proxy and cert env variable to tox environmentbschubert/tests-behind-proxyBenjamin Schubert2019-03-061-0/+7
| | | | | | In order to be able to run integration tests behind a proxy, we need to let proxy related environment variable cascade to the tox environment.
* tox.ini: Support running tests without coverage present at allTristan Van Berkom2019-03-041-7/+13
| | | | | | | | | | | This change simply makes it possible to run the tests without coverage and without any coverage related dependencies present in the tox venvs. To run tests without coverage, simply choose the python version and append "-nocover" to the env name, e.g.: tox -e py36-nocover
* setup.cfg, tox.ini: Moved coverage support to the tox.ini levelTristan Van Berkom2019-03-041-1/+1
| | | | | | | This disables any attempt to use coverage when running tests directly against installed dependencies with setup.py. This fixes #916
* tox.ini / requirements: Separated coverage requirementsTristan Van Berkom2019-03-041-0/+2
| | | | Since coverage is optional, lets make it really optional.
* Make code coverage reporting optionalbschubert/allow-no-covBenjamin Schubert2019-02-251-2/+2
| | | | | | Previously, without a coverage file, the tests would fail if combined with "--no-cov". This makes the coverage reporting optional and allows the usage of "--no-cov"
* tox.ini: Add 'venv' environment to run arbitrary commands in a venvphil/tox-vev-environmentPhil Dawson2019-02-201-0/+11
| | | | | This is a handy way for developers to make use of the venvs we're constructing for our test suite to run in.
* Expose basic api for testing external plugins.phil/plugin-testing-apiPhil Dawson2019-02-081-0/+1
| | | | | | | | | | | | | | | | | | 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
* tox.ini: Specify minimum version of click-manChandan Singh2019-01-311-1/+1
| | | | | | | | | | | `click-man` versions < 0.3.0 do not properly support multiple entrypoints. Since this was added to `tox` after `0.3.0` was released, `tox` should never be pulling older versions. But, let's add it here for documentation purposes. See https://gitlab.com/BuildStream/buildstream/merge_requests/1107#note_135187046 for some background on this.
* tox.ini: Add environment to update man pagesChandan Singh2019-01-251-0/+10
| | | | | | Previously, one had to manually install `click-man` package, and remember to run the correct command. Now, we can simply run `tox -e man` to update the man pages.
* tox.ini: Unpin sphinx dependencyChandan Singh2019-01-231-3/+3
| | | | | | https://github.com/rtfd/sphinx_rtd_theme/pull/672 has been fixed upstream, and the newer versions of `sphinx_rtd_theme` do not break search functionality with Sphinx >= 1.8.
* Support running test environments in parallel with `detox`Tristan Van Berkom2019-01-091-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch namespaces the test temp directory and the output coverage report file with the name of the environment under test, such that separately run tests do not access the same files. When running tests without tox, directly through setup.py, then the tmp directory will still be `./tmp`. * .gitignore: Added new .coverage-reports/ directory * .gitlab-ci.yml: Rely on tox to combine and report coverage, only tell tox about the COVERAGE_PREFIX so that results can be namespaced by CI job name. This change also publishes the sources and final combined `.coverage` file in an output gitlab artifact for inspection, and lists some missing dependencies to the `coverage` job. * tox.ini: Add comments and refactor main [testenv] section so that other environments dont inherit too much unrelated cruft. Generate the coverate reports in the respective {envtmpdir} so that all per-process coverage files are prefixed with a full path, ensuring that concurrent runs don't mix reports and addressing concerns raised in #844. Also implemented new `tox -e coverage` environment to combine any found coverage and print a report. * .coveragerc: Omit .tox/ directory from coverage stats Fixes issue #844
* Rename "tools" directory to "requirements"Chandan Singh2019-01-041-8/+8
| | | | | This seems like a better name for the directory, as it more closely describes the purpose of its contents.
* tox.ini: Added new 'lint' environment to lint separatelyTristan Van Berkom2019-01-031-0/+9
|