3
3
set -e
4
4
set -x
5
5
6
- proj=schema-salad
6
+ package=schema-salad
7
+ module=schema_salad
7
8
repo=https://github.com/common-workflow-language/schema_salad.git
8
- run_tests=" py.test ${proj }"
9
+ run_tests=" py.test --pyarg ${module }"
9
10
10
11
rm -Rf testenv? || /bin/true
11
12
@@ -19,25 +20,25 @@ virtualenv testenv4
19
20
source testenv1/bin/activate
20
21
make install-dependencies
21
22
make test
22
- pip uninstall -y ${proj } || true ; pip uninstall -y ${proj } || true ; make install
23
- mkdir testenv1/not-${proj }
24
- # if there is a subdir named '${proj }' py.test will execute tests
23
+ pip uninstall -y ${package } || true ; pip uninstall -y ${package } || true ; make install
24
+ mkdir testenv1/not-${module }
25
+ # if there is a subdir named '${module }' py.test will execute tests
25
26
# there instead of the installed module's tests
26
- pushd testenv1/not-${proj } ; ../bin/${run_tests} ; popd
27
+ pushd testenv1/not-${module } ; ../bin/${run_tests} ; popd
27
28
28
29
29
30
# Secondly we test via pip
30
31
31
32
cd testenv2
32
33
source bin/activate
33
34
pip install -U setuptools==3.4.1
34
- pip install -e git+${repo} @${HEAD} # egg=${proj }
35
- cd src/${proj }
35
+ pip install -e git+${repo} @${HEAD} # egg=${package }
36
+ cd src/${package }
36
37
make install-dependencies
37
38
make dist
38
39
make test
39
- cp dist/${proj } * tar.gz ../../../testenv3/
40
- pip uninstall -y ${proj } || true ; pip uninstall -y ${proj } || true ; make install
40
+ cp dist/${package } * tar.gz ../../../testenv3/
41
+ pip uninstall -y ${package } || true ; pip uninstall -y ${package } || true ; make install
41
42
cd ../.. # no subdir named ${proj} here, safe for py.testing the installed module
42
43
bin/${run_tests}
43
44
@@ -47,12 +48,12 @@ bin/${run_tests}
47
48
cd ../testenv3/
48
49
source bin/activate
49
50
pip install -U setuptools==3.4.1
50
- pip install ${proj } * tar.gz
51
+ pip install ${package } * tar.gz
51
52
pip install nose
52
- tar xzf ${proj } * tar.gz
53
- cd ${proj } *
53
+ tar xzf ${package } * tar.gz
54
+ cd ${package } *
54
55
make dist
55
56
make test
56
- pip uninstall -y ${proj } || true ; pip uninstall -y ${proj } || true ; make install
57
- mkdir ../not-${proj }
58
- pushd ../not-${proj } ; ../bin/${run_tests} ; popd
57
+ pip uninstall -y ${package } || true ; pip uninstall -y ${package } || true ; make install
58
+ mkdir ../not-${module }
59
+ pushd ../not-${module } ; ../bin/${run_tests} ; popd
0 commit comments