[neon/backports-jammy/meson-jammy/Neon/release] debian/patches: sync patches
Jonathan Esk-Riddell
null at kde.org
Thu Sep 29 17:24:42 BST 2022
Git commit cf468d48482f49bba7d5044a09c1529e2942d6d5 by Jonathan Esk-Riddell.
Committed on 29/09/2022 at 16:24.
Pushed by jriddell into branch 'Neon/release'.
sync patches
D +0 -138 debian/patches/3-mtest-unify-parsed-and-non-parsed-output-handling.patch
D +0 -20 debian/patches/ftbfs-new-googletest.patch
M +0 -2 debian/patches/series
https://invent.kde.org/neon/backports-jammy/meson-jammy/commit/cf468d48482f49bba7d5044a09c1529e2942d6d5
diff --git a/debian/patches/3-mtest-unify-parsed-and-non-parsed-output-handling.patch b/debian/patches/3-mtest-unify-parsed-and-non-parsed-output-handling.patch
deleted file mode 100644
index 633b1c5..0000000
--- a/debian/patches/3-mtest-unify-parsed-and-non-parsed-output-handling.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From: Hemmo Nieminen <hemmo.nieminen at iki.fi>
-Date: Tue, 12 Jul 2022 12:40:03 +0300
-Subject: mtest: unify parsed and non-parsed output handling
-
-Use the same routines to handle output both when parsing the output and
-when not. Also fixes broken stderr handling for parsed tests.
----
- mesonbuild/mtest.py | 38 +++++++++------------------
- test cases/common/253 long output/dumper.c | 17 ++++++++++++
- test cases/common/253 long output/meson.build | 5 ++++
- 3 files changed, 35 insertions(+), 25 deletions(-)
- create mode 100644 test cases/common/253 long output/dumper.c
- create mode 100644 test cases/common/253 long output/meson.build
-
-diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
-index d733ce8..81466e8 100644
---- a/mesonbuild/mtest.py
-+++ b/mesonbuild/mtest.py
-@@ -1107,7 +1107,9 @@ def decode(stream: T.Union[None, bytes]) -> str:
- except UnicodeDecodeError:
- return stream.decode('iso-8859-1', errors='ignore')
-
--async def read_decode(reader: asyncio.StreamReader, console_mode: ConsoleUser) -> str:
-+async def read_decode(reader: asyncio.StreamReader,
-+ queue: T.Optional['asyncio.Queue[T.Optional[str]]'],
-+ console_mode: ConsoleUser) -> str:
- stdo_lines = []
- try:
- while not reader.at_eof():
-@@ -1123,26 +1125,14 @@ async def read_decode(reader: asyncio.StreamReader, console_mode: ConsoleUser) -
- stdo_lines.append(line)
- if console_mode is ConsoleUser.STDOUT:
- print(line, end='', flush=True)
-- return ''.join(stdo_lines)
-- except asyncio.CancelledError:
-- return ''.join(stdo_lines)
--
--# Extract lines out of the StreamReader. Print them
--# along the way if requested, and at the end collect
--# them all into a future.
--async def read_decode_lines(reader: asyncio.StreamReader,
-- q: 'asyncio.Queue[T.Optional[str]]') -> str:
-- stdo_lines = []
-- try:
-- while not reader.at_eof():
-- line = decode(await reader.readline())
-- stdo_lines.append(line)
-- await q.put(line)
-+ if queue:
-+ await queue.put(line)
- return ''.join(stdo_lines)
- except asyncio.CancelledError:
- return ''.join(stdo_lines)
- finally:
-- await q.put(None)
-+ if queue:
-+ await queue.put(None)
-
- def run_with_mono(fname: str) -> bool:
- return fname.endswith('.exe') and not (is_windows() or is_cygwin())
-@@ -1224,12 +1214,11 @@ class TestSubprocess:
- self.stde_task = None # type: T.Optional[asyncio.Future[str]]
- self.postwait_fn = postwait_fn # type: T.Callable[[], None]
- self.all_futures = [] # type: T.List[asyncio.Future]
-+ self.queue = None # type: T.Optional[asyncio.Queue[T.Optional[str]]]
-
- def stdout_lines(self) -> T.AsyncIterator[str]:
-- q = asyncio.Queue() # type: asyncio.Queue[T.Optional[str]]
-- decode_coro = read_decode_lines(self._process.stdout, q)
-- self.stdo_task = asyncio.ensure_future(decode_coro)
-- return queue_iter(q)
-+ self.queue = asyncio.Queue()
-+ return queue_iter(self.queue)
-
- def communicate(self,
- test: 'TestRun',
-@@ -1238,12 +1227,12 @@ class TestSubprocess:
- async def collect_stdo(test: 'TestRun',
- reader: asyncio.StreamReader,
- console_mode: ConsoleUser) -> None:
-- test.stdo = await read_decode(reader, console_mode)
-+ test.stdo = await read_decode(reader, self.queue, console_mode)
-
- async def collect_stde(test: 'TestRun',
- reader: asyncio.StreamReader,
- console_mode: ConsoleUser) -> None:
-- test.stde = await read_decode(reader, console_mode)
-+ test.stde = await read_decode(reader, None, console_mode)
-
- # asyncio.ensure_future ensures that printing can
- # run in the background, even before it is awaited
-@@ -1484,11 +1473,10 @@ class SingleTestRunner:
- if self.runobj.needs_parsing:
- parse_coro = self.runobj.parse(harness, p.stdout_lines())
- parse_task = asyncio.ensure_future(parse_coro)
-- stdo_task = stde_task = None
- else:
-- stdo_task, stde_task = p.communicate(self.runobj, self.console_mode)
- parse_task = None
-
-+ stdo_task, stde_task = p.communicate(self.runobj, self.console_mode)
- await p.wait(self.runobj)
-
- if parse_task:
-diff --git a/test cases/common/253 long output/dumper.c b/test cases/common/253 long output/dumper.c
-new file mode 100644
-index 0000000..6a0369a
---- /dev/null
-+++ b/test cases/common/253 long output/dumper.c
-@@ -0,0 +1,17 @@
-+#include <stdio.h>
-+
-+int main(void)
-+{
-+ for (int i = 0 ; i < 100000 ; i++)
-+ fprintf(stderr, "# Iteration %d\n", i + 1);
-+
-+ printf("ok 1 - dumper to stderr\n");
-+
-+ for (int i = 0 ; i < 100000 ; i++)
-+ fprintf(stdout, "# Iteration %d\n", i + 1);
-+
-+ printf("ok 2 - dumper to stdout\n1..2\n");
-+
-+ return 0;
-+}
-+
-diff --git a/test cases/common/253 long output/meson.build b/test cases/common/253 long output/meson.build
-new file mode 100644
-index 0000000..6d8d62b
---- /dev/null
-+++ b/test cases/common/253 long output/meson.build
-@@ -0,0 +1,5 @@
-+project('long-stderr', 'c')
-+
-+dumper = executable('dumper', 'dumper.c')
-+test('dump-test', dumper)
-+test('dump-test-TAP', dumper, protocol : 'tap')
diff --git a/debian/patches/ftbfs-new-googletest.patch b/debian/patches/ftbfs-new-googletest.patch
deleted file mode 100644
index 084e6b6..0000000
--- a/debian/patches/ftbfs-new-googletest.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: googletest 1.12.1 compat
- googletest 1.12.1 started to emit additional JUnit4 schema invalid
- testcase attributes, delete them when generating meson junit test
- result. Fixing FTBFS with new googletest.
-Author: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
-
-
---- meson-0.63.0.orig/mesonbuild/mtest.py
-+++ meson-0.63.0/mesonbuild/mtest.py
-@@ -774,6 +774,10 @@ class JunitBuilder(TestLogger):
- del case.attrib['result']
- for case in suite.findall('.//testcase[@timestamp]'):
- del case.attrib['timestamp']
-+ for case in suite.findall('.//testcase[@file]'):
-+ del case.attrib['file']
-+ for case in suite.findall('.//testcase[@line]'):
-+ del case.attrib['line']
- self.root.append(suite)
- return
-
diff --git a/debian/patches/series b/debian/patches/series
index 554f277..66ea053 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,2 @@
1-disable-openmpi.patch
2-disable-rootdir-test.patch
-3-mtest-unify-parsed-and-non-parsed-output-handling.patch
-ftbfs-new-googletest.patch
More information about the Neon-commits
mailing list