aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@openbsd.org>2019-03-10 14:37:25 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-03-11 06:02:17 +0000
commitc1c699eda4ed4f8778e621e5d635e31264400053 (patch)
tree631e5fbfaab80c631785b08de04dd7cf9d5e721d
parent03c0c3a8f41e7d9eaff582dbdf680154671a6263 (diff)
downloadmeson-c1c699eda4ed4f8778e621e5d635e31264400053.zip
meson-c1c699eda4ed4f8778e621e5d635e31264400053.tar.gz
meson-c1c699eda4ed4f8778e621e5d635e31264400053.tar.bz2
Fix unit test: test_find_library_patterns
-rwxr-xr-xrun_unittests.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 0e83b6d..078b4ca 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -734,7 +734,7 @@ class InternalTests(unittest.TestCase):
unix_static = ('lib{}.a', '{}.a')
msvc_static = ('lib{}.a', 'lib{}.lib', '{}.a', '{}.lib')
# This is the priority list of pattern matching for library searching
- patterns = {'openbsd': {'shared': ('lib{}.so', '{}.so', 'lib{}.so.[0-9]*.[0-9]*'),
+ patterns = {'openbsd': {'shared': ('lib{}.so', '{}.so', 'lib{}.so.[0-9]*.[0-9]*', '{}.so.[0-9]*.[0-9]*'),
'static': unix_static},
'linux': {'shared': ('lib{}.so', '{}.so'),
'static': unix_static},
@@ -759,15 +759,13 @@ class InternalTests(unittest.TestCase):
self._test_all_naming(cc, env, patterns, 'windows-msvc')
else:
self._test_all_naming(cc, env, patterns, 'windows-mingw')
+ elif is_openbsd():
+ self._test_all_naming(cc, env, patterns, 'openbsd')
else:
self._test_all_naming(cc, env, patterns, 'linux')
- # Mock OpenBSD since we don't have tests for it
true = lambda x, y: True
- if not is_openbsd():
- with PatchModule(mesonbuild.compilers.c.for_openbsd,
- 'mesonbuild.compilers.c.for_openbsd', true):
- self._test_all_naming(cc, env, patterns, 'openbsd')
- else:
+ with PatchModule(mesonbuild.compilers.c.for_openbsd,
+ 'mesonbuild.compilers.c.for_openbsd', true):
self._test_all_naming(cc, env, patterns, 'openbsd')
with PatchModule(mesonbuild.compilers.c.for_darwin,
'mesonbuild.compilers.c.for_darwin', true):