Error when running test suite

John Ralls jralls at
Mon Dec 2 11:39:36 EST 2013

On Dec 2, 2013, at 7:30 AM, Derek Atkins <warlord at MIT.EDU> wrote:

> John Ralls <jralls at> writes:
>>>> Geert,
>>>> Well, print out to stderr. There is no log. 
>>>> OK. This is the third time this has come up on the list. In this
>>>> particular case, it’s an easy change. r23451.
>>> Arguably the test shouldn't CRASH if the locales don't exist; it should
>>> at least fail gracefully, no?
>> OK, make the argument. Unit tests work by using g_assert, which
>> crashes the test. That's by design, to make debugging easy. A better
>> test-runner might trap the assert and close down a bit more
>> gracefully, but gtester isn't that test runner.
> There's a difference between a test failing and the environment being
> incorrect (e.g. due to a missing locale).  In this case it's a broken
> environment -- it's something easily correctable by someone running the
> tests so IMHO the failure should not be fatal and instead should tell
> the user about their broken environment.  It's not an issue that
> requires a developer to look at it (in which case a crash is arguably
> better, although personally I'd rather the crash be forced only while
> debugging the test rather than while running a put "make check").

Fair enough, though anything short of a hard failure is unlikely to be noticed in the spew of output from 'make check'. OTOH, most folks don't care whether GC works in all locales, only that it works in their locale. It would be a simple enough change to try setlocale for each test locale and then test only the ones that work, while emitting a warning that the others aren't being tested, similar to what we do with dbi backends.

John Ralls

More information about the gnucash-devel mailing list