File 0001-tests-Use-python3.patch of Package basicstation

From 18def2fc99ee3cd7b0e404eb0b246961e50b0a30 Mon Sep 17 00:00:00 2001
From: Frank Kunz <mailinglists@kunz-im-inter.net>
Date: Wed, 6 Nov 2024 19:24:26 +0100
Subject: [PATCH] tests: Use python3

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>
---
 regr-tests/test2-gps/test.sh       | 4 ++--
 regr-tests/test2-pps/test.sh       | 2 +-
 regr-tests/test3-updn-tls/test.sh  | 6 +++---
 regr-tests/test3a-updn-tls/test.sh | 6 +++---
 regr-tests/test3b-dnC/test.sh      | 2 +-
 regr-tests/test3b-dnC_2ant/test.sh | 2 +-
 regr-tests/test3b-rx2_2ant/test.sh | 2 +-
 regr-tests/test3c-cca/test.sh      | 2 +-
 regr-tests/test3d-bcns/test.sh     | 2 +-
 regr-tests/test4-cups/test.sh      | 6 +++---
 regr-tests/test5-rmtsh/test.sh     | 2 +-
 regr-tests/test5-runcmd/test.sh    | 2 +-
 12 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/regr-tests/test2-gps/test.sh b/regr-tests/test2-gps/test.sh
index 878caac..49920a4 100755
--- a/regr-tests/test2-gps/test.sh
+++ b/regr-tests/test2-gps/test.sh
@@ -32,6 +32,6 @@
 [[ -p cmd.fifo ]] || mkfifo cmd.fifo
 
 # Trigger move alarm
-python test.py
+python3 test.py
 
-collect_gcda
\ No newline at end of file
+collect_gcda
diff --git a/regr-tests/test2-pps/test.sh b/regr-tests/test2-pps/test.sh
index e55f823..49920a4 100755
--- a/regr-tests/test2-pps/test.sh
+++ b/regr-tests/test2-pps/test.sh
@@ -32,6 +32,6 @@
 [[ -p cmd.fifo ]] || mkfifo cmd.fifo
 
 # Trigger move alarm
-python test.py
+python3 test.py
 
 collect_gcda
diff --git a/regr-tests/test3-updn-tls/test.sh b/regr-tests/test3-updn-tls/test.sh
index 8ebfe8f..a5556e3 100755
--- a/regr-tests/test3-updn-tls/test.sh
+++ b/regr-tests/test3-updn-tls/test.sh
@@ -44,7 +44,7 @@ fi
 # Plain TCP/ws
 unset STATION_ARGS
 unset STATION_RADIOINIT
-python test.py
+python3 test.py
 banner TCP/ws done
 collect_gcda _tcp_ws
 
@@ -59,7 +59,7 @@ fi
 # Plain TLS/wss no client auth
 export STATION_ARGS="-i radioinit2.sh"
 ln -s ../pki-data/muxs-0.ca tc.trust
-python test.py tls no_ca
+python3 test.py tls no_ca
 banner TLS/wss no client auth done
 collect_gcda _tls_no_ca
 unset STATION_ARGS
@@ -76,7 +76,7 @@ fi
 export STATION_RADIOINIT="radioinit3.sh"
 ln -s ../pki-data/tc-router-1.key tc.key
 ln -s ../pki-data/tc-router-1.crt tc.crt
-python test.py tls
+python3 test.py tls
 banner TLS/wss with client auth done
 collect_gcda _tls_ca
 unset STATION_RADIOINIT
diff --git a/regr-tests/test3a-updn-tls/test.sh b/regr-tests/test3a-updn-tls/test.sh
index 22a9346..ae9b60d 100755
--- a/regr-tests/test3a-updn-tls/test.sh
+++ b/regr-tests/test3a-updn-tls/test.sh
@@ -37,14 +37,14 @@ function banner () {
 }
 
 # Plain TCP/ws
-python test.py
+python3 test.py
 banner TCP/ws done
 collect_gcda _tcp_ws
 
 # Plain TLS/wss no client auth
 rm -f tc-bak.* tc.trust
 ln -s ../pki-data/muxs-0.ca tc.trust
-python test.py tls no_ca
+python3 test.py tls no_ca
 banner TLS/wss no client auth done
 collect_gcda _tls_no_ca
 
@@ -52,6 +52,6 @@ collect_gcda _tls_no_ca
 rm -f tc-bak.* tc.key tc.crt
 ln -s ../pki-data/tc-router-1.key tc.key
 ln -s ../pki-data/tc-router-1.crt tc.crt
-python test.py tls
+python3 test.py tls
 banner TLS/wss with client auth done
 collect_gcda _tls_ca
diff --git a/regr-tests/test3b-dnC/test.sh b/regr-tests/test3b-dnC/test.sh
index 6bbcff1..c8596f4 100755
--- a/regr-tests/test3b-dnC/test.sh
+++ b/regr-tests/test3b-dnC/test.sh
@@ -28,6 +28,6 @@
 
 . ../testlib.sh
 
-python test.py
+python3 test.py
 banner class C scheduling done
 collect_gcda
diff --git a/regr-tests/test3b-dnC_2ant/test.sh b/regr-tests/test3b-dnC_2ant/test.sh
index 6b86816..bf32f23 100755
--- a/regr-tests/test3b-dnC_2ant/test.sh
+++ b/regr-tests/test3b-dnC_2ant/test.sh
@@ -34,7 +34,7 @@ for t in omni sector; do
     export ANTENNA_TYPE=$t
     banner 'class C scheduling - $ANTENNA_TYPE antenna(s)'
     sed -e "s/ATYPE/$t/" station.conf.in > station.conf
-    python test.py
+    python3 test.py
     banner class C scheduling done
     collect_gcda _$t
 done
diff --git a/regr-tests/test3b-rx2_2ant/test.sh b/regr-tests/test3b-rx2_2ant/test.sh
index 216d782..b23e2bd 100755
--- a/regr-tests/test3b-rx2_2ant/test.sh
+++ b/regr-tests/test3b-rx2_2ant/test.sh
@@ -34,7 +34,7 @@ for t in omni sector; do
     export ANTENNA_TYPE=$t
     banner "switch to RX2 - $ANTENNA_TYPE antenna(s)"
     sed -e "s/ATYPE/$t/" station.conf.in > station.conf
-    python test.py
+    python3 test.py
     banner "switch to RX2 done - $ANTENNA_TYPE antenna(s)"
     collect_gcda _$t
 done
diff --git a/regr-tests/test3c-cca/test.sh b/regr-tests/test3c-cca/test.sh
index 6bbcff1..c8596f4 100755
--- a/regr-tests/test3c-cca/test.sh
+++ b/regr-tests/test3c-cca/test.sh
@@ -28,6 +28,6 @@
 
 . ../testlib.sh
 
-python test.py
+python3 test.py
 banner class C scheduling done
 collect_gcda
diff --git a/regr-tests/test3d-bcns/test.sh b/regr-tests/test3d-bcns/test.sh
index 9097498..eab71f0 100755
--- a/regr-tests/test3d-bcns/test.sh
+++ b/regr-tests/test3d-bcns/test.sh
@@ -29,7 +29,7 @@
 . ../testlib.sh
 
 for R in US915 KR923; do
-    REGION=$R python test.py
+    REGION=$R python3 test.py
     #banner $R beaconing done
 done
 collect_gcda
diff --git a/regr-tests/test4-cups/test.sh b/regr-tests/test4-cups/test.sh
index 879c8b8..350f0e3 100755
--- a/regr-tests/test4-cups/test.sh
+++ b/regr-tests/test4-cups/test.sh
@@ -79,7 +79,7 @@ function test_plain() {
 
     echo "v0" > _shome/version.txt
     rm -f _shome/updtest.txt /tmp/update.bin
-    python test.py
+    python3 test.py
     banner TCP/ws done
     collect_gcda _tcp_ws
     check_updtest TCP
@@ -93,7 +93,7 @@ function test_tls_noauth() {
 
     echo "v0" > _shome/version.txt
     rm -f _shome/updtest.txt /tmp/update.bin
-    python test.py tls no_ca
+    python3 test.py tls no_ca
     banner TLS/wss NO client auth - DONE
     collect_gcda _tls_no_ca
     check_updtest TLS
@@ -108,7 +108,7 @@ function test_tls_auth() {
 
     echo "v0" > _shome/version.txt
     rm -f _shome/updtest.txt /tmp/update.bin
-    python test.py tls
+    python3 test.py tls
     banner TLS/wss with client auth - DONE
     collect_gcda _tls_ca
     check_updtest TLS
diff --git a/regr-tests/test5-rmtsh/test.sh b/regr-tests/test5-rmtsh/test.sh
index e2150d0..573475f 100755
--- a/regr-tests/test5-rmtsh/test.sh
+++ b/regr-tests/test5-rmtsh/test.sh
@@ -28,5 +28,5 @@
 
 . ../testlib.sh
 
-python test.py
+python3 test.py
 collect_gcda
diff --git a/regr-tests/test5-runcmd/test.sh b/regr-tests/test5-runcmd/test.sh
index 2dc4f33..36888ea 100755
--- a/regr-tests/test5-runcmd/test.sh
+++ b/regr-tests/test5-runcmd/test.sh
@@ -34,7 +34,7 @@ banner TCP/ws - start...
 export TEST='++Test++'
 cp update_bin /tmp/update.bin
 chmod +x /tmp/update.bin
-python test.py
+python3 test.py
 banner TCP/ws - done
 collect_gcda _tcp_ws
 
-- 
2.47.0

openSUSE Build Service is sponsored by