]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests/integration: make use of libtool to execute lldpd/lldpcli
authorVincent Bernat <vincent@bernat.im>
Fri, 18 Mar 2016 16:31:31 +0000 (17:31 +0100)
committerVincent Bernat <vincent@bernat.im>
Fri, 18 Mar 2016 18:34:54 +0000 (19:34 +0100)
tests/integration/fixtures/programs.py

index bfb0900dd85fcc9c89659e9c027fde3920b14b19..feeb7e7f8fb6c496cd35e51105ab7536e526d378 100644 (file)
@@ -78,6 +78,8 @@ def most_recent(*args):
     assert len(candidates) > 0
     return candidates[0]
 
+libtool_location = most_recent('../../libtool',
+                               '../../*/libtool')
 lldpcli_location = most_recent('../../src/client/lldpcli',
                                '../../*/src/client/lldpcli')
 lldpd_location = most_recent('../../src/daemon/lldpd',
@@ -136,7 +138,8 @@ class LldpdFactory(object):
                 lldpcli_location,
                 "-u",
                 str(self.tmpdir.join("ns", "lldpd.socket"))) + args
-        p = subprocess.Popen((lldpd_location,) + args,
+        p = subprocess.Popen((libtool_location, 'execute',
+                              lldpd_location) + args,
                              stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         self.pids.append(p.pid)
         t = multiprocessing.Process(target=self.run, args=(p, args, silent))
@@ -280,7 +283,8 @@ def lldpcli(request, tmpdir):
 
     def run(*args):
         cargs = ("-u", str(socketdir)) + args
-        p = subprocess.Popen((lldpcli_location,) + cargs,
+        p = subprocess.Popen((libtool_location, 'execute',
+                              lldpcli_location) + cargs,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
         stdout, stderr = p.communicate(timeout=30)