From: Collin Funk Date: Sat, 27 Apr 2024 22:01:24 +0000 (-0700) Subject: gnulib-tool.py: Preserve module ordering in --create-megatestdir. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=dba810f623ad02476401faddccfdcaf234db7b5e;p=gnulib.git gnulib-tool.py: Preserve module ordering in --create-megatestdir. * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Use a separate set to remove duplicates from the original list without sorting. --- diff --git a/ChangeLog b/ChangeLog index 935ddbd1ba..34893ebff1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-04-27 Collin Funk + + gnulib-tool.py: Preserve module ordering in --create-megatestdir. + * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Use a separate set to + remove duplicates from the original list without sorting. + 2024-04-27 Bruno Haible fcntl-h, stdio, unistd: Ensure off64_t is defined on all platforms. diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index 758a65168e..002eb30267 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -876,7 +876,12 @@ class GLMegaTestDir: modules = self.modulesystem.list() modules = [ self.modulesystem.find(m) for m in modules ] - modules = sorted(set(modules)) + # Preserve ordering from the command-line, but remove duplicates. + # This allows control over the SUBDIRS variable in the top-level Makefile.am. + module_set = set(modules) + modules = [ module + for module in modules + if module in module_set ] # First, all modules one by one. for module in modules: