Commit 7b89fd1e authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Can I run simply async tests separately? Separated out the different

test types (xvfb-run/nobody)
parent 7ad55ca4
[run]
source =
fsl
# async.py is not currently covered because
# it otherwise causes async unit tests to
# hang when running in docker/python 3.x/xvfb-run!
omit =
fsl/utils/async.py
\ No newline at end of file
...@@ -248,15 +248,26 @@ variables: ...@@ -248,15 +248,26 @@ variables:
- mkdir -p $FSLDIR/data/ - mkdir -p $FSLDIR/data/
- rsync -rv "fsldownload:data/atlases/" "$FSLDIR/data/atlases/" - rsync -rv "fsldownload:data/atlases/" "$FSLDIR/data/atlases/"
# Finally, run the damned tests. We run # Finally, run the damned tests.
# as the nobody user because some tests
# expect permission denied errors when # We run some tests under xvfb-run
# looking at files, and root never gets # because they invoke wx. Sleep in
# denied. # between, otherwise xvfb gets upset.
# - xvfb-run python setup.py test --addopts="tests/test_async.py"
# We also run under xvfb-run because - sleep 5
# some tests invoke wx. - xvfb-run python setup.py test --addopts="tests/test_platform.py"
- su -s /bin/bash -c "xvfb-run python setup.py test" nobody
# We run the immv/imcpy tests as the nobody
# user because some tests expect permission
# denied errors when looking at files, and
# root never gets denied. Make everything in
# 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
# 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 -m coverage report - python -m coverage report
......
[pytest] [pytest]
testpaths = tests testpaths = tests
addopts = -s -v --niters=50 --html=report.html addopts = -s -v --niters=50 --cov=fsl --cov-report=html --html=report.html --cov-append
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment