Skip to content

Commit a99e17e

Browse files
authored
Merge pull request #57 from common-workflow-language/py3
allow for testing of py3 as well
2 parents a1fb4c6 + 654895a commit a99e17e

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ mypy3: ${PYSOURCES}
168168
${MODULE}
169169

170170
release: FORCE
171-
./release-test.sh
171+
PYVER=2.7 ./release-test.sh
172+
PYVER=3 ./release-test.sh
172173
. testenv2/bin/activate && \
173174
testenv2/src/${MODULE}/setup.py sdist bdist_wheel
174175
. testenv2/bin/activate && \

release-test.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,33 @@ repo=https://github.com/common-workflow-language/cwltest.git
99
run_tests="py.test --pyarg ${module}"
1010
pipver=8.0.1 # minimum required version of pip
1111
setupver=20.10.1 # minimum required version of setuptools
12+
PYVER=${PYVER:=2.7}
1213

13-
rm -Rf testenv? || /bin/true
14+
rm -Rf testenv${PYVER}_? || /bin/true
1415

1516
export HEAD=`git rev-parse HEAD`
16-
virtualenv testenv1
17-
virtualenv testenv2
18-
virtualenv testenv3
19-
virtualenv testenv4
17+
virtualenv testenv${PYVER}_1 -p python${PYVER}
18+
virtualenv testenv${PYVER}_2 -p python${PYVER}
19+
virtualenv testenv${PYVER}_3 -p python${PYVER}
20+
virtualenv testenv${PYVER}_4 -p python${PYVER}
2021

2122
# First we test the head
22-
source testenv1/bin/activate
23-
rm testenv1/lib/python-wheels/setuptools* \
23+
source testenv${PYVER}_1/bin/activate
24+
rm testenv${PYVER}_1/lib/python-wheels/setuptools* \
2425
&& pip install --force-reinstall -U pip==${pipver} \
2526
&& pip install setuptools==${setupver} wheel
2627
make install-dependencies
2728
make test
2829
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
29-
mkdir testenv1/not-${module}
30+
mkdir testenv${PYVER}_1/not-${module}
3031
# if there is a subdir named '${module}' py.test will execute tests
3132
# there instead of the installed module's tests
32-
pushd testenv1/not-${module}; ../bin/${run_tests}; popd
33+
pushd testenv${PYVER}_1/not-${module}; ../bin/${run_tests}; popd
3334

3435

3536
# Secondly we test via pip
3637

37-
cd testenv2
38+
cd testenv${PYVER}_2
3839
source bin/activate
3940
rm lib/python-wheels/setuptools* \
4041
&& pip install --force-reinstall -U pip==${pipver} \
@@ -44,15 +45,15 @@ cd src/${package}
4445
make install-dependencies
4546
make dist
4647
make test
47-
cp dist/${package}*tar.gz ../../../testenv3/
48+
cp dist/${package}*tar.gz ../../../testenv${PYVER}_3/
4849
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
4950
cd ../.. # no subdir named ${proj} here, safe for py.testing the installed module
5051
bin/${run_tests}
5152

52-
# Is the distribution in testenv2 complete enough to build another
53+
# Is the distribution in testenv${PYVER}_2 complete enough to build another
5354
# functional distribution?
5455

55-
cd ../testenv3/
56+
cd ../testenv${PYVER}_3/
5657
source bin/activate
5758
rm lib/python-wheels/setuptools* \
5859
&& pip install --force-reinstall -U pip==${pipver} \

0 commit comments

Comments
 (0)