[libvirt] [dbus PATCH] test: Don't hardcode python3 path

Andrea Bolognani posted 1 patch 6 years ago
Failed in applying to current master (apply log)
test/test_connect.py | 2 +-
test/test_domain.py  | 2 +-
test/test_network.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
[libvirt] [dbus PATCH] test: Don't hardcode python3 path
Posted by Andrea Bolognani 6 years ago
Using /usr/bin/python3 is fine for Linux, but it's not portable
to other operating systems such as FreeBSD, where the binary
lives under /usr/local/bin instead.

Use /usr/bin/env to abstract the issue away. With this, 'make
check' completes successfully on FreeBSD 10, 11 and -CURRENT.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 test/test_connect.py | 2 +-
 test/test_domain.py  | 2 +-
 test/test_network.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/test_connect.py b/test/test_connect.py
index 440a496..d972561 100755
--- a/test/test_connect.py
+++ b/test/test_connect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 import dbus
 import libvirttest
diff --git a/test/test_domain.py b/test/test_domain.py
index d36adf7..7ec2318 100755
--- a/test/test_domain.py
+++ b/test/test_domain.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 import dbus
 import libvirttest
diff --git a/test/test_network.py b/test/test_network.py
index 97ab0aa..5178862 100755
--- a/test/test_network.py
+++ b/test/test_network.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 import dbus
 import libvirttest
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH] test: Don't hardcode python3 path
Posted by Pavel Hrdina 6 years ago
On Thu, Apr 05, 2018 at 03:51:17PM +0200, Andrea Bolognani wrote:
> Using /usr/bin/python3 is fine for Linux, but it's not portable
> to other operating systems such as FreeBSD, where the binary
> lives under /usr/local/bin instead.
> 
> Use /usr/bin/env to abstract the issue away. With this, 'make
> check' completes successfully on FreeBSD 10, 11 and -CURRENT.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  test/test_connect.py | 2 +-
>  test/test_domain.py  | 2 +-
>  test/test_network.py | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list