92c816fd8439bbc39297591ef4b3994b2b293876
[NetworkManager.git] / libnm-core / tests / Makefile.am
1 include $(GLIB_MAKEFILE)
2
3 GLIB_GENERATED = nm-core-tests-enum-types.h nm-core-tests-enum-types.c
4 nm_core_tests_enum_types_sources = test-general-enums.h
5 GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
6 GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
7
8 BUILT_SOURCES = $(GLIB_GENERATED)
9
10 if ENABLE_TESTS
11
12 certsdir = $(srcdir)/certs
13
14 AM_CPPFLAGS = \
15         -I${top_srcdir}/shared \
16         -I${top_builddir}/shared \
17         -I$(top_srcdir)/libnm-core \
18         -I$(top_builddir)/libnm-core \
19         -DNETWORKMANAGER_COMPILATION \
20         -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
21         $(GLIB_CFLAGS) \
22         -DTEST_CERT_DIR=\"$(certsdir)\"
23
24 noinst_PROGRAMS =               \
25         test-compare            \
26         test-crypto             \
27         test-general            \
28         test-keyfile            \
29         test-secrets            \
30         test-setting-8021x      \
31         test-setting-dcb        \
32         test-settings-defaults
33
34 LDADD = \
35         $(top_builddir)/libnm-core/libnm-core.la \
36         $(GLIB_LIBS)
37
38 @VALGRIND_RULES@
39 TESTS = $(noinst_PROGRAMS)
40
41 test_general_SOURCES = \
42         test-general.c \
43         test-general-enums.h \
44         nm-core-tests-enum-types.c \
45         nm-core-tests-enum-types.h
46
47 endif
48
49 # test-cert.p12 created with:
50 #
51 # openssl pkcs12 -export \
52 #       -in test_key_and_cert.pem \
53 #       -inkey test_key_and_cert.pem \
54 #       -certfile test_ca_cert.pem \
55 #       -name "test-pkcs12" \
56 #       -out test-cert.p12
57
58 EXTRA_DIST =                            \
59         certs/ca-no-ending-newline.pem      \
60         certs/pkcs8-decrypted.der           \
61         certs/pkcs8-enc-key.pem             \
62         certs/pkcs8-noenc-key.pem           \
63         certs/test2_ca_cert.pem             \
64         certs/test2-cert.p12                \
65         certs/test2_key_and_cert.pem        \
66         certs/test-aes-key.pem              \
67         certs/test_ca_cert.der              \
68         certs/test_ca_cert.pem              \
69         certs/test-ca-cert.pem              \
70         certs/test-cert.p12                 \
71         certs/test_key_and_cert.pem         \
72         certs/test-key-and-cert.pem         \
73         certs/test-key-only-decrypted.der   \
74         certs/test-key-only-decrypted.pem   \
75         certs/test-key-only.pem
76