forked from devin-petersohn/ursa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_script.sh
executable file
·43 lines (33 loc) · 1.06 KB
/
test_script.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
#!/bin/bash
# create a conda environment for python build, if necessary
uuid=$(uuidgen)
echo $(uuidgen)
conda create -y -q -n ursa-python3-${uuid} python=3
source activate ursa-python3-${uuid}
make prepare
# run flake8
python3 -m flake8
if [ $? -ne 0 ]; then
echo "Please fix flake8 errors."
exit -1
fi
# run pytest for python3 on all test files
python3 -m pytest -v test/local_manager_test.py
python3 -m pytest -v test/graph_test.py
#python3 -m pytest -v test/test_connected_components.py
# deactivate and remove the conda env
source deactivate
conda remove -y -n ursa-python3-${uuid} --all
# create a conda environment for python build, if necessary
uuid=$(uuidgen)
echo $(uuidgen)
conda create -y -q -n ursa-python2-${uuid} python=2.7
source activate ursa-python2-${uuid}
make prepare
#run pytest for python2 on all test files
python2 -m pytest -v test/local_manager_test.py
python2 -m pytest -v test/graph_test.py
#python2 -m pytest -v test/test_connected_components.py
# deactivate and remove the conda env
source deactivate
conda remove -y -n ursa-python2-${uuid} --all