changeset 480:907b00ae3679

Allow file-based debug in tests
author Sebastien Decugis <sdecugis@nict.go.jp>
date Mon, 09 Aug 2010 18:20:08 +0900
parents a186743b89a3
children b1e96cfc093a
files freeDiameter/tests/tests.h
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/freeDiameter/tests/tests.h	Mon Aug 09 18:13:50 2010 +0900
+++ b/freeDiameter/tests/tests.h	Mon Aug 09 18:20:08 2010 +0900
@@ -126,7 +126,7 @@
 static inline void parse_cmdline(int argc, char * argv[]) {
 	int c;
 	int no_timeout = 0;
-	while ((c = getopt (argc, argv, "dqnf:")) != -1) {
+	while ((c = getopt (argc, argv, "dqnf:F:")) != -1) {
 		switch (c) {
 			case 'd':	/* Increase verbosity of debug messages.  */
 				test_verbo++;
@@ -148,6 +148,14 @@
 				#endif /* DEBUG */
 				break;
 				
+			case 'F':	/* Full debug for the functions in file with this name.  */
+				#ifdef DEBUG
+				fd_debug_one_file = optarg;
+				#else /* DEBUG */
+				TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature");
+				#endif /* DEBUG */
+				break;
+				
 			default:	/* bug: option not considered.  */
 				return;
 		}
"Welcome to our mercurial repository"