]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool.py: Produce same diagnostics regardless of Automake version.
authorBruno Haible <bruno@clisp.org>
Sat, 23 Mar 2024 17:10:13 +0000 (18:10 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 23 Mar 2024 17:11:29 +0000 (18:11 +0100)
* pygnulib/GLTestDir.py (_patch_test_driver): Suppress the diagnostics
from 'patch', and instead provide our own diagnostics.

ChangeLog
pygnulib/GLTestDir.py

index 22d1684b130a514485541429be2d35487c93d384..7aff2f21ab7fef4c8dd6988a27dea09d79e4e65c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-03-23  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        gnulib-tool.py: Print "executing touch config.h.in".
index 5f6fc1a0d9679aa45883c2882637fb765e19f599..c1ab923386f041e3fb59f99fa263c5f772ba5943 100644 (file)
@@ -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')