diff --git a/.travis.yml b/.travis.yml index aabac1b..15af9a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: python python: + - "2.7" - "pypy-5.3.1" +install: # nothing script: ./runtests.sh diff --git a/runtests.sh b/runtests.sh index f33db86..cea8e68 100755 --- a/runtests.sh +++ b/runtests.sh @@ -10,4 +10,15 @@ echo '* example Raspberry Pi tests is tests/rpgpio_test.sh which should be *' echo '* run with RPi board with connected to pin GPIO21 LED. LED should *' echo '* light up on pullup, set, and DMA test events. *' echo '**********************************************************************' -python -m unittest discover "$@" --pattern="test_*.py" +echo '---------------------------Unit tests---------------------------------' +pypy -m unittest discover "$@" --pattern="test_*.py" +echo '-----------------------Integration tests------------------------------' +sudo pip install . +res="$(pycnc tests/rects.gcode 2>&1)" +res="$res$(pycnc tests/test_parser.gcode 2>&1)" +sudo pip uninstall -y pycnc +if echo "$res" | grep -q -i error; then + echo "$res" + exit 1 +fi +