summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@canonical.com>2019-10-31 06:44:20 -0400
committerDan Streetman <ddstreet@canonical.com>2019-11-01 12:00:57 -0400
commit7471bcb06e9c74bfb3c867a14c7e2a94a8c06dbe (patch)
tree3198fff4db7dbc0d77e08681404fa21862588750 /test
parent856423f14dfd8d0017d19ab9ac1b8ec4d480baae (diff)
downloadsystemd-7471bcb06e9c74bfb3c867a14c7e2a94a8c06dbe.tar.gz
systemd-7471bcb06e9c74bfb3c867a14c7e2a94a8c06dbe.tar.bz2
systemd-7471bcb06e9c74bfb3c867a14c7e2a94a8c06dbe.zip
test: check /usr/lib and /lib for systemd binaries
Fedora uses /usr/lib while Debian uses /lib; find the right location
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 6b27200fe9..e74cc83c00 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -22,12 +22,16 @@ network_sysctl_ipv4_path='/proc/sys/net/ipv4/conf'
dnsmasq_pid_file='/run/networkd-ci/test-test-dnsmasq.pid'
dnsmasq_log_file='/run/networkd-ci/test-dnsmasq-log-file'
-networkd_bin='/usr/lib/systemd/systemd-networkd'
-resolved_bin='/usr/lib/systemd/systemd-resolved'
-wait_online_bin='/usr/lib/systemd/systemd-networkd-wait-online'
-networkctl_bin='/usr/bin/networkctl'
-resolvectl_bin='/usr/bin/resolvectl'
-timedatectl_bin='/usr/bin/timedatectl'
+systemd_lib_paths=['/usr/lib/systemd', '/lib/systemd']
+which_paths=':'.join(systemd_lib_paths + os.getenv('PATH', os.defpath).lstrip(':').split(':'))
+
+networkd_bin=shutil.which('systemd-networkd', path=which_paths)
+resolved_bin=shutil.which('systemd-resolved', path=which_paths)
+wait_online_bin=shutil.which('systemd-networkd-wait-online', path=which_paths)
+networkctl_bin=shutil.which('networkctl', path=which_paths)
+resolvectl_bin=shutil.which('resolvectl', path=which_paths)
+timedatectl_bin=shutil.which('timedatectl', path=which_paths)
+
use_valgrind=False
enable_debug=True
env = {}