[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool.py: Fix --extract-tests-module with a test module.
From: |
Bruno Haible |
Subject: |
Re: gnulib-tool.py: Fix --extract-tests-module with a test module. |
Date: |
Mon, 01 Apr 2024 15:25:43 +0200 |
Collin Funk wrote:
> These two patches fix the last remaining test failures in the
> gnulib-tool test suite.
Thanks a lot! Both patches applied.
> The only other place this is used is
> GLModuleTable.transitive_closure() and it doesn't seem like this
> change breaks anything there.
Good.
> After this change, the test fails for the same reason as the other
> failing test:
>
> $ env GNULIB_TOOL_IMPL=py ./test-extract-tests-module-2.sh
> gnulib-tool: warning: file savewd-tests does not exist
> FAIL: gnulib-tool succeeded but printed warnings.
>
> $ env GNULIB_TOOL_IMPL=py ./test-extract-tests-module-3.sh
> gnulib-tool: warning: file string-tests-tests does not exist
> FAIL: gnulib-tool succeeded but printed warnings.
>
> When given "$module" gnulib-tool.sh looksup $module, applying any
> diff's in the process. Then it only verifies the "$module-tests"
> description exists. This differs from gnulib-tool.py which performs
> the lookup and patching process to both "$module" and "$module-tests".
> Consequently, errors and/or warnings occur when a test module is not
> found, as seen in those test cases.
>
> This diff fixes it:
>
> diff --git a/pygnulib/main.py b/pygnulib/main.py
> index 688ab249f3..55d635d074 100644
> --- a/pygnulib/main.py
> +++ b/pygnulib/main.py
> @@ -1268,9 +1268,8 @@ def main() -> None:
> modulesystem = classes.GLModuleSystem(config)
> for name in modules:
> module = modulesystem.find(name)
> - if module:
> - if module.getTestsModule():
> - print(module.getTestsName())
> + if module and modulesystem.exists(module.getTestsName()):
> + print(module.getTestsName())
I see: getTestsModule() tries to construct the GLModule object and prints
a warning if there is a problem, while exists(...) is silent.
Hooray!! All tests pass!!
Bruno
- gnulib-tool.py: Fix --extract-tests-module with a test module., Collin Funk, 2024/04/01
- Re: gnulib-tool.py: Fix --extract-tests-module with a test module.,
Bruno Haible <=
- Re: gnulib-tool.py: Fix --extract-tests-module with a test module., Collin Funk, 2024/04/01
- Re: packages tests, Bruno Haible, 2024/04/01
- Re: packages tests, Collin Funk, 2024/04/01
- gnulib-tool.py: Don't default to 'build-aux' for --auxdir., Collin Funk, 2024/04/01
- Re: gnulib-tool.py: Don't default to 'build-aux' for --auxdir., Bruno Haible, 2024/04/02
- Re: gnulib-tool.py: Don't default to 'build-aux' for --auxdir., Collin Funk, 2024/04/02