From dba810f623ad02476401faddccfdcaf234db7b5e Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 27 Apr 2024 15:01:24 -0700 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ pygnulib/GLTestDir.py | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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: -- 2.39.5