]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test: Work around TAP test regression in Meson 0.63.0
authorSimon McVittie <smcv@collabora.com>
Fri, 15 Jul 2022 00:37:47 +0000 (01:37 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 15 Jul 2022 09:10:54 +0000 (10:10 +0100)
With Meson 0.63.0, detailed output of TAP tests is not logged, and the
test deadlocks if the stderr pipe fills up. I'm hoping this will be fixed
before 0.63.1, but in the meantime we can work around it by falling back
to the 'exitcode' protocol: this means we lose machine-readable detailed
test results, but at least our tests pass.

See https://github.com/mesonbuild/meson/issues/10577 and
https://github.com/mesonbuild/meson/issues/10563 for details of the
Meson regression.

Signed-off-by: Simon McVittie <smcv@collabora.com>
test/meson.build
test/name-test/meson.build

index e63609008c9dbd98bd784d4038426bc11c85c95b..e310e9db802bb22e7967112daa8784253d61bfbb 100644 (file)
@@ -101,6 +101,13 @@ xdgdir = custom_target('gen-xdgdir',
 
 installed_tests = []
 
+if meson.version().version_compare('>=0.63')
+    # Work around https://github.com/mesonbuild/meson/issues/10577
+    test_protocol = 'exitcode'
+else
+    test_protocol = 'tap'
+endif
+
 ###############################################################################
 # Dbus testutils
 
@@ -575,7 +582,7 @@ foreach test: tests
             test_exe,
             args: ['--tap'],
             env: test_env,
-            protocol: 'tap',
+            protocol: test_protocol,
             suite: suites,
             timeout: timeout,
         )
index 8e26e1b7ddbadc5868da6a406ef232b4a2793f51..969636ad7fd1c4fc7fb489ac249d36bafa60d82c 100644 (file)
@@ -78,7 +78,7 @@ if embedded_tests
                 test_exe,
             ],
             env: test_env,
-            protocol: 'tap',
+            protocol: test_protocol,
             suite: suites,
             timeout: timeout,
         )
@@ -89,14 +89,14 @@ if embedded_tests
         test('run-test',
             find_program('run-test.sh'),
             env: test_env,
-            protocol: 'tap',
+            protocol: test_protocol,
             suite: 'name-test',
         )
 
         test('run-test-systemserver',
             find_program('run-test-systemserver.sh'),
             env: test_env,
-            protocol: 'tap',
+            protocol: test_protocol,
             suite: 'name-test',
         )
     endif