Execute the teardown function after a test failed
@toabctl
Submitted by Thomas Bechtold Link to original bug (#671765)
Description
usecase:
i need to run an external program for every testcase so i use the setup/teardown functions to g_spawn_async/kill the process. But when i use the g_assert_XXX() functions inside the testcase and the assertion failed, the program exit without executing the teardown function. Then the process is still running.
Maybe it's possible to add some g_test_assert_XXX() functions which a wrappers for the g_assert() functions and these functions execute the teardown before the g_assert is called. i'm not sure if this is a good idea. maybe there are better solutions?