From 157dd3f1c90fd928c21403113e0e7ab82b9be7c8 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Wed, 24 Aug 2022 17:16:03 +0200 Subject: python tests: use python3 Using python instead of python3 has several issues: - Distributions and users can choose python2 as their default python interpreter. For users this can be done by making a symlink in /usr/local for instance. - Guix doesn't have python but has python3 in the PATH. Changing to python3 makes tests work for Guix system users that use the scripts/manifest.scm file with guix shell / guix environment. Signed-off-by: Denis 'GNUtoo' Carikli --- samsung-ipc/tests/libsamsung-ipc-test.py | 2 +- scripts/guix.scm | 7 +------ tools/ipc-modem/tests/ipc-modem.py | 2 +- tools/tests/nv_data-imei.py | 2 +- tools/tests/nv_data-md5.py | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/samsung-ipc/tests/libsamsung-ipc-test.py b/samsung-ipc/tests/libsamsung-ipc-test.py index 527c908..5435013 100755 --- a/samsung-ipc/tests/libsamsung-ipc-test.py +++ b/samsung-ipc/tests/libsamsung-ipc-test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This file is part of libsamsung-ipc. # diff --git a/scripts/guix.scm b/scripts/guix.scm index 7c23fea..eb9689c 100644 --- a/scripts/guix.scm +++ b/scripts/guix.scm @@ -202,12 +202,7 @@ (arguments `(#:phases (modify-phases %standard-phases - (add-before 'build 'patch-python - (lambda _ - (substitute* (find-files "." ".*\\.py$") - (("/usr/bin/env python") (which "python3"))) - #t)) - (add-after 'patch-python 'fix-valgrind + (add-after 'build 'fix-valgrind (lambda _ (substitute* (find-files "." ".*\\.py$") (("'--leak-check=full',") diff --git a/tools/ipc-modem/tests/ipc-modem.py b/tools/ipc-modem/tests/ipc-modem.py index 25331ae..d04f40d 100755 --- a/tools/ipc-modem/tests/ipc-modem.py +++ b/tools/ipc-modem/tests/ipc-modem.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This file is part of libsamsung-ipc. # diff --git a/tools/tests/nv_data-imei.py b/tools/tests/nv_data-imei.py index 1dbebb7..3447690 100755 --- a/tools/tests/nv_data-imei.py +++ b/tools/tests/nv_data-imei.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This file is part of libsamsung-ipc. # diff --git a/tools/tests/nv_data-md5.py b/tools/tests/nv_data-md5.py index b97bdd1..374ded2 100755 --- a/tools/tests/nv_data-md5.py +++ b/tools/tests/nv_data-md5.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This file is part of libsamsung-ipc. # -- cgit v1.2.3