Changeset 2:d8ce06172629 in freeDiameter for freeDiameter
- Timestamp:
- Aug 31, 2009, 5:32:22 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- freeDiameter
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/CMakeLists.txt
r1 r2 18 18 TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS}) 19 19 20 # Save the list of files, if needed 21 SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE) 22 20 23 # The unary tests directory 21 24 OPTION(SKIP_TESTS "Skip compilation of the tests?" OFF) -
freeDiameter/tests/CMakeLists.txt
r1 r2 20 20 # Some parameters for the tests 21 21 22 # Add this flag to add some debug information in the tests themselves23 22 ADD_DEFINITIONS(-DTEST_DEBUG) 23 ADD_DEFINITIONS(-DTRACE_LEVEL=NONE) 24 24 25 25 INCLUDE_DIRECTORIES( ".." ) 26 INCLUDE_DIRECTORIES( "../../libfreeDiameter" ) 26 27 27 28 SET(TEST_COMMON_SRC "") … … 35 36 # ENDFOREACH(SRC_FILE) 36 37 38 FOREACH( SRC_FILE ${LFD_SRC}) 39 SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "../../libfreeDiameter/${SRC_FILE}") 40 ENDFOREACH(SRC_FILE) 41 37 42 # Create an archive with the daemon common files (all but main) 38 43 ADD_LIBRARY(fDcore STATIC ${TEST_COMMON_SRC}) … … 43 48 FOREACH( TEST ${TEST_LIST} ) 44 49 ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h) 45 TARGET_LINK_LIBRARIES(${TEST} libfreeDiameterfDcore ${FD_LIBS})50 TARGET_LINK_LIBRARIES(${TEST} fDcore ${FD_LIBS}) 46 51 ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST}) 47 52 ENDFOREACH( TEST ) -
freeDiameter/tests/testmesg.c
r1 r2 436 436 memset(&buf, 0, sizeof(buf)); /* Test that the OS value is really copied */ 437 437 CHECK( 0, fd_msg_update_length ( avpi ) ); 438 #if 1438 #if 0 439 439 fd_log_debug("AVP octet string, 'This\\0 is a b...'\n"); 440 440 fd_msg_dump_one(0, avpi); -
freeDiameter/tests/tests.h
r1 r2 52 52 #endif /* TEST_TIMEOUT */ 53 53 54 static int test_verbosity = 0;55 56 54 /* Standard includes */ 57 55 #include <getopt.h> … … 76 74 } 77 75 76 static int test_verbo = 0; 77 78 78 /* Define the standard check routines */ 79 79 #define CHECK( _val, _assert ){ \ 80 if (test_verbo sity > 0) {\80 if (test_verbo > 0) { \ 81 81 fprintf(stderr, \ 82 82 "%s:%-4d: CHECK( " #_assert " == "\ … … 111 111 switch (c) { 112 112 case 'd': /* Increase verbosity of debug messages. */ 113 test_verbo sity++;113 test_verbo++; 114 114 break; 115 115 116 case 'q': /* Decrease verbosity then remove debug messages. */117 test_verbo sity--;116 case 'q': /* Decrease verbosity. */ 117 test_verbo--; 118 118 break; 119 119 … … 126 126 } 127 127 } 128 fd_g_debug_lvl = (test_verbo > 0) ? (test_verbo - 1) : 0; 128 129 if (!no_timeout) 129 130 alarm(TEST_TIMEOUT);
Note: See TracChangeset
for help on using the changeset viewer.