--- /dev/null
+From: Simon McVittie <smcv@debian.org>
+Date: Mon, 8 Aug 2022 16:50:40 +0100
+Subject: Work around #1014417 in Meson
+
+Forwarded: not-needed, Meson should be fixed instead
+---
+ testsuite/a11y/meson.build | 2 +-
+ testsuite/css/change/meson.build | 2 +-
+ testsuite/css/meson.build | 6 +++---
+ testsuite/css/nodes/meson.build | 2 +-
+ testsuite/css/parser/meson.build | 2 +-
+ testsuite/css/style/meson.build | 2 +-
+ testsuite/gdk/meson.build | 4 ++--
+ testsuite/gsk/meson.build | 4 ++--
+ testsuite/gtk/meson.build | 6 +++---
+ testsuite/meson.build | 7 +++++++
+ testsuite/reftests/gtk-reftest.c | 4 ----
+ testsuite/reftests/meson.build | 2 +-
+ testsuite/tools/meson.build | 2 +-
+ 13 files changed, 24 insertions(+), 21 deletions(-)
+
+diff --git a/testsuite/a11y/meson.build b/testsuite/a11y/meson.build
+index 4f50d3a..a0344f5 100644
+--- a/testsuite/a11y/meson.build
++++ b/testsuite/a11y/meson.build
+@@ -84,7 +84,7 @@ foreach t : tests
+
+ test(test_name, test_exe,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ timeout: test_timeout,
+ env: test_env,
+ suite: ['a11y'] + test_extra_suites,
+diff --git a/testsuite/css/change/meson.build b/testsuite/css/change/meson.build
+index 9409f48..c88ea61 100644
+--- a/testsuite/css/change/meson.build
++++ b/testsuite/css/change/meson.build
+@@ -22,7 +22,7 @@ test_change = executable(
+
+ test('change', test_change,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: changetest_env,
+ suite: 'css',
+ )
+diff --git a/testsuite/css/meson.build b/testsuite/css/meson.build
+index 20c0314..dcc9240 100644
+--- a/testsuite/css/meson.build
++++ b/testsuite/css/meson.build
+@@ -25,7 +25,7 @@ test_api = executable('api', 'api.c',
+
+ test('api', test_api,
+ args: ['--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: csstest_env,
+ suite: 'css',
+ )
+@@ -40,7 +40,7 @@ test_data = executable('data', 'data.c',
+
+ test('data', test_data,
+ args: ['--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: csstest_env,
+ suite: 'css',
+ )
+@@ -54,7 +54,7 @@ transition = executable('transition', 'transition.c',
+
+ test('transition', transition,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: csstest_env,
+ suite: 'css'
+ )
+diff --git a/testsuite/css/nodes/meson.build b/testsuite/css/nodes/meson.build
+index eb619cf..3c80ba2 100644
+--- a/testsuite/css/nodes/meson.build
++++ b/testsuite/css/nodes/meson.build
+@@ -17,7 +17,7 @@ test_nodes = executable('test-css-nodes', 'test-css-nodes.c', '../../testutils.c
+ dependencies: libgtk_dep)
+ test('nodes', test_nodes,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: nodetest_env,
+ suite: 'css',
+ )
+diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build
+index d0fdd0d..3029f53 100644
+--- a/testsuite/css/parser/meson.build
++++ b/testsuite/css/parser/meson.build
+@@ -529,7 +529,7 @@ foreach testname : test_data
+ '-k',
+ join_paths(meson.current_source_dir(), testname),
+ ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: [
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+diff --git a/testsuite/css/style/meson.build b/testsuite/css/style/meson.build
+index 9dc0f4c..c543a16 100644
+--- a/testsuite/css/style/meson.build
++++ b/testsuite/css/style/meson.build
+@@ -28,7 +28,7 @@ test_style = executable(
+ )
+ test('style', test_style,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: styletest_env,
+ suite: 'css',
+ )
+diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build
+index 14b2c85..533cd9b 100644
+--- a/testsuite/gdk/meson.build
++++ b/testsuite/gdk/meson.build
+@@ -41,7 +41,7 @@ foreach t : tests
+
+ test(test_name, test_exe,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ is_parallel: t.get('parallel', false),
+ env: [
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+@@ -66,7 +66,7 @@ foreach t : internal_tests
+
+ test(t, test_exe,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: [
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
+index 8c3ff1f..9c60dbd 100644
+--- a/testsuite/gsk/meson.build
++++ b/testsuite/gsk/meson.build
+@@ -233,7 +233,7 @@ foreach t : tests
+
+ test(test_name, test_exe,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: [
+ 'GSK_RENDERER=cairo',
+ 'GTK_A11Y=test',
+@@ -265,7 +265,7 @@ foreach t : internal_tests
+
+ test(test_name, test_exe,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: [
+ 'GSK_RENDERER=cairo',
+ 'GTK_A11Y=test',
+diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
+index 3324664..de24177 100644
+--- a/testsuite/gtk/meson.build
++++ b/testsuite/gtk/meson.build
+@@ -184,7 +184,7 @@ foreach t : tests
+
+ test(test_name, test_exe,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ timeout: test_timeout,
+ env: test_env,
+ suite: ['gtk'] + test_extra_suites,
+@@ -217,7 +217,7 @@ foreach t : internal_tests
+
+ test(test_name, test_exe,
+ args: [ '--tap', '-k' ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ timeout: test_timeout,
+ env: test_env,
+ suite: ['gtk'] + test_extra_suites,
+@@ -235,7 +235,7 @@ if add_languages('cpp', required: false, native: false)
+ )
+ test('c++ keywords', test_exe,
+ args: [ '--tap', '-k' ],
+- #protocol: 'tap',
++ #protocol: tap_test_protocol,
+ env: test_env,
+ suite: 'gtk',
+ )
+diff --git a/testsuite/meson.build b/testsuite/meson.build
+index 97344f3..05d6a57 100644
+--- a/testsuite/meson.build
++++ b/testsuite/meson.build
+@@ -2,6 +2,13 @@ gtk_libexecdir = join_paths(gtk_prefix, get_option('libexecdir'))
+ installed_test_bindir = join_paths(gtk_libexecdir, 'installed-tests', 'gtk-4.0')
+ installed_test_datadir = join_paths(gtk_datadir, 'installed-tests', 'gtk-4.0')
+
++if meson.version() == '0.63.0'
++ # Work around https://github.com/mesonbuild/meson/issues/10577
++ tap_test_protocol = 'exitcode'
++else
++ tap_test_protocol = 'tap'
++endif
++
+ common_env = [
+ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c
+index aa4d3c7..3706baf 100644
+--- a/testsuite/reftests/gtk-reftest.c
++++ b/testsuite/reftests/gtk-reftest.c
+@@ -602,9 +602,5 @@ main (int argc, char **argv)
+
+ result = g_test_run ();
+
+- if (using_tap)
+- return 0;
+-
+ return result;
+ }
+-
+diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
+index 2c6e104..33e307a 100644
+--- a/testsuite/reftests/meson.build
++++ b/testsuite/reftests/meson.build
+@@ -607,7 +607,7 @@ foreach testname : testdata
+ '-o', join_paths(meson.current_build_dir(), 'output'),
+ join_paths(meson.current_source_dir(), testname),
+ ],
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: reftest_env,
+ suite: 'reftest',
+ should_fail: xfails.contains(testname),
+diff --git a/testsuite/tools/meson.build b/testsuite/tools/meson.build
+index 582bce6..4b12797 100644
+--- a/testsuite/tools/meson.build
++++ b/testsuite/tools/meson.build
+@@ -21,7 +21,7 @@ if bash.found()
+ test(t, bash,
+ args: t,
+ workdir: meson.current_build_dir(),
+- protocol: 'tap',
++ protocol: tap_test_protocol,
+ env: [
+ 'TEST_RESULT_DIR=@0@'.format(join_paths(meson.current_build_dir(), 'output')),
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),