Navigation


Changeset 2:d8ce06172629 in freeDiameter for freeDiameter/tests/tests.h


Ignore:
Timestamp:
Aug 31, 2009, 5:32:22 PM (15 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added a global debug level var

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/tests/tests.h

    r1 r2  
    5252#endif /* TEST_TIMEOUT */
    5353
    54 static int test_verbosity = 0;
    55 
    5654/* Standard includes */
    5755#include <getopt.h>
     
    7674}
    7775
     76static int test_verbo = 0;
     77
    7878/* Define the standard check routines */
    7979#define CHECK( _val, _assert ){                         \
    80         if (test_verbosity > 0) {                       \
     80        if (test_verbo > 0) {                           \
    8181                fprintf(stderr,                         \
    8282                        "%s:%-4d: CHECK( " #_assert " == "\
     
    111111                switch (c) {
    112112                        case 'd':       /* Increase verbosity of debug messages.  */
    113                                 test_verbosity++;
     113                                test_verbo++;
    114114                                break;
    115115                               
    116                         case 'q':       /* Decrease verbosity then remove debug messages.  */
    117                                 test_verbosity--;
     116                        case 'q':       /* Decrease verbosity.  */
     117                                test_verbo--;
    118118                                break;
    119119                       
     
    126126                }
    127127        }
     128        fd_g_debug_lvl = (test_verbo > 0) ? (test_verbo - 1) : 0;
    128129        if (!no_timeout)
    129130                alarm(TEST_TIMEOUT);
Note: See TracChangeset for help on using the changeset viewer.