unit-tests: Initialize backtracing before printing any backtraces
authorMartin Willi <martin@revosec.ch>
Wed, 16 Oct 2013 10:24:21 +0000 (12:24 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 6 Nov 2013 09:31:00 +0000 (10:31 +0100)
src/libstrongswan/tests/test_runner.c

index a46007a..b6087a8 100644 (file)
@@ -311,6 +311,8 @@ static void print_failures(array_t *failures)
 {
        failure_t failure;
 
+       backtrace_init();
+
        while (array_remove(failures, 0, &failure))
        {
                fprintf(stderr, "      %sFailure in '%s': %s (",
@@ -326,6 +328,8 @@ static void print_failures(array_t *failures)
                        failure.bt->destroy(failure.bt);
                }
        }
+
+       backtrace_deinit();
 }
 
 /**