From: Bruno Haible Date: Fri, 16 Aug 2024 16:24:54 +0000 (+0200) Subject: gnulib-tool.py: Correct the result of --extract-dependents. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5c73543760543bc5f9bac26bde512c9a09613e89;p=gnulib.git gnulib-tool.py: Correct the result of --extract-dependents. * pygnulib/GLModuleSystem.py (GLModule.getDependents): Add the current module's test module, if that exists. --- diff --git a/ChangeLog b/ChangeLog index 51dee4c201..2d8bbcd229 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-08-16 Bruno Haible + + gnulib-tool.py: Correct the result of --extract-dependents. + * pygnulib/GLModuleSystem.py (GLModule.getDependents): Add the current + module's test module, if that exists. + 2024-08-16 Bruno Haible gnulib-tool.py: Don't treat 'valgrind-tests' as a tests module. diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 1f758fb0e5..e9855f775c 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -596,6 +596,11 @@ class GLModule: listing = [ line for line in listing if self.modulesystem.file_is_module(line) ] + # ${module}-tests implicitly depends on ${module}, if both exist. + if self.isNonTests(): + implicit_dependent = self.name+'-tests' + if self.modulesystem.exists(implicit_dependent): + listing.append(implicit_dependent) candidates = sorted(set(listing)) result = [] for name in candidates: