mirror of
https://github.com/sinseman44/PyCNC.git
synced 2026-01-12 02:40:04 +00:00
25 lines
1.0 KiB
Bash
Executable File
25 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo '**********************************************************************'
|
|
echo '* Testing PyCNC modules. *'
|
|
echo '* Hint: pass -v to this script arguments to see more verbose output. *'
|
|
echo '* Note: HAL tests should be run manually on corresponding board. For *'
|
|
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 '**********************************************************************'
|
|
echo '---------------------------Unit tests---------------------------------'
|
|
python -m unittest discover "$@" --pattern="test_*.py"
|
|
echo '-------------------------Integration tests----------------------------'
|
|
res="$(pycnc tests/rects.gcode 2>&1)"
|
|
res="$res$(pycnc tests/test_parser.gcode 2>&1)"
|
|
if echo "$res" | grep -q -i error; then
|
|
echo "FAILED"
|
|
echo "$res"
|
|
exit 1
|
|
fi
|
|
echo "OK"
|
|
|