g10: Improve portability of the new test driver.
* g10/test.c: Include stdio.h and stdlib.h. (verbose): New. (print_results): Rename to exit_tests. (main): Remove atexit and call exit_tests. Set verbose. (ASSERT, ABORT): Call exit_tests instead of exit.
Calling exit from an exit handler is undefined behaviour. It works on
Linux but other systems will hit an endless loop. That is indeed
unfortunate but we can't do anything about it. Calling _exit() would
be possible but that may lead to other problems. Thus we change to
call a custom exit function :-(.
Using "make check verbose=1" is supported by tests/openpgp and thus
we add the same mechanism here.
- Signed-off-by: Werner Koch <wk@gnupg.org>