Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
7b89fd1e
Commit
7b89fd1e
authored
Jun 07, 2017
by
Paul McCarthy
🚵
Browse files
Can I run simply async tests separately? Separated out the different
test types (xvfb-run/nobody)
parent
7ad55ca4
Changes
3
Show whitespace changes
Inline
Side-by-side
.coveragerc
deleted
100644 → 0
View file @
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
.gitlab-ci.yml
View file @
7b89fd1e
...
...
@@ -248,15 +248,26 @@ variables:
-
mkdir -p $FSLDIR/data/
-
rsync -rv "fsldownload:data/atlases/" "$FSLDIR/data/atlases/"
# Finally, run the damned tests. We run
# as the nobody user because some tests
# expect permission denied errors when
# looking at files, and root never gets
# denied.
#
# We also run under xvfb-run because
# some tests invoke wx.
-
su -s /bin/bash -c "xvfb-run python setup.py test" nobody
# Finally, run the damned tests.
# 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"
-
sleep
5
-
xvfb-run python setup.py test --addopts="tests/test_platform.py"
# 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
...
...
pytest.ini
View file @
7b89fd1e
[pytest]
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment