forked from python-microscopy/python-microscopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests_27.sh
executable file
·65 lines (57 loc) · 1.36 KB
/
run_tests_27.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
#magic to make sure we can access anaconda
if [ -e ~/anaconda/bin/activate ]
then
source ~/anaconda/bin/activate
else
if [ -e ~/anaconda2/bin/activate ]
then
source ~/anaconda2/bin/activate
else
source ~/anaconda3/bin/activate
fi
fi
exit_code=0
if [[ `conda env list` = *"pm_test_27"* ]]
then
echo "Using existing pm_test_27 environment"
else
conda create -n pm_test_27 -y -q python=2.7 pyme-depends pytest pytest-cov pytest-html nose cython
fi
if [ $? -eq 0 ]
then
oldenv=$CONDA_DEFAULT_ENV
#conda deactivate
conda activate pm_test_27
if [ $? -eq 0 ]
then
#pwd
python setup.py develop
if [ $? -eq 0 ]
then
cd tests
pytest -v --html=tests_py27.html --cov=../PYME --cov-report html:cov_html .
exit_code=$?
cd ..
else
exit_code=$?
fi
#conda deactivate
conda activate $oldenv
else
exit_code=$?
fi
#conda env remove --name pm_test_27 -y -q
else
exit $?
fi
if [ $exit_code -ne 0 ]
then
exit $exit_code
fi
#conda create -n pm_test_36 -y python=3.6 pyme-depends pytest pytest-cov pytest-html nose
#source activate pm_test_36
#python setup.py develop
#pytest -v --html=tests_py36.html .
#source deactivate
#conda env remove --name pm_test_36 -y