File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ MODULE=cwltool
26
26
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
27
27
# `[[` conditional expressions.
28
28
PYSOURCES =$(wildcard ${MODULE}/** .py tests/* .py) setup.py
29
- DEVPKGS =pycodestyle diff_cover autopep8 pylint coverage pydocstyle flake8 pytest isort
29
+ DEVPKGS =pycodestyle diff_cover autopep8 pylint coverage pydocstyle flake8 \
30
+ pytest pytest-xdist isort
30
31
DEBDEVPKGS =pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
31
32
python-flake8 python-mock shellcheck
32
33
VERSION =1.0.$(shell date +% Y% m% d% H% M% S --utc --date=`git log --first-parent \
@@ -142,7 +143,7 @@ diff-cover.html: coverage.xml
142
143
143
144
# # test : run the ${MODULE} test suite
144
145
test : $(pysources )
145
- python setup.py test
146
+ python setup.py test --addopt " -n $( shell expr $( nproc ) / 2 ) "
146
147
147
148
# # testcov : run the ${MODULE} test suite and collect coverage
148
149
testcov : $(pysources )
Original file line number Diff line number Diff line change @@ -7,7 +7,17 @@ package=cwltool
7
7
module=cwltool
8
8
slug=${TRAVIS_PULL_REQUEST_SLUG:= common-workflow-language/ cwltool}
9
9
repo=https://github.com/${slug} .git
10
- run_tests=" bin/py.test --ignore ${module} /schemas/ --pyarg cwltool"
10
+ parallel=" "
11
+ if [[ " ${OSTYPE} " == linux* ]]
12
+ then
13
+ parallel=-n$(( $(nproc) / 2 ))
14
+ fi
15
+ if [[ " ${OSTYPE} " == darwin* ]]
16
+ then
17
+ parallel=-n$(( $(sysctl - n hw.physicalcpu) / 2 ))
18
+ fi
19
+
20
+ run_tests=" bin/py.test --ignore ${module} /schemas/ --pyarg cwltool ${parallel} "
11
21
pipver=7.0.2 # minimum required version of pip
12
22
setuptoolsver=24.2.0 # required to generate correct metadata for
13
23
# python_requires
You can’t perform that action at this time.
0 commit comments