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 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
SUBDIRS = cache-testsuite
# Tests
AUTOMAKE_OPTIONS = foreign
# Headers in 'tests' are used by the arrayT unit tests.
AM_CPPFLAGS = -I$(top_srcdir)/GNU -I$(top_srcdir) -I$(top_srcdir)/tests $(CURL_CFLAGS) $(XML2_CFLAGS)
AM_LDADD = $(XML2_LIBS)
AM_CXXFLAGS =
# CXXFLAGS =
if COMPILER_IS_GCC
AM_CXXFLAGS += -Wall -W -Wcast-align
endif
if CPPUNIT
AM_CPPFLAGS += $(CPPUNIT_CFLAGS)
AM_LDADD += $(CPPUNIT_LIBS)
endif
CXXFLAGS_DEBUG = -g3 -O0 -Wall -Wcast-align
if USE_VALGRIND
TESTS_ENVIRONMENT=valgrind --quiet --trace-children=yes --error-exitcode=1 \
--leak-check=yes --dsymutil=yes --suppressions=valgrind_suppressions.txt
# skip using --log-file="valgrind-%p.log" because it always generates files
# Might also drop --dsymutil=yes because it can take a long time to run.
endif
if BUILD_DEVELOPER
AM_CXXFLAGS += $(CXXFLAGS_DEBUG)
endif
# This determines what gets built by make check
check_PROGRAMS = $(UNIT_TESTS)
# This determines what gets run by 'make check.'
TESTS = $(UNIT_TESTS)
noinst_HEADERS = test_config.h
DIRS_EXTRA = das-testsuite dds-testsuite ddx-testsuite \
rcreader-testsuite server-testsuite cgi-util-tests D4-xml \
chunked-io D4-marshaller D4-type-testsuite
EXTRA_DIST = $(DIRS_EXTRA) testFile.cc testFile.h test_config.h.in \
valgrind_suppressions.txt
CLEANFILES = testout .dodsrc *.gcda *.gcno *.gcov *.trs *.log *.file D4-xml.tar.gz
DISTCLEANFILES = test_config.h *.strm *.file tmp.txt
test_config.h: test_config.h.in Makefile
sed -e "s%[@]abs_srcdir[@]%${abs_srcdir}%" $< > test_config.h
D4-xml.tar.gz: D4-xml/DMR_*[0-9].xml
tar -czf $@ $^
############################################################################
# Unit Tests
#
if CPPUNIT
UNIT_TESTS = marshT arrayT attrTableT structT sequenceT ddsT dasT \
RegexTest ArrayTest AttrTableTest ByteTest MIMEUtilTest ancT DASTest \
DDSTest DDXParserTest generalUtilTest parserUtilTest \
SequenceTest SignalHandlerTest MarshallerTest \
ServerFunctionsListUnitTest
if DAP4_DEFINED
UNIT_TESTS += D4MarshallerTest D4UnMarshallerTest D4DimensionsTest \
D4EnumDefsTest D4GroupTest D4ParserSax2Test D4AttributesTest D4EnumTest \
chunked_iostream_test D4AsyncDocTest DMRTest \
D4SequenceTest
endif
else
UNIT_TESTS =
check-local:
@echo ""
@echo "**********************************************************"
@echo "You must have cppunit 1.12.x or greater installed to run *"
@echo "check target in unit-tests directory *"
@echo "**********************************************************"
@echo ""
endif
TEST_SRC = testFile.cc testFile.h
RegexTest_SOURCES = RegexTest.cc
RegexTest_LDADD = ../libdap.la $(AM_LDADD)
ArrayTest_SOURCES = ArrayTest.cc
ArrayTest_LDADD = ../libdap.la $(AM_LDADD)
AttrTableTest_SOURCES = AttrTableTest.cc $(TEST_SRC)
AttrTableTest_LDADD = ../libdap.la $(AM_LDADD)
ByteTest_SOURCES = ByteTest.cc $(TEST_SRC)
ByteTest_LDADD = ../libdap.la $(AM_LDADD)
MIMEUtilTest_SOURCES = MIMEUtilTest.cc
MIMEUtilTest_LDADD = ../libdap.la $(AM_LDADD)
ancT_SOURCES = ancT.cc
ancT_LDADD = ../libdapserver.la ../libdap.la $(AM_LDADD)
DASTest_SOURCES = DASTest.cc
DASTest_LDADD = ../libdap.la $(AM_LDADD)
DDSTest_SOURCES = DDSTest.cc $(TEST_SRC)
DDSTest_LDADD = ../libdap.la $(AM_LDADD)
DDXParserTest_SOURCES = DDXParserTest.cc
DDXParserTest_CPPFLAGS = $(AM_CPPFLAGS) $(XML2_CFLAGS)
DDXParserTest_LDADD = ../libdap.la $(AM_LDADD)
# DODSFilterTest_SOURCES = DODSFilterTest.cc $(TEST_SRC)
# DODSFilterTest_LDADD = ../libdapserver.la ../libdap.la \
# ../tests/libtest-types.a $(AM_LDADD)
# ResponseBuilderTest_SOURCES = ResponseBuilderTest.cc $(TEST_SRC)
# ResponseBuilderTest_LDADD = ../libdapserver.la ../libdap.la \
# ../tests/libtest-types.a $(AM_LDADD)
# Keywords2Test_SOURCES = Keywords2Test.cc
# Keywords2Test_LDADD = ../libdap.la $(AM_LDADD)
generalUtilTest_SOURCES = generalUtilTest.cc
generalUtilTest_LDADD = ../libdap.la $(AM_LDADD)
HTTPCacheTest_SOURCES = HTTPCacheTest.cc
HTTPCacheTest_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS)
HTTPCacheTest_LDADD = ../libdapclient.la ../libdap.la $(AM_LDADD)
HTTPConnectTest_SOURCES = HTTPConnectTest.cc
HTTPConnectTest_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS)
HTTPConnectTest_LDADD = ../libdapclient.la ../libdap.la $(AM_LDADD)
parserUtilTest_SOURCES = parserUtilTest.cc
parserUtilTest_LDADD = ../libdap.la $(AM_LDADD)
RCReaderTest_SOURCES = RCReaderTest.cc
RCReaderTest_LDADD = ../libdapclient.la ../libdap.la $(AM_LDADD)
SequenceTest_SOURCES = SequenceTest.cc
SequenceTest_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
SignalHandlerTest_SOURCES = SignalHandlerTest.cc
SignalHandlerTest_LDADD = ../libdap.la $(AM_LDADD)
arrayT_SOURCES = arrayT.cc
arrayT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
MarshallerTest_SOURCES = MarshallerTest.cc
MarshallerTest_LDADD = ../tests/libtest-types.a ../libdapclient.la ../libdap.la $(AM_LDADD)
marshT_SOURCES = marshT.cc
marshT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
attrTableT_SOURCES = attrTableT.cc
attrTableT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
structT_SOURCES = structT.cc
structT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
sequenceT_SOURCES = sequenceT.cc
sequenceT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
ddsT_SOURCES = ddsT.cc $(TEST_SRC)
ddsT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
dasT_SOURCES = dasT.cc $(TEST_SRC)
dasT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
ServerFunctionsListUnitTest_SOURCES = ServerFunctionsListUnitTest.cc
ServerFunctionsListUnitTest_LDADD = ../libdap.la $(AM_LDADD)
# ResponseCacheTest_SOURCES = ResponseCacheTest.cc
# ResponseCacheTest_LDADD = ../tests/libtest-types.a ../libdapserver.la ../libdap.la $(AM_LDADD)
if DAP4_DEFINED
D4MarshallerTest_SOURCES = D4MarshallerTest.cc
D4MarshallerTest_LDADD = ../libdap.la $(AM_LDADD)
D4UnMarshallerTest_SOURCES = D4UnMarshallerTest.cc
D4UnMarshallerTest_LDADD = ../libdap.la $(AM_LDADD)
D4DimensionsTest_SOURCES = D4DimensionsTest.cc $(TEST_SRC)
D4DimensionsTest_LDADD = ../libdap.la $(AM_LDADD)
D4EnumDefsTest_SOURCES = D4EnumDefsTest.cc $(TEST_SRC)
D4EnumDefsTest_LDADD = ../libdap.la $(AM_LDADD)
D4GroupTest_SOURCES = D4GroupTest.cc $(TEST_SRC)
D4GroupTest_LDADD = ../libdap.la $(AM_LDADD)
D4ParserSax2Test_SOURCES = D4ParserSax2Test.cc $(TEST_SRC)
D4ParserSax2Test_LDADD = ../libdap.la $(AM_LDADD)
D4AttributesTest_SOURCES = D4AttributesTest.cc $(TEST_SRC)
D4AttributesTest_LDADD = ../libdap.la $(AM_LDADD)
D4EnumTest_SOURCES = D4EnumTest.cc $(TEST_SRC)
D4EnumTest_LDADD = ../libdap.la $(AM_LDADD)
chunked_iostream_test_SOURCES = chunked_iostream_test.cc $(TEST_SRC)
chunked_iostream_test_LDADD = ../libdap.la $(AM_LDADD)
D4AsyncDocTest_SOURCES = D4AsyncDocTest.cc $(TEST_SRC)
D4AsyncDocTest_LDADD = ../libdap.la $(AM_LDADD)
DMRTest_SOURCES = DMRTest.cc $(TEST_SRC)
DMRTest_LDADD = ../libdap.la $(AM_LDADD)
D4FilterClauseTest_SOURCES = D4FilterClauseTest.cc
D4FilterClauseTest_LDADD = ../libdap.la $(AM_LDADD)
D4SequenceTest_SOURCES = D4SequenceTest.cc $(TEST_SRC)
D4SequenceTest_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
endif
|