Imported Upstream version 1.0.0
[platform/upstream/nghttp2.git] / tests / Makefile.am
1 # nghttp2 - HTTP/2 C Library
2
3 # Copyright (c) 2012 Tatsuhiro Tsujikawa
4
5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
12
13 # The above copyright notice and this permission notice shall be
14 # included in all copies or substantial portions of the Software.
15
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 SUBDIRS = testdata
24
25 if HAVE_CUNIT
26
27 check_PROGRAMS = main
28
29 if ENABLE_FAILMALLOC
30 check_PROGRAMS += failmalloc
31 endif # ENABLE_FAILMALLOC
32
33 OBJECTS = main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c \
34         nghttp2_test_helper.c \
35         nghttp2_frame_test.c \
36         nghttp2_stream_test.c \
37         nghttp2_session_test.c \
38         nghttp2_hd_test.c \
39         nghttp2_npn_test.c \
40         nghttp2_helper_test.c \
41         nghttp2_buf_test.c
42
43 HFILES = nghttp2_pq_test.h nghttp2_map_test.h nghttp2_queue_test.h \
44         nghttp2_session_test.h \
45         nghttp2_frame_test.h nghttp2_stream_test.h nghttp2_hd_test.h \
46         nghttp2_npn_test.h nghttp2_helper_test.h \
47         nghttp2_test_helper.h \
48         nghttp2_buf_test.h
49
50 main_SOURCES = $(HFILES) $(OBJECTS)
51
52 main_LDADD = ${top_builddir}/lib/libnghttp2.la @CUNIT_LIBS@ @TESTLDADD@
53 main_LDFLAGS = -static
54
55 if ENABLE_FAILMALLOC
56 failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \
57         malloc_wrapper.c malloc_wrapper.h \
58         nghttp2_test_helper.c nghttp2_test_helper.h
59 failmalloc_LDADD = $(main_LDADD)
60 failmalloc_LDFLAGS = $(main_LDFLAGS)
61 endif # ENABLE_FAILMALLOC
62
63 AM_CFLAGS = $(WARNCFLAGS) \
64         -I${top_srcdir}/lib \
65         -I${top_srcdir}/lib/includes \
66         -I${top_builddir}/lib/includes \
67         @CUNIT_CFLAGS@ @DEFS@
68
69 TESTS = main
70
71 if ENABLE_FAILMALLOC
72 TESTS += failmalloc
73 endif # ENABLE_FAILMALLOC
74
75 if ENABLE_APP
76
77 # EXTRA_DIST = end_to_end.py
78 # TESTS += end_to_end.py
79
80 endif # ENABLE_APP
81
82 endif # HAVE_CUNIT