diff options
| author | Gareth Rees | 2013-03-07 13:13:32 +0000 |
|---|---|---|
| committer | Gareth Rees | 2013-03-07 13:13:32 +0000 |
| commit | 8dc0d72a8d71bffb30e79c0fcbd143c66a68be28 (patch) | |
| tree | bf55f97622c46af70e9221ab8d5abab0babf1727 /mps/code/finaltest.c | |
| parent | d28698af08e8cb124061575b62c0bac1971b645c (diff) | |
| download | emacs-8dc0d72a8d71bffb30e79c0fcbd143c66a68be28.tar.gz emacs-8dc0d72a8d71bffb30e79c0fcbd143c66a68be28.zip | |
Improve the usability of the test suite:
1. "make test" now reports the name of the test case before running it, so that when you look back through the test output you can see which test case failed.
2. "make test" now collects the standard output from all the tests to a log file in /tmp, so that this does not clutter the user's terminal, and so that nothing is lost if the output exceeds the terminal's scrollback.
3. Each test case now prints a success message ("Conclusion: Failed to find any defects.") to standard output (not standard error) so that these messages do not clutter up the terminal when running "make test".
4. Each test case now uses its result code (not the printed message) to indicate whether it succeeded or failed.
5. More of the diagnostic messages from the test cases now start by printing argv[0] so that it is easier to tell which test case was running.
Copied from Perforce
Change: 181071
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/finaltest.c')
| -rw-r--r-- | mps/code/finaltest.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mps/code/finaltest.c b/mps/code/finaltest.c index 069a737d708..53cb093cf15 100644 --- a/mps/code/finaltest.c +++ b/mps/code/finaltest.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* finaltest.c: LARGE-SCALE FINALIZATION TEST | 1 | /* finaltest.c: LARGE-SCALE FINALIZATION TEST |
| 2 | * | 2 | * |
| 3 | * $Id$ | 3 | * $Id$ |
| 4 | * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. | 4 | * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. |
| 5 | * Portions copyright (C) 2002 Global Graphics Software. | 5 | * Portions copyright (C) 2002 Global Graphics Software. |
| 6 | * | 6 | * |
| 7 | * DESIGN | 7 | * DESIGN |
| @@ -239,7 +239,7 @@ static void *test(void *arg, size_t s) | |||
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | 241 | ||
| 242 | int main(void) | 242 | int main(int argc, char *argv[]) |
| 243 | { | 243 | { |
| 244 | mps_arena_t arena; | 244 | mps_arena_t arena; |
| 245 | mps_thr_t thread; | 245 | mps_thr_t thread; |
| @@ -252,14 +252,14 @@ int main(void) | |||
| 252 | mps_thread_dereg(thread); | 252 | mps_thread_dereg(thread); |
| 253 | mps_arena_destroy(arena); | 253 | mps_arena_destroy(arena); |
| 254 | 254 | ||
| 255 | fflush(stdout); /* synchronize */ | 255 | printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); |
| 256 | return 0; | 256 | return 0; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | 259 | ||
| 260 | /* C. COPYRIGHT AND LICENSE | 260 | /* C. COPYRIGHT AND LICENSE |
| 261 | * | 261 | * |
| 262 | * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. | 262 | * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>. |
| 263 | * All rights reserved. This is an open source license. Contact | 263 | * All rights reserved. This is an open source license. Contact |
| 264 | * Ravenbrook for commercial licensing options. | 264 | * Ravenbrook for commercial licensing options. |
| 265 | * | 265 | * |