From 6d4dd6956fe0be1ae19a331edbc07c22679f7317 Mon Sep 17 00:00:00 2001 From: Alexey Rogachevskiy Date: Wed, 12 Feb 2020 22:18:03 +0300 Subject: [PATCH] tests: Use python3 for most of it, python2 for cv2 --- builder/image-validate.sh | 2 +- builder/test/tests.py | 2 +- builder/test/tests_py2.py | 7 +++++++ builder/test/tests_py3.py | 7 ------- 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100755 builder/test/tests_py2.py delete mode 100755 builder/test/tests_py3.py diff --git a/builder/image-validate.sh b/builder/image-validate.sh index be9bb2e9..d2184743 100755 --- a/builder/image-validate.sh +++ b/builder/image-validate.sh @@ -25,7 +25,7 @@ source /home/pi/catkin_ws/devel/setup.bash cd /home/pi/catkin_ws/src/clover/builder/test/ ./tests.sh ./tests.py -./tests_py3.py +./tests_py2.py [[ $(./tests_clever.py) == "Warning: clever package is renamed to clover" ]] # test backwards compatibility echo "Move /etc/ld.so.preload back to its original position" diff --git a/builder/test/tests.py b/builder/test/tests.py index 365f9adb..a33d2eac 100755 --- a/builder/test/tests.py +++ b/builder/test/tests.py @@ -29,4 +29,4 @@ import rpi_ws281x import pigpio from espeak import espeak -print cv2.getBuildInformation() +print(cv2.getBuildInformation()) diff --git a/builder/test/tests_py2.py b/builder/test/tests_py2.py new file mode 100755 index 00000000..32c389f2 --- /dev/null +++ b/builder/test/tests_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +# Make sure our Python 2 software is installed + +import cv2 + +print(cv2.getBuildInformation()) diff --git a/builder/test/tests_py3.py b/builder/test/tests_py3.py deleted file mode 100755 index aca3a404..00000000 --- a/builder/test/tests_py3.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -# Make sure our Python 3 software is installed - -import cv2 - -print(cv2.getBuildInformation())