summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-01-24 22:16:11 +0000
committerChandan Singh <csingh43@bloomberg.net>2019-01-28 22:00:32 +0000
commit898cd9d12c7298d34523957ce1903abb917f43ad (patch)
tree25915ab65caf6005ff69585c29c700034da943f1
parent15cf12a583d857c04013b7bee4edef7526e745e4 (diff)
downloadbuildstream-898cd9d12c7298d34523957ce1903abb917f43ad.tar.gz
Add tox.ini from master branch
`tox.ini` has seen heavy churn lately, and backporting individual commits is turning out to be a more involved process as the two branches have diverged a bit. So, this is more or less copy-pasted from the master branch, without a separate lint job. Since switching to `pycodestyle` will require some code formatting changes, that does not seem reasonable to apply to this branch. So, let's stick with running the linters via `pytest`.
-rw-r--r--tox.ini70
1 files changed, 70 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000000000..2a3654722
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,70 @@
+#
+# Tox global configuration
+#
+[tox]
+envlist = py35,py36,py37
+skip_missing_interpreters = true
+
+#
+# Defaults for all environments
+#
+# Anything specified here is iherited by the sections
+#
+[testenv]
+commands =
+ pytest --basetemp {envtmpdir} {posargs}
+ mkdir -p .coverage-reports
+ mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+deps =
+ -rrequirements/requirements.txt
+ -rrequirements/dev-requirements.txt
+ -rrequirements/plugin-requirements.txt
+passenv =
+ BST_FORCE_BACKEND
+ GI_TYPELIB_PATH
+ INTEGRATION_CACHE
+
+#
+# These keys are not inherited by any other sections
+#
+setenv =
+ py{35,36,37}: COVERAGE_FILE = {envtmpdir}/.coverage
+whitelist_externals =
+ py{35,36,37}:
+ mv
+ mkdir
+
+#
+# Coverage reporting
+#
+[testenv:coverage]
+commands =
+ - coverage combine --rcfile={toxinidir}/.coveragerc {toxinidir}/.coverage-reports/
+ coverage report --rcfile={toxinidir}/.coveragerc -m
+deps =
+ -rrequirements/requirements.txt
+ -rrequirements/dev-requirements.txt
+setenv =
+ COVERAGE_FILE = {toxinidir}/.coverage-reports/.coverage
+
+#
+# Building documentation
+#
+[testenv:docs]
+commands =
+ make -C doc
+# sphinx_rtd_theme < 0.4.2 breaks search functionality for Sphinx >= 1.8
+deps =
+ sphinx
+ sphinx-click
+ sphinx_rtd_theme >= 0.4.2
+ -rrequirements/requirements.txt
+ -rrequirements/plugin-requirements.txt
+passenv =
+ BST_FORCE_SESSION_REBUILD
+ BST_SOURCE_CACHE
+ HOME
+ LANG
+ LC_ALL
+whitelist_externals =
+ make