2016-04-06 13:50:55 -05:00
|
|
|
# variables for tests
|
|
|
|
jails=${top_builddir}/test/jails
|
|
|
|
systemplate=${top_builddir}/test/systemplate
|
|
|
|
export jails
|
|
|
|
export systemplate
|
|
|
|
export LO_PATH
|
|
|
|
|
|
|
|
AUTOMAKE_OPTION = serial-tests
|
|
|
|
|
2015-10-21 05:01:47 -05:00
|
|
|
check_PROGRAMS = test
|
|
|
|
|
|
|
|
AM_CXXFLAGS = $(CPPUNIT_CFLAGS)
|
|
|
|
|
2016-04-08 11:36:08 -05:00
|
|
|
lib_LTLIBRARIES = unit-timeout.la unit-prefork.la unit-storage.la
|
2016-04-05 11:41:10 -05:00
|
|
|
|
|
|
|
AM_CPPFLAGS = -pthread -I$(top_srcdir)
|
|
|
|
|
2015-10-21 05:01:47 -05:00
|
|
|
test_CPPFLAGS = -DTDOC=\"$(top_srcdir)/test/data\"
|
|
|
|
|
|
|
|
test_LDADD = $(CPPUNIT_LIBS)
|
|
|
|
|
2015-10-28 04:34:20 -05:00
|
|
|
test_SOURCES = httpposttest.cpp httpwstest.cpp test.cpp ../LOOLProtocol.cpp
|
2015-10-21 05:01:47 -05:00
|
|
|
|
2016-04-05 11:41:10 -05:00
|
|
|
# unit test modules:
|
2016-04-08 11:36:08 -05:00
|
|
|
unit_timeout_la_SOURCES = UnitTimeout.cpp
|
|
|
|
unit_timeout_la_LDFLAGS = -module
|
2016-04-07 15:59:27 -05:00
|
|
|
unit_prefork_la_SOURCES = UnitPrefork.cpp
|
2016-04-05 11:41:10 -05:00
|
|
|
unit_prefork_la_LDFLAGS = -module
|
2016-04-07 15:59:27 -05:00
|
|
|
unit_storage_la_SOURCES = UnitStorage.cpp
|
|
|
|
unit_storage_la_LDFLAGS = -module
|
2016-04-05 11:41:10 -05:00
|
|
|
|
2016-04-05 17:04:40 -05:00
|
|
|
${systemplate}/system_stamp :
|
|
|
|
rm -rf ${systemplate}
|
|
|
|
${top_srcdir}/loolwsd-systemplate-setup ${systemplate} ${LO_PATH} && touch ${systemplate}/system_stamp
|
|
|
|
|
|
|
|
${jails} :
|
|
|
|
mkdir -p ${jails}
|
|
|
|
|
2016-04-06 13:50:55 -05:00
|
|
|
${top_builddir}/test/run_unit.sh.log ${top_builddir}/test/run_unit.sh.trs : \
|
|
|
|
${systemplate}/system_stamp ${jails} \
|
|
|
|
${top_srcdir}/test/run_unit.sh \
|
|
|
|
${top_builddir}/loolwsd \
|
|
|
|
${top_builddir}/loolforkit \
|
2016-04-08 11:36:08 -05:00
|
|
|
unit-timeout.la unit-prefork.la unit-storage.la
|
2016-04-06 13:50:55 -05:00
|
|
|
if ${top_srcdir}/test/run_unit.sh; then \
|
|
|
|
touch ${top_builddir}/test/run_unit.sh.log; \
|
|
|
|
fi
|
2016-04-05 17:04:40 -05:00
|
|
|
|
2016-04-05 11:41:10 -05:00
|
|
|
if HAVE_LO_PATH
|
2016-04-06 13:50:55 -05:00
|
|
|
TESTS = ${top_builddir}/test/run_unit.sh ${top_builddir}/test/test
|
2016-04-05 17:04:40 -05:00
|
|
|
|
|
|
|
clean-local:
|
|
|
|
rm -rf ${top_builddir}/test/jails
|
|
|
|
rm -rf ${systemplate}
|
2016-04-06 13:50:55 -05:00
|
|
|
rm -f ${top_builddir}/test/unit_stamp;
|
2016-04-05 11:41:10 -05:00
|
|
|
else
|
2016-04-06 13:50:55 -05:00
|
|
|
TESTS = ${top_builddir}/test/test
|
2016-04-05 11:41:10 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
EXTRA_DIST = data/hello.odt data/hello.txt $(test_SOURCES) run_unit.sh
|
|
|
|
|
2015-10-21 05:01:47 -05:00
|
|
|
|