diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-08-31 22:00:04 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-08-31 22:00:04 +0000 |
commit | 4f8f01cee6b1cd29186d9c8dbfe9e98fa7595433 (patch) | |
tree | 807d2a4295fc2069b5f441e9d7fe083d1b29f083 /infrastructure/buildenv-testmain-template.cpp | |
parent | 7f0afeb139fa0a490e6cf2302ca3048a8ce3971e (diff) |
* infrastructure/buildenv-testmain-template.cpp
Record the file and line of first test failure, and print them
at the end of the test, useful for debugging when the first
failure has scrolled off screen (refs #3)
Diffstat (limited to 'infrastructure/buildenv-testmain-template.cpp')
-rw-r--r-- | infrastructure/buildenv-testmain-template.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index f95f01e6..c64c1fa5 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -41,6 +41,8 @@ int test(int argc, const char *argv[]); #endif int failures = 0; +int first_fail_line; +std::string first_fail_file; int filedes_open_at_beginning = -1; @@ -128,7 +130,10 @@ int main(int argc, const char *argv[]) } if(failures > 0) { - printf("FAILED: %d tests failed\n", failures); + printf("FAILED: %d tests failed (first at " + "%s:%d)\n", failures, + first_fail_file.c_str(), + first_fail_line); } else { |