[or-cvs] make "make test" exit(1) if a test fails.

Nick Mathewson nickm at seul.org
Mon Mar 1 06:45:34 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv32012/src/or

Modified Files:
	test.c 
Log Message:
make 'make test' exit(1) if a test fails.



Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- test.c	29 Feb 2004 00:15:20 -0000	1.60
+++ test.c	1 Mar 2004 06:45:32 -0000	1.61
@@ -15,6 +15,8 @@
 #include "or.h"
 #include "../common/test.h"
 
+int have_failed = 0;
+
 void
 dump_hex(char *s, int len)
 {
@@ -715,7 +717,11 @@
   puts("\n========================= Directory Formats ===============");
   test_dir_format();
   puts("");
-  return 0;
+
+  if (have_failed)
+    return 1;
+  else
+    return 0;
 }
 
 /*



More information about the tor-commits mailing list