From a76d0b8712779f84c14e4a5fa58b9df9e30fd0cc Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Fri, 13 Oct 2017 10:36:16 +0100 Subject: [PATCH] CI coverage reporting was wrong. Hopefully this will fix it? --- .gitlab-ci.yml | 9 +++++---- setup.cfg | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd70b15cf..f2dadff7f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,6 +75,7 @@ stages: variables: UPSTREAM_PROJECT: "fsl/fslpy" UPSTREAM_URL: "git@git.fmrib.ox.ac.uk" + TEST_OPTS: "--cov-report= --cov-append" #################################### @@ -263,9 +264,9 @@ variables: # We run some tests under xvfb-run # because they invoke wx. Sleep in # between, otherwise xvfb gets upset. - - xvfb-run python setup.py test --addopts="tests/test_async.py" + - xvfb-run python setup.py test --addopts="$TEST_OPTS tests/test_async.py" - sleep 5 - - xvfb-run python setup.py test --addopts="tests/test_platform.py" + - xvfb-run python setup.py test --addopts="$TEST_OPTS tests/test_platform.py" # We run the immv/imcpy tests as the nobody # user because some tests expect permission @@ -274,10 +275,10 @@ variables: # this directory writable by anybody (which, # unintuitively, includes nobody) - chmod -R a+w `pwd` - - su -s /bin/bash -c "python setup.py test --addopts='tests/test_immv_imcp.py'" nobody + - su -s /bin/bash -c 'python setup.py test --addopts="$TEST_OPTS tests/test_immv_imcp.py"' nobody # All other tests can be run as normal - - python setup.py test --addopts="--ignore=tests/test_async.py --ignore=tests/test_platform.py --ignore=tests/test_immv_imcp.py" + - python setup.py test --addopts="$TEST_OPTS --ignore=tests/test_async.py --ignore=tests/test_platform.py --ignore=tests/test_immv_imcp.py" - python -m coverage report diff --git a/setup.cfg b/setup.cfg index 2bfbc6c57..9667900f3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,4 +6,4 @@ universal=1 [tool:pytest] testpaths = tests -addopts = -s -v --niters=50 --cov=fsl \ No newline at end of file +addopts = -s -v --niters=50 --cov=fsl --cov-report=html \ No newline at end of file -- GitLab