-
Notifications
You must be signed in to change notification settings - Fork 138
/
run_tests.sh
56 lines (49 loc) · 2.02 KB
/
run_tests.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
#!/bin/bash
set +x
set +e
# Pep8 tests
if [[ "$PEP8_CAUSE_FAILLURE" == "true" ]]; then
set -e
cat setup.cfg
flake8 --statistics --count .
# Else unit and integration tests
else
set -e
# Changing dir to avoid loading local files
mkdir ci-tests
pushd ci-tests
python --version
pip --version
echo "Pypot path"
python -c 'import sys;import os;import pypot;sys.stdout.write(os.path.abspath(os.path.join(pypot.__file__, "../.."))); import pypot'
python -c 'import sys;import os;import pypot;sys.stdout.write(os.path.abspath(os.path.join(pypot.__file__, "../.."))); import pypot.robot'
python -c 'import sys;import os;import pypot;sys.stdout.write(os.path.abspath(os.path.join(pypot.__file__, "../.."))); import pypot.dynamixel'
python -c 'import sys;import os;import pypot;sys.stdout.write(os.path.abspath(os.path.join(pypot.__file__, "../.."))); from pypot.dynamixel import Dxl320IO'
# Vrep start test
echo "Starting a notebook Controlling a Poppy humanoid in V-REP using pypot.ipynb"
if [[ -n "$SSH_VREP_SERVER" ]]; then
pip install poppy-humanoid
# Download a PoppyHumanoid ipython notebook
curl -l -o nb.py https://gist.githubusercontent.com/pierre-rouanet/e6b89340a7ec781c5355/raw/64bb25ba01e077160e7b04e485d78164ac53fdf6/nb.py
python nb.py
pip uninstall -y poppy-creature poppy-humanoid
fi
# Old test of running VREP localy (network trouble)
# pushd $VREP_ROOT_DIR/
# if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
# xvfb-run --auto-servernum --server-num=1 ./vrep.sh -h &
# else
# ./vrep.app/Contents/MacOS/vrep -h &
# fi
# sleep 10
# popd
# python ci/test_vrep.py
popd
pushd tests
pip install coverage requests
pip install --pre poppy-creature poppy-ergo-jr
python -m unittest discover
popd
fi
set +x
set +e