-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #294 from common-workflow-language/ship-tests
ship tests, add release tester
- Loading branch information
Showing
9 changed files
with
135 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
include gittaggers.py ez_setup.py Makefile cwltool.py | ||
include tests/* | ||
include tests/wf/* | ||
include cwltool/schemas/v1.0/*.yml | ||
include cwltool/schemas/draft-2/*.yml | ||
include cwltool/schemas/draft-3/*.yml | ||
include cwltool/schemas/draft-3/*.md | ||
include cwltool/schemas/draft-3/salad/schema_salad/metaschema/*.yml | ||
include cwltool/schemas/draft-3/salad/schema_salad/metaschema/*.md | ||
include cwltool/schemas/v1.0/*.yml | ||
include cwltool/schemas/v1.0/*.md | ||
include cwltool/schemas/v1.0/salad/schema_salad/metaschema/*.yml | ||
include cwltool/schemas/v1.0/salad/schema_salad/metaschema/*.md | ||
include cwltool/schemas/v1.1.0-dev1/*.yml | ||
include cwltool/schemas/v1.1.0-dev1/*.md | ||
include cwltool/schemas/v1.1.0-dev1/salad/schema_salad/metaschema/*.yml | ||
include cwltool/schemas/v1.1.0-dev1/salad/schema_salad/metaschema/*.md | ||
include cwltool/cwlNodeEngine.js | ||
global-exclude *.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
package=cwltool | ||
module=cwltool | ||
repo=https://github.com/common-workflow-language/cwltool.git | ||
run_tests="py.test --ignore ${module}/schemas/ --pyarg cwltool" | ||
pipver=7.0.2 # minimum required version of pip | ||
|
||
rm -Rf testenv? || /bin/true | ||
|
||
export HEAD=`git rev-parse HEAD` | ||
virtualenv testenv1 | ||
virtualenv testenv2 | ||
virtualenv testenv3 | ||
virtualenv testenv4 | ||
|
||
# First we test the head | ||
source testenv1/bin/activate | ||
rm testenv1/lib/python-wheels/setuptools* \ | ||
&& pip install --force-reinstall -U pip==${pipver} \ | ||
&& pip install setuptools==20.10.1 wheel | ||
make install-dep | ||
make test | ||
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install | ||
mkdir testenv1/not-${module} | ||
# if there is a subdir named '${module}' py.test will execute tests | ||
# there instead of the installed module's tests | ||
pushd testenv1/not-${module}; ../bin/${run_tests}; popd | ||
|
||
|
||
# Secondly we test via pip | ||
|
||
cd testenv2 | ||
source bin/activate | ||
rm lib/python-wheels/setuptools* \ | ||
&& pip install --force-reinstall -U pip==${pipver} \ | ||
&& pip install setuptools==20.10.1 wheel | ||
pip install -e git+${repo}@${HEAD}#egg=${package} | ||
cd src/${package} | ||
make install-dep | ||
make dist | ||
make test | ||
cp dist/${package}*tar.gz ../../../testenv3/ | ||
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install | ||
cd ../.. # no subdir named ${proj} here, safe for py.testing the installed module | ||
bin/${run_tests} | ||
|
||
# Is the distribution in testenv2 complete enough to build another | ||
# functional distribution? | ||
|
||
cd ../testenv3/ | ||
source bin/activate | ||
rm lib/python-wheels/setuptools* \ | ||
&& pip install --force-reinstall -U pip==${pipver} \ | ||
&& pip install setuptools==20.10.1 wheel | ||
pip install ${package}*tar.gz | ||
pip install pytest | ||
mkdir out | ||
tar --extract --directory=out -z -f ${package}*.tar.gz | ||
cd out/${package}* | ||
make dist | ||
make test | ||
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install | ||
mkdir ../not-${module} | ||
pushd ../not-${module} ; ../../bin/${run_tests}; popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from pkg_resources import Requirement, resource_filename, ResolutionError # type: ignore | ||
import os | ||
|
||
def get_data(filename): | ||
filepath = None | ||
try: | ||
filepath = resource_filename( | ||
Requirement.parse("cwltool"), filename) | ||
except ResolutionError: | ||
pass | ||
if not filepath or not os.path.isfile(filepath): | ||
filepath = os.path.join(os.path.dirname(__file__), os.pardir, filename) | ||
return filepath |