Skip to content

Commit 6106e05

Browse files
MbomprPhilipDeegan
authored andcommitted
Fix CI test
run examples from examples directory
1 parent e432a0f commit 6106e05

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

tools/travis/docker_run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ eval "$(pyenv init -)"
1414
pyenv global ${PYVER}
1515
pyenv local ${PYVER}
1616

17+
PYMAJ=$(python -c "import sys; print(sys.version_info[0])")
18+
PYMIN=$(python -c "import sys; print(sys.version_info[1])")
19+
1720
if (( PYMAJ == 3 )) && (( PYMIN == 7 )); then
1821
echo "Skipping installing only needed for doctest which are not run on Python 3.7 (see bellow)"
1922
else

tools/travis/osx_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ else
5353
brew install geos
5454
fi
5555
# needed for basemap see https://github.com/matplotlib/basemap/issues/414#issuecomment-436792915
56-
python -m pip install https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.zip
57-
python -m pip install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz
56+
# python -m pip install https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.zip
57+
python -m pip install https://github.com/matplotlib/basemap/archive/v1.2.0rel.tar.gz
5858
pyenv rehash
5959

tools/travis/osx_run.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
set -e -x
44

5+
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
cd $CWD/../..
7+
ROOT=$PWD
8+
cd $CWD
59
shell_session_update() { :; }
610

711
eval "$(pyenv init -)"
@@ -25,9 +29,10 @@ set -e
2529
python setup.py build_ext --inplace cpptest pytest
2630

2731
export PYTHONPATH=${PYTHONPATH}:`pwd`
28-
for f in $(find examples -maxdepth 1 -type f -name "*.py"); do
32+
cd $ROOT/examples
33+
for f in $(find . -maxdepth 1 -type f -name "*.py"); do
2934
FILE=$(basename $f)
3035
FILE="${FILE%.*}" # skipping it takes too long
3136
[[ "plot_asynchronous_stochastic_solver" != "$FILE" ]] && \
32-
DISPLAY="-1" python -c "import tick.base; import examples.$FILE"
37+
DISPLAY="-1" python -c "import tick.base; import $FILE"
3338
done

0 commit comments

Comments
 (0)