# HG changeset patch # User Sebastien Decugis # Date 1281345608 -32400 # Node ID 907b00ae367994a438a1215f8c8fb8949dfe741b # Parent a186743b89a3e756fd7d8ff975447fc84a08923a Allow file-based debug in tests diff -r a186743b89a3 -r 907b00ae3679 freeDiameter/tests/tests.h --- 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; }