From e4e36aa57b4caa3a9f1efe7d1144b2f41cea23fc Mon Sep 17 00:00:00 2001 From: Nikolay Khabarov <2xl@mail.ru> Date: Sun, 14 May 2017 14:20:01 +0300 Subject: [PATCH] rpgpio test fix --- cnc/hal_raspberry/rpgpio.py | 2 +- tests/rpgpio_test.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cnc/hal_raspberry/rpgpio.py b/cnc/hal_raspberry/rpgpio.py index 8323a68..5c75e90 100755 --- a/cnc/hal_raspberry/rpgpio.py +++ b/cnc/hal_raspberry/rpgpio.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from rpgpio_private import * +from .rpgpio_private import * import time import logging diff --git a/tests/rpgpio_test.sh b/tests/rpgpio_test.sh index a3a3018..823b6f1 100755 --- a/tests/rpgpio_test.sh +++ b/tests/rpgpio_test.sh @@ -5,6 +5,7 @@ ADDR=pi@192.168.0.208 if [ ! -z $1 ]; then ADDR=pi@$1 fi -sshpass -p${PASS} scp $(dirname "$0")/../cnc/hal_raspberry/rpgpio_private.py "${ADDR}:~" -sshpass -p${PASS} scp $(dirname "$0")/../cnc/hal_raspberry/rpgpio.py "${ADDR}:~" -sshpass -p${PASS} ssh -t ${ADDR} "sudo ~/rpgpio.py" +find cnc/hal_raspberry -name "rpgpio*.py" -o -name "pycnc" | tar -cjf $(dirname "$0")/../pycnc.tar.bz2 -T - +sshpass -p${PASS} scp $(dirname "$0")/../pycnc.tar.bz2 "${ADDR}:~/pycnc" +sshpass -p${PASS} ssh -t ${ADDR} "(cd ~/pycnc && tar xvf pycnc.tar.bz2) > /dev/null" &> /dev/null +sshpass -p${PASS} ssh -t ${ADDR} "(cd ~/pycnc && sudo pypy -m cnc.hal_raspberry.rpgpio)"