On 02/10/22 09:39, Niels Thykier wrote:
When the debhelper's testsuite is run in an environment where `LC_ALL` is not `C.UTF-8`, various warnings are printed and some tests fail (for example those of dh_installchangelogs).

The solution is probably to set `LC_ALL=C.UTF-8`, but where should it be set? In debian/rules? In the testsuite? In the single tests?

I was hoping it was simple to make Time::Piece generate timestamps in a specified locale, but I cannot find an option for doing that. So we may have to solve to forcing that test to run under LC_ALL when generating the changelog[1].

[1]: Ideally, we would have dh_installchangelog run under any locale in the tests and it should still work. But if it is non-trivially or just unwieldy, having the entire test run under LC_ALL=C.UTF-8 will suffice.


Control: tags -1 patch

Using `setlocale` seems to work. Here is a MR: <https://salsa.debian.org/debian/debhelper/-/merge_requests/91>.

But I wonder if it wouldn't be better to unconditionally run the whole testsuite under LC_ALL=C.UTF-8. Alternatively, if running under other LC_* values is supported, then the testsuite should actively test for that (like the repro testsuite does).

Regards,

--
Gioele Barabucci

Reply via email to