Mercurial > hg > freeDiameter
annotate freeDiameter/tests/CMakeLists.txt @ 8:3e143f047f78
Backup for the week-end
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 18 Sep 2009 18:54:07 +0900 |
parents | e5af94b04946 |
children | c5c99c73c2bf |
rev | line source |
---|---|
0 | 1 # Test directory |
1
bafb831ba688
Fix names to proper case for freeDiameter
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
0
diff
changeset
|
2 PROJECT("libfreeDiameter tests" C) |
0 | 3 |
4 # give the possibility to configure the timeout duration for the tests | |
5 OPTION(TEST_TIMEOUT "Timeout for the tests, in seconds (default: 5)?") | |
6 IF(TEST_TIMEOUT) | |
7 ADD_DEFINITIONS(-DTEST_TIMEOUT=${TEST_TIMEOUT}) | |
8 ENDIF(TEST_TIMEOUT) | |
9 | |
10 | |
11 ############################# | |
12 # List the test cases | |
13 SET(TEST_LIST | |
3
ef303f1078ab
Progress; added session module; testsess to be completed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
2
diff
changeset
|
14 testlist |
0 | 15 testdict |
16 testmesg | |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
7
diff
changeset
|
17 testqueues |
3
ef303f1078ab
Progress; added session module; testsess to be completed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
2
diff
changeset
|
18 testsess |
7
e5af94b04946
Added dispatch module and tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
3
diff
changeset
|
19 testdisp |
0 | 20 ) |
21 | |
22 ############################# | |
23 # Some parameters for the tests | |
24 | |
25 ADD_DEFINITIONS(-DTEST_DEBUG) | |
2
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
26 ADD_DEFINITIONS(-DTRACE_LEVEL=NONE) |
0 | 27 |
28 INCLUDE_DIRECTORIES( ".." ) | |
2
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
29 INCLUDE_DIRECTORIES( "../../libfreeDiameter" ) |
0 | 30 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
7
diff
changeset
|
31 BISON_FILE(../fdd.y) |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
7
diff
changeset
|
32 FLEX_FILE(../fdd.l) |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
7
diff
changeset
|
33 |
0 | 34 SET(TEST_COMMON_SRC "") |
35 | |
36 FOREACH( SRC_FILE ${FD_COMMON_SRC}) | |
37 SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "../${SRC_FILE}") | |
38 ENDFOREACH(SRC_FILE) | |
39 | |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
7
diff
changeset
|
40 FOREACH( SRC_FILE ${FD_COMMON_GEN_SRC}) |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
7
diff
changeset
|
41 SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "${CMAKE_CURRENT_BINARY_DIR}/../${SRC_FILE}") |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
7
diff
changeset
|
42 ENDFOREACH(SRC_FILE) |
0 | 43 |
2
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
44 FOREACH( SRC_FILE ${LFD_SRC}) |
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
45 SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "../../libfreeDiameter/${SRC_FILE}") |
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
46 ENDFOREACH(SRC_FILE) |
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
47 |
1
bafb831ba688
Fix names to proper case for freeDiameter
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
0
diff
changeset
|
48 # Create an archive with the daemon common files (all but main) |
bafb831ba688
Fix names to proper case for freeDiameter
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
0
diff
changeset
|
49 ADD_LIBRARY(fDcore STATIC ${TEST_COMMON_SRC}) |
0 | 50 |
51 | |
52 ############################# | |
53 # Compile each test | |
54 FOREACH( TEST ${TEST_LIST} ) | |
55 ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h) | |
2
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
56 TARGET_LINK_LIBRARIES(${TEST} fDcore ${FD_LIBS}) |
0 | 57 ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST}) |
58 ENDFOREACH( TEST ) |