diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-11-14 15:13:33 +0100 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-11-14 15:13:33 +0100 |
commit | 277b7efe493887081ce1dafd91199d0ee9f676c9 (patch) | |
tree | 8d7cae5b8b8431b3734197d3dfa3458fc3cbd057 | |
parent | 3587d0c1c740997a8b187c3d33e5c3d5860f05c7 (diff) | |
download | libgit2-277b7efe493887081ce1dafd91199d0ee9f676c9.tar.gz |
Use a custom error trace output in the old test suite
-rwxr-xr-x | tests/test_lib.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_lib.c b/tests/test_lib.c index 620d7ceca..e67ad347a 100755 --- a/tests/test_lib.c +++ b/tests/test_lib.c @@ -152,6 +152,14 @@ void git_testsuite_add(git_testsuite *ts, git_testfunc test) ts->list[ts->count++] = create_test(test); } +static void print_trace(git_error *error) +{ + git_error *err; + + for (err = error; err; err = err->child) + printf("\t%s:%u %s\n", err->file, err->line, err->msg); +} + static void print_details(git_testsuite *ts) { int i; @@ -172,7 +180,7 @@ static void print_details(git_testsuite *ts) if (tc->error_message) printf("\tError: %s\n", tc->error_message); fprintf(stderr, "\tError stack trace:\n"); - git_error_print_stack(tc->error_stack); + print_trace(tc->error_stack); } } } |