blob: 181c7530fc5bee501974b58096ef0fdf18a01a4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
project(pki-common-test Java)
find_file(PKI_CERTSRV_JAR
NAMES
pki-certsrv.jar
PATHS
${JAVA_JAR_INSTALL_DIR}/pki
)
find_file(PKI_CMS_JAR
NAMES
pki-cms
PATHS
${JAVA_JAR_INSTALL_DIR}/pki
)
find_file(PKI_CMSCORE_JAR
NAMES
pki-cmscore
PATHS
${JAVA_JAR_INSTALL_DIR}/pki
)
find_file(PKI_CMSBUNDLE_JAR
NAMES
pki-cmsbundle
PATHS
${JAVA_JAR_INSTALL_DIR}/pki
)
# build pki-common-test
# TODO: build test only when the test is invoked
javac(pki-common-test-classes
SOURCES
com/netscape/certsrv/*.java
com/netscape/cmscore/*.java
CLASSPATH
${PKI_NSUTIL_JAR} ${PKI_CMSUTIL_JAR}
${PKI_CERTSRV_JAR} ${PKI_CMS_JAR} ${PKI_CMSCORE_JAR} ${PKI_CMSBUNDLE_JAR}
${LDAPJDK_JAR} ${SERVLET_JAR} ${VELOCITY_JAR} ${XALAN_JAR} ${XERCES_JAR}
${JSS_JAR} ${COMMONS_CODEC_JAR} ${SYMKEY_JAR} ${JUNIT_JAR}
${CMAKE_BINARY_DIR}/test/classes
OUTPUT_DIR
${CMAKE_BINARY_DIR}/test/classes
DEPENDS
pki-test-classes
pki-nsutil pki-cmsutil
pki-certsrv pki-cms pki-cmscore pki-cmsbundle
)
# create test target
# do not include xalan and xerces in class path
# TODO: create CMake function to find all JUnit test classes
add_junit_test(test-pki-common
CLASSPATH
${PKI_NSUTIL_JAR} ${PKI_CMSUTIL_JAR}
${PKI_CERTSRV_JAR} ${PKI_CMS_JAR} ${PKI_CMSCORE_JAR} ${PKI_CMSBUNDLE_JAR}
${LDAPJDK_JAR} ${SERVLET_JAR} ${VELOCITY_JAR}
${JSS_JAR} ${COMMONS_CODEC_JAR} ${SYMKEY_JAR} ${JUNIT_JAR}
${CMAKE_BINARY_DIR}/test/classes
TESTS
com.netscape.certsrv.authentication.AuthTokenTest
com.netscape.certsrv.request.AgentApprovalsTest
com.netscape.cmscore.dbs.CertRecordListTest
com.netscape.cmscore.dbs.DBRegistryTest
com.netscape.cmscore.request.ExtAttrDynMapperTest
com.netscape.cmscore.request.ExtDataHashtableTest
com.netscape.cmscore.request.RequestQueueTest
com.netscape.cmscore.request.RequestRecordTest
com.netscape.cmscore.request.RequestTest
REPORTS_DIR
reports
)
# include test into the main test
add_dependencies(test test-pki-common)
|