From: José Fonseca <[email protected]>

Also return the exception code as the program return code, which matches
the normal behaviour of uncaught exceptions.

Currently I see several tests failing on Windows, but with no clue
(in stdout, stderr, or exit code) as to why.  This should help.

Trivial.  Only affects Windows.
---
 tests/util/piglit-util.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c
index 6fe146e..c9b72ca 100644
--- a/tests/util/piglit-util.c
+++ b/tests/util/piglit-util.c
@@ -307,9 +307,13 @@ exception_handler(PEXCEPTION_POINTERS pExceptionInfo)
                return EXCEPTION_CONTINUE_SEARCH;
        }
 
-       fprintf(stderr, "warning: uncaught exception 0x%08lx\n", 
pExceptionRecord->ExceptionCode);
+       fflush(stdout);
+       fprintf(stderr, "error: uncaught exception 0x%08lx\n",
+               pExceptionRecord->ExceptionCode);
+       fflush(stderr);
 
-       TerminateProcess(GetCurrentProcess(), EXIT_FAILURE);
+       TerminateProcess(GetCurrentProcess(),
+                        pExceptionRecord->ExceptionCode);
 
        return EXCEPTION_CONTINUE_SEARCH;
 }
-- 
1.9.1

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to