libreoffice-online/test/Makefile.am

97 lines
3.2 KiB
Text
Raw Normal View History

# Cap threadpools to 4 threads.
export MAX_CONCURRENCY=4
AUTOMAKE_OPTION = serial-tests
# unittest: tests that do not need loolwsd running, and that are run during a
# normal build
# test: tests that need loolwsd running, and that are run via 'make check'
2015-10-21 05:01:47 -05:00
check_PROGRAMS = test
noinst_PROGRAMS = test unittest
2015-10-21 05:01:47 -05:00
AM_CXXFLAGS = $(CPPUNIT_CFLAGS) -DTDOC=\"$(top_srcdir)/test/data\" \
-I${top_srcdir}/common -I${top_srcdir}/wsd -I${top_srcdir}/kit
2015-10-21 05:01:47 -05:00
noinst_LTLIBRARIES = \
unit-timeout.la unit-prefork.la \
unit-storage.la unit-fonts.la \
2016-06-22 08:57:01 -05:00
unit-admin.la unit-tilecache.la \
unit-fuzz.la unit-oob.la \
unit-minsocketbuffersize.la
MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION)
# We work around some of the mess of using the same sources both on
# the server side and here in unit tests with conditional compilation
# based on BUILDING_TESTS
AM_CPPFLAGS = -pthread -I$(top_srcdir) -DBUILDING_TESTS
wsd_sources = \
../common/FileUtil.cpp \
../common/SigUtil.cpp \
../common/IoUtil.cpp \
../common/Log.cpp \
../common/Protocol.cpp \
../common/Session.cpp \
../common/MessageQueue.cpp \
../kit/Kit.cpp \
../wsd/TileCache.cpp \
../common/Unit.cpp \
../common/Util.cpp
unittest_CPPFLAGS = -I$(top_srcdir) -DBUILDING_TESTS
unittest_SOURCES = TileQueueTests.cpp WhiteBoxTests.cpp test.cpp $(wsd_sources)
unittest_LDADD = $(CPPUNIT_LIBS)
test_CPPFLAGS = -I$(top_srcdir) -DBUILDING_TESTS
test_SOURCES = TileCacheTests.cpp integration-http-server.cpp \
httpwstest.cpp httpcrashtest.cpp httpwserror.cpp $(unittest_SOURCES)
test_LDADD = $(CPPUNIT_LIBS)
# unit test modules:
2016-12-08 11:22:23 -06:00
unit_oob_la_SOURCES = UnitOOB.cpp
2016-06-22 08:57:01 -05:00
unit_fuzz_la_SOURCES = UnitFuzz.cpp
unit_admin_la_SOURCES = UnitAdmin.cpp
unit_admin_la_LIBADD = $(CPPUNIT_LIBS)
2016-04-13 09:10:02 -05:00
unit_fonts_la_SOURCES = UnitFonts.cpp
unit_timeout_la_SOURCES = UnitTimeout.cpp
unit_prefork_la_SOURCES = UnitPrefork.cpp
unit_storage_la_SOURCES = UnitStorage.cpp
unit_tilecache_la_SOURCES = UnitTileCache.cpp
unit_minsocketbuffersize_la_SOURCES = UnitMinSocketBufferSize.cpp
2016-04-12 01:29:57 -05:00
if HAVE_LO_PATH
SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
2016-04-12 01:29:57 -05:00
else
SYSTEM_STAMP =
endif
if HAVE_LO_PATH
check-local:
2016-04-30 12:15:41 -05:00
./run_unit.sh --log-file test.log --trs-file test.trs
# FIXME unit-fonts.la is unstable, disabled for now.
# FIXME 2: unit-oob.la fails with symbol undefined:
# UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, UnitHTTPServerResponse&) ,
# disable for now that one too.
TESTS = unit-tilecache.la unit-storage.la unit-timeout.la unit-prefork.la unit-admin.la unit-minsocketbuffersize.la
else
TESTS = ${top_builddir}/test/test
endif
2016-04-30 12:15:41 -05:00
TEST_EXTENSIONS = .la
LA_LOG_DRIVER = ${top_srcdir}/test/run_unit.sh
EXTRA_DIST = data/hello.odt data/hello.txt $(test_SOURCES) $(unittest_SOURCES) run_unit.sh
check_valgrind: all
./run_unit.sh --log-file test.log --trs-file test.trs --valgrind
# run unittest during the normal build
all-local: unittest
@echo
@echo "Running build-time unit tests. For more thorough testing, please run 'make check'."
@echo
@${top_builddir}/test/unittest 2> unittest.log || { cat unittest.log ; exit 1 ; }