Bug 1326496 - testing:mochitest: Use find_library to get libc filename. r=ahal

On architectures like alpha and ia64, the glibc does not use the
canonical ABI version number 6 but 6.1 and therefore the filename
of the C library is not libc.so.6 but libc.so.6.1. We're therefore
making the Python code more flexible and use find_library from
ctypes.util to determine the filename from the environment instead
of hard-coding it.

--HG--
extra : rebase_source : 66e1caf57f9743dc10698b93c7e1f1a1b3b67e85
This commit is contained in:
John Paul Adrian Glaubitz 2016-12-30 14:34:51 +01:00
parent e8d74e899f
commit a2cfbb6178

View File

@ -37,6 +37,7 @@ import uuid
import zipfile
import bisection
from ctypes.util import find_library
from datetime import datetime
from manifestparser import TestManifest
from manifestparser.filters import (
@ -627,7 +628,7 @@ def checkAndConfigureV4l2loopback(device):
if not mozinfo.isLinux:
return False, ''
libc = ctypes.cdll.LoadLibrary('libc.so.6')
libc = ctypes.cdll.LoadLibrary(find_library("c"))
O_RDWR = 2
# These are from linux/videodev2.h