Skip to content

Commit 367120a

Browse files
frozencemeterysimo5
authored andcommitted
[tests] Support Debian's libfaketime
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
1 parent 09df758 commit 367120a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/magtests.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,16 @@ def test_gss_localname(testdir, testenv, logfile):
735735

736736

737737
def faketime_setup(testenv):
738-
libfaketime = '/usr/lib64/faketime/libfaketime.so.1'
739-
# optional faketime
740-
if not os.path.isfile(libfaketime):
738+
# Wanted: an architecture- and distro-agnostic way to do this.
739+
# libfaketime is installed in a place where ld.so won't pick it up by
740+
# default, so...
741+
paths = ['/usr/lib64/faketime/libfaketime.so.1',
742+
'/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1']
743+
libfaketime = None
744+
for p in paths:
745+
if os.path.isfile(p):
746+
libfaketime = p
747+
if not libfaketime:
741748
raise NotImplementedError
742749

743750
# spedup x100

0 commit comments

Comments
 (0)