]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Preserve module ordering in --create-megatestdir.
authorCollin Funk <collin.funk1@gmail.com>
Sat, 27 Apr 2024 22:01:24 +0000 (15:01 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Sat, 27 Apr 2024 22:01:24 +0000 (15:01 -0700)
* pygnulib/GLTestDir.py (GLMegaTestDir.execute): Use a separate set to
remove duplicates from the original list without sorting.

ChangeLog
pygnulib/GLTestDir.py

index 935ddbd1bacebf8437b8844dafcb5f0b5c268a04..34893ebff174afa5fcf266a09674675afcedb5ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-04-27  Collin Funk  <collin.funk1@gmail.com>
+
+       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  <bruno@clisp.org>
 
        fcntl-h, stdio, unistd: Ensure off64_t is defined on all platforms.
index 758a65168e2ece4e30b7dcd1a6bf4b86727c51c5..002eb30267099ef80d47c504b43d19cdb8349e8d 100644 (file)
@@ -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: