You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 08:01:10 UTC

[buildstream] branch tristan/optional-coverage-test created (now 79b8f52)

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a change to branch tristan/optional-coverage-test
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 79b8f52  .gitlab-ci.yml: Use recent tox

This branch includes the following new commits:

     new 4052ce3  tox.ini / requirements: Separated coverage requirements
     new c67b2a0  setup.cfg, tox.ini: Moved coverage support to the tox.ini level
     new f5d0a42  tox.ini: Support running tests without coverage present at all
     new 4404fd2  .gitlab-ci.yml: Adding tox --version output to test diagnostics
     new 79b8f52  .gitlab-ci.yml: Use recent tox

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 01/05: tox.ini / requirements: Separated coverage requirements

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/optional-coverage-test
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 4052ce3223815347d80374c2b19640df360e6cb8
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Tue Feb 26 17:24:43 2019 +0900

    tox.ini / requirements: Separated coverage requirements
    
    Since coverage is optional, lets make it really optional.
---
 requirements/cov-requirements.in  |  2 ++
 requirements/cov-requirements.txt | 11 +++++++++++
 requirements/dev-requirements.in  |  2 --
 requirements/dev-requirements.txt | 24 ++++++++++++------------
 tox.ini                           |  2 ++
 5 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/requirements/cov-requirements.in b/requirements/cov-requirements.in
new file mode 100644
index 0000000..455b91b
--- /dev/null
+++ b/requirements/cov-requirements.in
@@ -0,0 +1,2 @@
+coverage == 4.4.0
+pytest-cov >= 2.5.0
diff --git a/requirements/cov-requirements.txt b/requirements/cov-requirements.txt
new file mode 100644
index 0000000..843df85
--- /dev/null
+++ b/requirements/cov-requirements.txt
@@ -0,0 +1,11 @@
+coverage==4.4
+pytest-cov==2.6.1
+## The following requirements were added by pip freeze:
+atomicwrites==1.3.0
+attrs==18.2.0
+more-itertools==6.0.0
+pathlib2==2.3.3
+pluggy==0.9.0
+py==1.8.0
+pytest==4.3.0
+six==1.12.0
diff --git a/requirements/dev-requirements.in b/requirements/dev-requirements.in
index 9edb234..8b87107 100644
--- a/requirements/dev-requirements.in
+++ b/requirements/dev-requirements.in
@@ -1,8 +1,6 @@
-coverage == 4.4.0
 pylint
 pycodestyle
 pytest >= 3.9
-pytest-cov >= 2.5.0
 pytest-datafiles >= 2.0
 pytest-env
 pytest-xdist
diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt
index c34f6db..d8039c3 100644
--- a/requirements/dev-requirements.txt
+++ b/requirements/dev-requirements.txt
@@ -1,25 +1,25 @@
-coverage==4.4
 pylint==2.2.2
-pycodestyle==2.4.0
-pytest==4.0.2
-pytest-cov==2.6.1
+pycodestyle==2.5.0
+pytest==4.3.0
 pytest-datafiles==2.0
 pytest-env==0.6.2
-pytest-xdist==1.25.0
+pytest-xdist==1.26.1
 pytest-timeout==1.3.3
 pyftpdlib==1.5.4
 ## The following requirements were added by pip freeze:
 apipkg==1.5
 astroid==2.1.0
-atomicwrites==1.2.1
+atomicwrites==1.3.0
 attrs==18.2.0
 execnet==1.5.0
-isort==4.3.4
+isort==4.3.9
 lazy-object-proxy==1.3.1
 mccabe==0.6.1
-more-itertools==5.0.0
-pluggy==0.8.0
-py==1.7.0
-pytest-forked==0.2
+more-itertools==6.0.0
+pathlib2==2.3.3
+pluggy==0.9.0
+py==1.8.0
+pytest-forked==1.0.2
 six==1.12.0
-wrapt==1.10.11
+typed-ast==1.3.1
+wrapt==1.11.1
diff --git a/tox.ini b/tox.ini
index 97de446..6fced4f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -18,6 +18,7 @@ commands =
 deps =
     -rrequirements/requirements.txt
     -rrequirements/dev-requirements.txt
+    -rrequirements/cov-requirements.txt
     -rrequirements/plugin-requirements.txt
 passenv =
     BST_FORCE_BACKEND
@@ -44,6 +45,7 @@ commands =
 deps =
     -rrequirements/requirements.txt
     -rrequirements/dev-requirements.txt
+    -rrequirements/cov-requirements.txt
 setenv =
     COVERAGE_FILE = {toxinidir}/.coverage-reports/.coverage
 


