Imported Upstream version 1.0.10
[platform/upstream/lksctp-tools.git] / src / func_tests / Makefile.am
1 # Include these two in all the Makefile.am's!!!
2 include $(top_srcdir)/Makefile.vars
3 include $(top_srcdir)/Makefile.rules
4
5 include $(top_srcdir)/Makefile.dirs
6
7 # General compilation flags
8 INCLUDES = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib 
9 AM_CFLAGS = -g -Wall -Wstrict-prototypes -Wimplicit-function-declaration
10 AM_LDFLAGS = -lpthread
11 LDADD = $(top_builddir)/src/testlib/libsctputil.la \
12         $(top_builddir)/src/lib/libsctp.la
13
14 V6FLAGS = -DCONFIG_IPV6=1 -DTEST_V6=1 ${DEFS} ${INCLUDES} ${CFLAGS}
15
16 # Test programs and libraries to build
17 PASSING_KERN_TESTS = \
18         test_assoc_abort \
19         test_assoc_shutdown \
20         test_autoclose \
21         test_basic \
22         test_fragments \
23         test_inaddr_any \
24         test_peeloff \
25         test_sockopt \
26         test_connect \
27         test_connectx \
28         test_recvmsg \
29         test_timetolive \
30         test_sctp_sendrecvmsg \
31         test_getname \
32         test_tcp_style\
33         test_1_to_1_socket_bind_listen \
34         test_1_to_1_accept_close \
35         test_1_to_1_connect \
36         test_1_to_1_connectx \
37         test_1_to_1_send \
38         test_1_to_1_sendto \
39         test_1_to_1_sendmsg \
40         test_1_to_1_recvfrom \
41         test_1_to_1_recvmsg \
42         test_1_to_1_shutdown \
43         test_1_to_1_sockopt \
44         test_1_to_1_addrs \
45         test_1_to_1_nonblock \
46         test_1_to_1_rtoinfo \
47         test_1_to_1_events \
48         test_1_to_1_threads \
49         test_1_to_1_initmsg_connect
50
51 PASSING_V6_KERN_TESTS = \
52         test_basic_v6 \
53         test_sockopt_v6 \
54         test_fragments_v6 \
55         test_inaddr_any_v6 \
56         test_peeloff_v6 \
57         test_timetolive_v6 \
58         test_sctp_sendrecvmsg_v6 \
59         test_getname_v6 \
60         test_tcp_style_v6
61
62 noinst_PROGRAMS = ${PASSING_KERN_TESTS} ${PASSING_V6_KERN_TESTS}
63
64 $(top_builddir)/src/lib/libsctp.la:
65         make -C $(top_builddir)/src/lib libsctp.la
66
67 $(top_builddir)/src/testlib/libsctputil.la:
68         make -C $(top_builddir)/src/testlib libsctputil.la
69
70 # These are tests for live kernels which pass.
71 v4test: ${PASSING_KERN_TESTS}
72         @for a in $^;                           \
73         do                                      \
74                 echo "./$$a";                   \
75                 if ./$$a;                       \
76                 then                            \
77                         echo "$$a passes";      \
78                         echo "";                \
79                 else                            \
80                         echo "$$a fails";       \
81                         exit 1;                 \
82                 fi;                             \
83                 sleep 1;                        \
84         done
85         @echo "Hoody hoo!"
86
87 # These are tests for live kernels which pass.
88 v6test: ${PASSING_V6_KERN_TESTS}
89         @for a in $^;                           \
90         do                                      \
91                 echo "./$$a";                   \
92                 if ./$$a;                       \
93                 then                            \
94                         echo "$$a passes";      \
95                         echo "";                \
96                 else                            \
97                         echo "$$a fails";       \
98                         exit 1;                 \
99                 fi;                             \
100                 sleep 1;                        \
101         done
102         @echo "Hoody hoo!"
103
104 # Specifying the sources
105 test_assoc_abort_SOURCES = test_assoc_abort.c 
106 test_assoc_shutdown_SOURCES = test_assoc_shutdown.c 
107 test_autoclose_SOURCES = test_autoclose.c 
108 test_basic_SOURCES = test_basic.c 
109 test_fragments_SOURCES = test_fragments.c 
110 test_inaddr_any_SOURCES = test_inaddr_any.c 
111 test_peeloff_SOURCES = test_peeloff.c 
112 test_sockopt_SOURCES = test_sockopt.c 
113 test_connect_SOURCES = test_connect.c 
114 test_connectx_SOURCES = test_connectx.c 
115 test_recvmsg_SOURCES = test_recvmsg.c 
116 test_timetolive_SOURCES = test_timetolive.c
117 test_sctp_sendrecvmsg_SOURCES = test_sctp_sendrecvmsg.c
118 test_getname_SOURCES = test_getname.c 
119 test_tcp_style_SOURCES = test_tcp_style.c 
120
121 test_1_to_1_socket_bind_listen_SOURCES = test_1_to_1_socket_bind_listen.c
122 test_1_to_1_accept_close_SOURCES = test_1_to_1_accept_close.c
123 test_1_to_1_connect_SOURCES = test_1_to_1_connect.c
124 test_1_to_1_connectx_SOURCES = test_1_to_1_connectx.c
125 test_1_to_1_send_SOURCES = test_1_to_1_send.c
126 test_1_to_1_sendto_SOURCES = test_1_to_1_sendto.c
127 test_1_to_1_sendmsg_SOURCES = test_1_to_1_sendmsg.c
128 test_1_to_1_recvfrom_SOURCES = test_1_to_1_recvfrom.c
129 test_1_to_1_recvmsg_SOURCES = test_1_to_1_recvmsg.c
130 test_1_to_1_shutdown_SOURCES = test_1_to_1_shutdown.c
131 test_1_to_1_sockopt_SOURCES = test_1_to_1_sockopt.c
132 test_1_to_1_addrs_SOURCES = test_1_to_1_addrs.c
133 test_1_to_1_nonblock_SOURCES = test_1_to_1_nonblock.c
134 test_1_to_1_rtoinfo_SOURCES = test_1_to_1_rtoinfo.c
135 test_1_to_1_events_SOURCES = test_1_to_1_events.c
136 test_1_to_1_threads_SOURCES = test_1_to_1_threads.c
137 test_1_to_1_initmsg_connect_SOURCES = test_1_to_1_initmsg_connect.c
138
139 #
140 # Specifying objects rules for "v6test"
141 #
142 test_basic_v6_SOURCES = test_basic.c
143 test_basic_v6_CFLAGS = ${V6FLAGS}
144
145 test_sockopt_v6_SOURCES = test_sockopt.c
146 test_sockopt_v6_CFLAGS = ${V6FLAGS}
147
148 test_fragments_v6_SOURCES = test_fragments.c
149 test_fragments_v6_CFLAGS = ${V6FLAGS}
150
151 test_inaddr_any_v6_SOURCES = test_inaddr_any.c
152 test_inaddr_any_v6_CFLAGS = ${V6FLAGS}
153
154 test_peeloff_v6_SOURCES = test_peeloff.c
155 test_peeloff_v6_CFLAGS = ${V6FLAGS}
156
157 test_timetolive_v6_SOURCES = test_timetolive.c
158 test_timetolive_v6_CFLAGS = ${V6FLAGS}
159
160 test_sctp_sendrecvmsg_v6_SOURCES = test_sctp_sendrecvmsg.c
161 test_sctp_sendrecvmsg_v6_CFLAGS = ${V6FLAGS}
162
163 test_getname_v6_SOURCES = test_getname.c
164 test_getname_v6_CFLAGS = ${V6FLAGS}
165
166 test_tcp_style_v6_SOURCES = test_tcp_style.c
167 test_tcp_style_v6_CFLAGS = ${V6FLAGS}