aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/finalcv.c
diff options
context:
space:
mode:
authorGareth Rees2013-03-07 13:13:32 +0000
committerGareth Rees2013-03-07 13:13:32 +0000
commit8dc0d72a8d71bffb30e79c0fcbd143c66a68be28 (patch)
treebf55f97622c46af70e9221ab8d5abab0babf1727 /mps/code/finalcv.c
parentd28698af08e8cb124061575b62c0bac1971b645c (diff)
downloademacs-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/finalcv.c')
-rw-r--r--mps/code/finalcv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mps/code/finalcv.c b/mps/code/finalcv.c
index 79a38dbbfb3..8380363350b 100644
--- a/mps/code/finalcv.c
+++ b/mps/code/finalcv.c
@@ -1,7 +1,7 @@
1/* finalcv.c: FINALIZATION COVERAGE TEST 1/* finalcv.c: FINALIZATION COVERAGE 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
@@ -210,7 +210,7 @@ static void *test(void *arg, size_t s)
210} 210}
211 211
212 212
213int main(int argc, char **argv) 213int main(int argc, char *argv[])
214{ 214{
215 mps_arena_t arena; 215 mps_arena_t arena;
216 mps_thr_t thread; 216 mps_thr_t thread;
@@ -225,15 +225,14 @@ int main(int argc, char **argv)
225 mps_thread_dereg(thread); 225 mps_thread_dereg(thread);
226 mps_arena_destroy(arena); 226 mps_arena_destroy(arena);
227 227
228 fflush(stdout); /* synchronize */ 228 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
229 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
230 return 0; 229 return 0;
231} 230}
232 231
233 232
234/* C. COPYRIGHT AND LICENSE 233/* C. COPYRIGHT AND LICENSE
235 * 234 *
236 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 235 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
237 * All rights reserved. This is an open source license. Contact 236 * All rights reserved. This is an open source license. Contact
238 * Ravenbrook for commercial licensing options. 237 * Ravenbrook for commercial licensing options.
239 * 238 *