From cf13dc68cb1872130f230d732a3d5fb4dcc2b23a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 23 Mar 2024 18:10:13 +0100 Subject: [PATCH] gnulib-tool.py: Produce same diagnostics regardless of Automake version. * pygnulib/GLTestDir.py (_patch_test_driver): Suppress the diagnostics from 'patch', and instead provide our own diagnostics. --- ChangeLog | 6 ++++++ pygnulib/GLTestDir.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 22d1684b13..7aff2f21ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-03-23 Bruno Haible + + gnulib-tool.py: Produce same diagnostics regardless of Automake version. + * pygnulib/GLTestDir.py (_patch_test_driver): Suppress the diagnostics + from 'patch', and instead provide our own diagnostics. + 2024-03-23 Bruno Haible gnulib-tool.py: Print "executing touch config.h.in". diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index 5f6fc1a0d9..c1ab923386 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -63,6 +63,7 @@ normpath = os.path.normpath def _patch_test_driver() -> None: '''Patch the test-driver script in testdirs.''' test_driver = joinpath('build-aux', 'test-driver') + print('patching file %s' % test_driver) diffs = [ joinpath(DIRS['root'], name) for name in [joinpath('build-aux', 'test-driver.diff'), joinpath('build-aux', 'test-driver-1.16.3.diff')]] @@ -70,7 +71,7 @@ def _patch_test_driver() -> None: for diff in diffs: command = f'patch {test_driver} < {diff}' try: - result = sp.call(command, shell=True) + result = sp.call(command, shell=True, stdout=sp.DEVNULL, stderr=sp.DEVNULL) except OSError: if isfile(f'{test_driver}.orig'): os.remove(f'{test_driver}.orig') -- 2.39.5