aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-02-03 23:46:07 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-02-18 02:38:54 +0530
commit2eef18b16352f6626d6f3fd2e715497c485355dc (patch)
tree20ca78ea4afa998d1e1ce40c60e79afaae3dcec2 /run_unittests.py
parentde1b10c32d5640d0b37be21ec0ab0894f7a3553f (diff)
downloadmeson-2eef18b16352f6626d6f3fd2e715497c485355dc.zip
meson-2eef18b16352f6626d6f3fd2e715497c485355dc.tar.gz
meson-2eef18b16352f6626d6f3fd2e715497c485355dc.tar.bz2
run_unittests: Filter out non-object contents in static library test
On macOS, this contains an extra file called `__.SYMDEF SORTED`, so filter it out.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 830d3ba..e93d984 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -356,7 +356,7 @@ class AllPlatformTests(BasePlatformTests):
self.build()
before = self._run(['ar', 't', os.path.join(self.builddir, libname)]).split()
# Filter out non-object-file contents
- before = [f for f in before if f.endswith((b'.o', b'.obj'))]
+ before = [f for f in before if f.endswith(('.o', '.obj'))]
# Static library should contain only one object
self.assertEqual(len(before), 1, msg=before)
# Change the source to be built into the static library
@@ -364,7 +364,7 @@ class AllPlatformTests(BasePlatformTests):
self.build()
after = self._run(['ar', 't', os.path.join(self.builddir, libname)]).split()
# Filter out non-object-file contents
- after = [f for f in after if f.endswith((b'.o', b'.obj'))]
+ after = [f for f in after if f.endswith(('.o', '.obj'))]
# Static library should contain only one object
self.assertEqual(len(after), 1, msg=after)
# and the object must have changed