From fb134a936a9fc0484d7a9163700d9afa749db75c Mon Sep 17 00:00:00 2001 From: rpm-build Date: Dec 09 2020 22:54:05 +0000 Subject: tests-Support-Debian-s-libfaketime.patch patch_name: tests-Support-Debian-s-libfaketime.patch present_in_specfile: true location_in_specfile: 8 --- diff --git a/tests/magtests.py b/tests/magtests.py index da1cca7..6c38a8f 100755 --- a/tests/magtests.py +++ b/tests/magtests.py @@ -692,9 +692,16 @@ def test_hostname_acceptor(testdir, testenv, logfile): def faketime_setup(testenv): - libfaketime = '/usr/lib64/faketime/libfaketime.so.1' - # optional faketime - if not os.path.isfile(libfaketime): + # Wanted: an architecture- and distro-agnostic way to do this. + # libfaketime is installed in a place where ld.so won't pick it up by + # default, so... + paths = ['/usr/lib64/faketime/libfaketime.so.1', + '/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1'] + libfaketime = None + for p in paths: + if os.path.isfile(p): + libfaketime = p + if not libfaketime: raise NotImplementedError # spedup x100