From: Bruno Haible Date: Fri, 12 Apr 2024 23:23:11 +0000 (+0200) Subject: gnulib-tool.py: Implement --add-import --with-*-tests correctly. X-Git-Tag: v1.0~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0227d548c8ea6b356fa7a4ad6443e8398fa2e863;p=thirdparty%2Fgnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index db3c4591e2..8f5904281c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-04-12 Bruno Haible + + 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 gnulib-tool.py: Implement --add-import --avoid correctly. diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py index 4e1eeb1375..9a4f4bfe68 100644 --- a/pygnulib/GLConfig.py +++ b/pygnulib/GLConfig.py @@ -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 diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 210768bd68..d45cf6b3ba 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -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)