]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool.py: Implement --add-import --with-*-tests correctly.
authorBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2024 23:23:11 +0000 (01:23 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2024 23:23:11 +0000 (01:23 +0200)
* pygnulib/GLConfig.py (GLConfig.update): Use list-merging for the test
categories.
* pygnulib/GLImport.py (GLImport.__init__): Don't merge back those
values which were already considered by taking the union.

ChangeLog
pygnulib/GLConfig.py
pygnulib/GLImport.py

index db3c4591e27123c7f1a28f62630e7a94f6bfe9fc..8f5904281c49419e8f8d8dd3e703b148e0c6cb0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-04-12  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool.py: Implement --add-import --with-*-tests correctly.
+       * pygnulib/GLConfig.py (GLConfig.update): Use list-merging for the test
+       categories.
+       * pygnulib/GLImport.py (GLImport.__init__): Don't merge back those
+       values which were already considered by taking the union.
+
 2024-04-12  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.py: Implement --add-import --avoid correctly.
index 4e1eeb137538e9bf979ee813d845ef9519fede7e..9a4f4bfe6803d8d99de23d8be65e757a7534b36c 100644 (file)
@@ -290,7 +290,8 @@ class GLConfig:
                     if self.isdefault(key, dest):
                         value = src
                     else:  # if not self.isdefault(key, dest)
-                        if key in ['modules', 'avoids']:
+                        if key in ['modules', 'avoids',
+                                   'incl_test_categories', 'excl_test_categories']:
                             value = sorted(set(src + dest))
                         else:
                             value = dest
index 210768bd68f50b629c811ed5dc39d831aec17db1..d45cf6b3ba14001673ce8835eaf42b50c827368b 100644 (file)
@@ -264,7 +264,8 @@ class GLImport:
             # Merge with the configuration from the command-line parameters;
             # they override the configuration found on disk.
             for key in config.keys():
-                if key not in ['modules', 'avoids']:
+                if key not in ['modules', 'avoids',
+                               'incl_test_categories', 'excl_test_categories']:
                     value = config[key]
                     if not config.isdefault(key, value):
                         self.config.update_key(config, key)