From 4f0b4d361d55916de7a0a169daae67e935b16e8c Mon Sep 17 00:00:00 2001 From: Nikolay Khabarov <2xl@mail.ru> Date: Sun, 14 May 2017 03:05:40 +0300 Subject: [PATCH] add integration test --- .travis.yml | 2 ++ runtests.sh | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 +