aboutsummaryrefslogtreecommitdiff
path: root/src/testzzuf/Makefile.am
blob: 5aa7cfa7c9be289c0ef9705135e9a2742fb6ddb6 (plain) (blame)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# This Makefile.am is in the public domain

SUBDIRS  = .

# ZZUF_SEED can be redefined to use other initial seeds
# for extended testing. E.g.,
#  make ZZUF_SEED=1234 check
ZZUF_SEED = 0

# Additional flags for zzuf
ZZUF_FLAGS =

# Additional flags for socat (if socat is used)
SOCAT_FLAGS =

if FORCE_USE_ZZUF_SOCAT
TEST_RUNNER_SCRIPT = zzuf_socat_test_runner.sh
else
TEST_RUNNER_SCRIPT = zzuf_test_runner.sh
endif

AM_CPPFLAGS = \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/microhttpd \
  -DMHD_CPU_COUNT=$(CPU_COUNT) \
  $(CPPFLAGS_ac) $(LIBCURL_CPPFLAGS)

AM_CFLAGS = $(CFLAGS_ac)

AM_LDFLAGS = $(LDFLAGS_ac)

AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT_ac) \
  ZZUF="$(ZZUF)" ; export ZZUF ; \
  ZZUF_SEED="$(ZZUF_SEED)" ; export ZZUF_SEED ; \
  ZZUF_FLAGS="$(ZZUF_FLAGS)" ; export ZZUF_FLAGS ; \
  SOCAT="$(SOCAT)" ; export SOCAT ; \
  SOCAT_FLAGS="$(SOCAT_FLAGS)" ; export SOCAT_FLAGS ;

if USE_COVERAGE
  AM_CFLAGS += -fprofile-arcs -ftest-coverage
endif

LDADD = \
  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
  @LIBCURL@

$(top_builddir)/src/microhttpd/libmicrohttpd.la: $(top_builddir)/src/microhttpd/Makefile
	@echo ' cd $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la'; \
	$(am__cd) $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la

check_PROGRAMS = \
  test_get \
  test_get_chunked \
  test_post \
  test_post_form \
  test_put \
  test_put_chunked \
  test_put_large \
  test_get_long_uri \
  test_get_long_header \
  test_get_close \
  test_get_chunked_close \
  test_post_close \
  test_post_form_close \
  test_put_close \
  test_put_chunked_close \
  test_put_large_close \
  test_get_long_uri_close \
  test_get_long_header_close \
  test_get10 \
  test_get_chunked10 \
  test_post10 \
  test_post_form10 \
  test_put10 \
  test_put_large10 \
  test_get_long_uri10 \
  test_get_long_header10

.NOTPARALLEL:


TESTS = $(check_PROGRAMS)

dist_check_SCRIPTS = zzuf_test_runner.sh zzuf_socat_test_runner.sh

LOG_COMPILER = @SHELL@ "$(srcdir)/$(TEST_RUNNER_SCRIPT)"

if VHEAVY_TESTS
check_SCRIPTS = warn_vheavy_use

.PHONY: warn_vheavy_use
endif

warn_vheavy_use:
	@echo "NOTICE" ; \
	echo "NOTICE: Full heavy tests are enabled. Each test may take up to several minutes to complete." ; \
	echo "NOTICE"


tests_common_sources = mhd_debug_funcs.h mhd_debug_funcs.c

test_get_SOURCES = \
  test_get.c $(tests_common_sources)

test_get_chunked_SOURCES = $(test_get_SOURCES)

test_post_SOURCES = $(test_get_SOURCES)

test_post_form_SOURCES = $(test_get_SOURCES)

test_put_SOURCES = $(test_get_SOURCES)

test_put_chunked_SOURCES = $(test_get_SOURCES)

test_put_large_SOURCES = $(test_get_SOURCES)

test_get_long_uri_SOURCES = $(test_get_SOURCES)

test_get_long_header_SOURCES = $(test_get_SOURCES)

test_get_close_SOURCES = $(test_get_SOURCES)

test_get_chunked_close_SOURCES = $(test_get_chunked_SOURCES)

test_post_close_SOURCES = $(test_post_SOURCES)

test_post_form_close_SOURCES = $(test_post_form_SOURCES)

test_put_close_SOURCES = $(test_put_SOURCES)

test_put_chunked_close_SOURCES = $(test_put_chunked_SOURCES)

test_put_large_close_SOURCES = $(test_put_large_SOURCES)

test_get_long_uri_close_SOURCES = $(test_get_long_uri_SOURCES)

test_get_long_header_close_SOURCES = $(test_get_long_header_SOURCES)

test_get10_SOURCES = $(test_get_SOURCES)

test_get_chunked10_SOURCES = $(test_get_chunked_SOURCES)

test_post10_SOURCES = $(test_post_SOURCES)

test_post_form10_SOURCES = $(test_post_form_SOURCES)

test_put10_SOURCES = $(test_put_SOURCES)

test_put_large10_SOURCES = $(test_put_large_SOURCES)

test_get_long_uri10_SOURCES = $(test_get_long_uri_SOURCES)

test_get_long_header10_SOURCES = $(test_get_long_header_SOURCES)