[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionperf/master] Report test coverage in GitLab CI (fixes: #24)



commit af35c190442e8fdef5f8012c8436120e115e9abb
Author: Iain R. Learmonth <irl@xxxxxxxx>
Date:   Wed Aug 14 15:22:38 2019 +0100

    Report test coverage in GitLab CI (fixes: #24)
---
 .gitignore     | 1 +
 .gitlab-ci.yml | 1 +
 run_tests.sh   | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index beff288..5e79b0e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ venv
 *.pdf
 *.pyc
 onionperf/docs/_build
+.coverage
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0b52726..3657ffe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,7 @@ stages:
 test:
  stage: test
  image: debian:buster
+ coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
  script:
   - apt -y update
   - apt -y install git cmake make build-essential gcc libigraph0-dev libglib2.0-dev python-dev libxml2-dev python-lxml python-networkx python-scipy python-matplotlib python-numpy libevent-dev libssl-dev python-stem tor python-nose
diff --git a/run_tests.sh b/run_tests.sh
index c0bf555..d45032c 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-PYTHONPATH=. python -m nose
+PYTHONPATH=. python -m nose --with-coverage --cover-package=onionperf

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits