Mercurial > hg > freeDiameter
annotate tests/CMakeLists.txt @ 733:b2bc31410425 1.1.0-rc3
Cosmetics
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Tue, 01 Mar 2011 10:48:14 +0900 |
parents | 4ffbc9f1e922 |
children | 03bcd4870f44 |
rev | line source |
---|---|
0 | 1 # Test directory |
658
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
2 PROJECT("freeDiameter tests" C) |
0 | 3 |
4 # give the possibility to configure the timeout duration for the tests | |
733 | 5 OPTION(TEST_TIMEOUT "Timeout for the tests, in seconds (default: 120)?") |
0 | 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 | |
477
4e4ed23028ca
Add a simple test to verify ticket #12
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
316
diff
changeset
|
14 testsctp |
706
4ffbc9f1e922
Large UNTESTED commit with the following changes:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
672
diff
changeset
|
15 testostr |
0 | 16 testdict |
17 testmesg | |
10
c5c99c73c2bf
Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
18 testfifo |
3
ef303f1078ab
Progress; added session module; testsess to be completed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
2
diff
changeset
|
19 testsess |
7
e5af94b04946
Added dispatch module and tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
3
diff
changeset
|
20 testdisp |
29
5ba91682f0bc
Added a test for cnxctx (tbc) and fixed some bugs
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
10
diff
changeset
|
21 testcnx |
669
26482481d4ef
New test to check if there are linking problems with built extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
668
diff
changeset
|
22 testloadext |
0 | 23 ) |
24 | |
25 ############################# | |
26 # Some parameters for the tests | |
27 | |
28 ADD_DEFINITIONS(-DTEST_DEBUG) | |
2
d8ce06172629
Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
1
diff
changeset
|
29 ADD_DEFINITIONS(-DTRACE_LEVEL=NONE) |
669
26482481d4ef
New test to check if there are linking problems with built extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
668
diff
changeset
|
30 ADD_DEFINITIONS(-DBUILD_DIR="${CMAKE_BINARY_DIR}") |
0 | 31 |
658
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
32 INCLUDE_DIRECTORIES( "../libfdproto" ) |
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
33 INCLUDE_DIRECTORIES( "../libfdcore" ) |
667
1f7c7ce85db3
More cleanups in the CMakeLists files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
658
diff
changeset
|
34 INCLUDE_DIRECTORIES(${LFDCORE_INCLUDES}) |
0 | 35 |
316
aa8f41bca657
Fixed libraries dependencies
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
304
diff
changeset
|
36 |
672
877ed3fd4bcb
Cleaned link relations for tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
669
diff
changeset
|
37 SET(testcnx_ADDITIONAL_LIB ${CLOCK_GETTIME_LIBS}) |
877ed3fd4bcb
Cleaned link relations for tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
669
diff
changeset
|
38 SET(testfifo_ADDITIONAL_LIB ${CLOCK_GETTIME_LIBS}) |
877ed3fd4bcb
Cleaned link relations for tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
669
diff
changeset
|
39 SET(testsess_ADDITIONAL_LIB ${CLOCK_GETTIME_LIBS}) |
877ed3fd4bcb
Cleaned link relations for tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
669
diff
changeset
|
40 SET(testloadext_ADDITIONAL_LIB ${CMAKE_DL_LIBS}) |
877ed3fd4bcb
Cleaned link relations for tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
669
diff
changeset
|
41 |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
42 ############################## |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
43 # App_acct test |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
44 |
585
4d7872860080
Add test_app_acct when ALL_EXTENSIONS is specified
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
477
diff
changeset
|
45 IF(BUILD_APP_ACCT OR ALL_EXTENSIONS) |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
46 OPTION(TEST_APP_ACCT "Test app_acct extension? (Requires a configured database, see testappacct.c for details)" OFF) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
47 IF(TEST_APP_ACCT) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
48 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
49 OPTION(TEST_APP_ACCT_CONNINFO "The connection string to the database") |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
50 IF(TEST_APP_ACCT_CONNINFO) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
51 ADD_DEFINITIONS(-DTEST_CONNINFO="${TEST_APP_ACCT_CONNINFO}") |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
52 ENDIF(TEST_APP_ACCT_CONNINFO) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
53 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
54 SET(TEST_LIST ${TEST_LIST} testappacct) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
55 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
56 # Extension dependencies |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
57 FIND_PACKAGE(PostgreSQL REQUIRED) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
58 INCLUDE_DIRECTORIES(${POSTGRESQL_INCLUDE_DIR}) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
59 SET(testappacct_ADDITIONAL_LIB ${POSTGRESQL_LIBRARIES}) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
60 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
61 # List of source files, copied from the extension CMakeLists. |
658
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
62 BISON_FILE(../extensions/app_acct/acct_conf.y) |
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
63 FLEX_FILE(../extensions/app_acct/acct_conf.l) |
288
6bbbbc8040b9
Attempt to fix issue for FreeBSD
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
285
diff
changeset
|
64 #SET_SOURCE_FILES_PROPERTIES(lex.acct_conf.c acct_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") |
6bbbbc8040b9
Attempt to fix issue for FreeBSD
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
285
diff
changeset
|
65 |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
66 SET( APP_ACCT_SRC |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
67 app_acct.h |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
68 app_acct.c |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
69 acct_db.c |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
70 acct_records.c |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
71 ) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
72 SET( APP_ACCT_SRC_GEN |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
73 lex.acct_conf.c |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
74 acct_conf.tab.c |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
75 acct_conf.tab.h |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
76 ) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
77 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
78 # The extension headers |
658
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
79 INCLUDE_DIRECTORIES( "../extensions/app_acct" ) |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
80 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
81 SET(testappacct_ADDITIONAL "") |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
82 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
83 FOREACH( SRC_FILE ${APP_ACCT_SRC}) |
658
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
84 SET(testappacct_ADDITIONAL ${testappacct_ADDITIONAL} "../extensions/app_acct/${SRC_FILE}") |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
85 ENDFOREACH(SRC_FILE) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
86 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
87 FOREACH( SRC_FILE ${APP_ACCT_SRC_GEN}) |
658
f198d16fa7f4
Initial commit for 1.1.0:
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
585
diff
changeset
|
88 SET(testappacct_ADDITIONAL ${testappacct_ADDITIONAL} "${CMAKE_CURRENT_BINARY_DIR}/../extensions/app_acct/${SRC_FILE}") |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
89 ENDFOREACH(SRC_FILE) |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
90 |
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
91 ENDIF(TEST_APP_ACCT) |
585
4d7872860080
Add test_app_acct when ALL_EXTENSIONS is specified
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
477
diff
changeset
|
92 ENDIF(BUILD_APP_ACCT OR ALL_EXTENSIONS) |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
93 |
0 | 94 |
95 ############################# | |
96 # Compile each test | |
97 FOREACH( TEST ${TEST_LIST} ) | |
285
0daf6fc2b751
Added a test case for the app_acct extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
29
diff
changeset
|
98 ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h ${${TEST}_ADDITIONAL}) |
672
877ed3fd4bcb
Cleaned link relations for tests
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
669
diff
changeset
|
99 TARGET_LINK_LIBRARIES(${TEST} libfdproto libfdcore ${GNUTLS_LIBRARIES} ${GCRYPT_LIBRARY} ${${TEST}_ADDITIONAL_LIB}) |
0 | 100 ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST}) |
101 ENDFOREACH( TEST ) | |
304
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
288
diff
changeset
|
102 |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
288
diff
changeset
|
103 |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
288
diff
changeset
|
104 #### |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
288
diff
changeset
|
105 ## INSTALL section ## |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
288
diff
changeset
|
106 |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
288
diff
changeset
|
107 # we do not install the tests |