Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
7b89fd1e
Commit
7b89fd1e
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Can I run simply async tests separately? Separated out the different
test types (xvfb-run/nobody)
parent
7ad55ca4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.coveragerc
+0
-9
0 additions, 9 deletions
.coveragerc
.gitlab-ci.yml
+20
-9
20 additions, 9 deletions
.gitlab-ci.yml
pytest.ini
+1
-1
1 addition, 1 deletion
pytest.ini
with
21 additions
and
19 deletions
.coveragerc
deleted
100644 → 0
+
0
−
9
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
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
20
−
9
View file @
7b89fd1e
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
pytest.ini
+
1
−
1
View file @
7b89fd1e
[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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment