aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-02-15 04:02:57 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-03-07 20:33:46 +0100
commit79f5b6080b1b7bd5ac9f7e1aac4fcdee0059ff35 (patch)
tree825ddebba4ca62129c985f0a5d5b1a4a00ad175e /tests
parent1f8acd988430369662079295caf08c092d6416ed (diff)
Python 2 is deprecated, remove backwards compatibility chunks
pySim has already been migrated to Python 3 in another change [1], and the build verification has been migrated to Debian 10 with Python 3.7. However, there is still some backwards compatibility code left. Let's get rid of it. [1] Ic78da9c03e99f59d142c93394051bbc2751f0205 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Tweaked-by: Vadim Yanitskiy <vyanitskiy@sysmocom.de> Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff
Diffstat (limited to 'tests')
-rwxr-xr-xtests/pysim-test.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/pysim-test.sh b/tests/pysim-test.sh
index 7ee9834..4004c18 100755
--- a/tests/pysim-test.sh
+++ b/tests/pysim-test.sh
@@ -23,6 +23,7 @@
PYSIM_PROG=../pySim-prog.py
PYSIM_READ=../pySim-read.py
TEMPFILE=temp.tmp
+PYTHON=python3
set -e
@@ -76,7 +77,7 @@ function check_card {
CARD_NAME=$2
echo "Verifying card ..."
stat ./$CARD_NAME.ok > /dev/null
- python $PYSIM_READ -p $TERMINAL > $TEMPFILE
+ $PYTHON $PYSIM_READ -p $TERMINAL > $TEMPFILE
set +e
CARD_DIFF=$(diff $TEMPFILE ./$CARD_NAME.ok)
set -e
@@ -106,7 +107,7 @@ function check_card {
function gen_ok_file {
TERMINAL=$1
CARD_NAME=$2
- python $PYSIM_READ -p $TERMINAL > "$CARD_NAME.ok"
+ $PYTHON $PYSIM_READ -p $TERMINAL > "$CARD_NAME.ok"
echo "Generated file: $CARD_NAME.ok"
echo "------------8<------------"
cat "$CARD_NAME.ok"
@@ -166,7 +167,7 @@ function run_test {
ADM_OPT="-A"
ADM=$ADM_HEX
fi
- python $PYSIM_PROG -p $I -t $CARD_NAME -o $OPC -k $KI -x $MCC -y $MNC -i $IMSI -s $ICCID --msisdn $MSISDN $ADM_OPT $ADM
+ $PYTHON $PYSIM_PROG -p $I -t $CARD_NAME -o $OPC -k $KI -x $MCC -y $MNC -i $IMSI -s $ICCID --msisdn $MSISDN $ADM_OPT $ADM
check_card $I $CARD_NAME
echo ""
done