[buildstream] 03/05: tox.ini: Support running tests without coverage present at all

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/optional-coverage-test
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit f5d0a4227b7047a242130f3a1c060f197e8ebf99
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Feb 27 23:14:58 2019 +0900

    tox.ini: Support running tests without coverage present at all
    
    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
---
 tox.ini | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/tox.ini b/tox.ini
index a54dc55..78e4919 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,14 +12,20 @@ skip_missing_interpreters = true
 #
 [testenv]
 commands =
-    pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
-    - mkdir -p .coverage-reports
-    - mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+    # Running with coverage reporting enabled
+    py{35,36,37}-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
+    py{35,36,37}-!nocover: mkdir -p .coverage-reports
+    py{35,36,37}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+
+    # Running with coverage reporting disabled
+    py{35,36,37}-nocover: pytest --basetemp {envtmpdir} {posargs}
 deps =
-    -rrequirements/requirements.txt
-    -rrequirements/dev-requirements.txt
-    -rrequirements/cov-requirements.txt
-    -rrequirements/plugin-requirements.txt
+    py{35,36,37}: -rrequirements/requirements.txt
+    py{35,36,37}: -rrequirements/dev-requirements.txt
+    py{35,36,37}: -rrequirements/plugin-requirements.txt
+
+    # Only require coverage and pytest-cov when using it
+    !nocover: -rrequirements/cov-requirements.txt
 passenv =
     BST_FORCE_BACKEND
     GI_TYPELIB_PATH


[buildstream] 04/05: .gitlab-ci.yml: Adding tox --version output to test diagnostics

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/optional-coverage-test
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 4404fd25768a7b611ec469fd99f7823f2bff6b10
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Feb 28 14:38:20 2019 +0900

    .gitlab-ci.yml: Adding tox --version output to test diagnostics
    
    This is generally useful to know, since the tox version is not
    enforced by BuildStream.
---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5af7013..5796561 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,6 +29,7 @@ variables:
   # Diagnostics
   - mount
   - df -h
+  - tox --version
 
   script:
   - mkdir -p "${INTEGRATION_CACHE}"
@@ -157,6 +158,7 @@ tests-wsl:
   before_script:
   - mount
   - df -h
+  - tox --version
 
   script:
   - "${TEST_COMMAND}"


[buildstream] 05/05: .gitlab-ci.yml: Use recent tox

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/optional-coverage-test
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 79b8f520dcb50b6ec6726b4129b58e8465aacdb9
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Feb 28 15:37:26 2019 +0900

    .gitlab-ci.yml: Use recent tox
    
    There appears to be multiple versions of tox in the WSL test
    environment, prepending /root/.local/bin to the PATH while
    running tests ensures that we are using a recent enough tox
    to execute the tests.
---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5796561..cbfd44e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -158,10 +158,10 @@ tests-wsl:
   before_script:
   - mount
   - df -h
-  - tox --version
+  - PATH=/root/.local/bin:$PATH tox --version
 
   script:
-  - "${TEST_COMMAND}"
+  - PATH=/root/.local/bin:$PATH ${TEST_COMMAND}
   allow_failure: true
 
 # Automatically build documentation for every commit, we want to know


[buildstream] 02/05: setup.cfg, tox.ini: Moved coverage support to the tox.ini level

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/optional-coverage-test
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit c67b2a0a7d93a28b91e7a4baf6fe0593e60c8838
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Feb 27 23:12:33 2019 +0900

    setup.cfg, tox.ini: Moved coverage support to the tox.ini level
    
    This disables any attempt to use coverage when running tests
    directly against installed dependencies with setup.py.
    
    This fixes #916
---
 setup.cfg | 2 +-
 tox.ini   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.cfg b/setup.cfg
index ec20435..ca623aa 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -11,7 +11,7 @@ parentdir_prefix = BuildStream-
 test=pytest
 
 [tool:pytest]
-addopts = --verbose --basetemp ./tmp --cov=buildstream --cov-config .coveragerc --durations=20
+addopts = --verbose --basetemp ./tmp --durations=20
 norecursedirs = tests/integration/project integration-cache tmp __pycache__ .eggs
 python_files = tests/*/*.py
 env =
diff --git a/tox.ini b/tox.ini
index 6fced4f..a54dc55 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,7 +12,7 @@ skip_missing_interpreters = true
 #
 [testenv]
 commands =
-    pytest --basetemp {envtmpdir} {posargs}
+    pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
     - mkdir -p .coverage-reports
     - mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
 deps =