aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-08-24 17:16:03 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-08-25 15:41:13 +0200
commit157dd3f1c90fd928c21403113e0e7ab82b9be7c8 (patch)
treec0cee128cd2c72301647b327fd41da63e09af0cc
parentcae1fcac20d21b736d4c77985b8e11775711a563 (diff)
downloadhardware_replicant_libsamsung-ipc-157dd3f1c90fd928c21403113e0e7ab82b9be7c8.tar.gz
hardware_replicant_libsamsung-ipc-157dd3f1c90fd928c21403113e0e7ab82b9be7c8.tar.bz2
hardware_replicant_libsamsung-ipc-157dd3f1c90fd928c21403113e0e7ab82b9be7c8.zip
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 <GNUtoo@cyberdimension.org>
-rwxr-xr-xsamsung-ipc/tests/libsamsung-ipc-test.py2
-rw-r--r--scripts/guix.scm7
-rwxr-xr-xtools/ipc-modem/tests/ipc-modem.py2
-rwxr-xr-xtools/tests/nv_data-imei.py2
-rwxr-xr-xtools/tests/nv_data-md5.py2
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.
#