add integration test

This commit is contained in:
Nikolay Khabarov
2017-05-14 03:05:40 +03:00
parent e62fe42c2f
commit 4f0b4d361d
2 changed files with 14 additions and 1 deletions
+2
View File
@@ -1,5 +1,7 @@
language: python
python:
- "2.7"
- "pypy-5.3.1"
install: # nothing
script: ./runtests.sh
+12 -1
View File
@@ -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