2023-06-15 22:35:05 +02:00
|
|
|
if ENABLE_TESTS
|
|
|
|
|
2016-06-16 00:46:13 +02:00
|
|
|
# Cap threadpools to 4 threads.
|
|
|
|
export MAX_CONCURRENCY=4
|
2016-04-06 20:50:55 +02:00
|
|
|
AUTOMAKE_OPTION = serial-tests
|
|
|
|
|
2024-01-24 23:46:12 +01:00
|
|
|
DIST_FOLDER ?= $(abs_top_builddir)/browser/dist
|
|
|
|
|
2021-11-18 13:08:14 +01:00
|
|
|
# unittest: tests that run a captive coolwsd as part of themselves.
|
2020-01-17 22:18:42 +01:00
|
|
|
check_PROGRAMS = fakesockettest
|
2016-09-30 10:43:04 +02:00
|
|
|
|
2021-03-14 14:46:20 +01:00
|
|
|
noinst_PROGRAMS = fakesockettest unittest unithttplib
|
2015-10-21 12:01:47 +02:00
|
|
|
|
2023-02-26 19:19:22 +01:00
|
|
|
include_paths = ${ZLIB_CFLAGS} ${ZSTD_CFLAGS} ${PNG_CFLAGS}
|
|
|
|
if ENABLE_SSL
|
|
|
|
include_paths += ${OPENSSL_CFLAGS}
|
|
|
|
endif
|
|
|
|
|
2024-01-24 23:46:12 +01:00
|
|
|
AM_CXXFLAGS = $(CPPUNIT_CFLAGS) -DTDOC=\"$(abs_top_srcdir)/test/data\" -DTDIST=\"$(DIST_FOLDER)\" \
|
2020-02-15 20:32:57 +01:00
|
|
|
-I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/wsd -I${top_srcdir}/kit \
|
2022-02-06 00:14:38 +01:00
|
|
|
-I${top_srcdir} -I${top_srcdir}/test \
|
2021-11-18 13:08:14 +01:00
|
|
|
-pthread -DCOOLWSD_DATADIR='"@COOLWSD_DATADIR@"' \
|
|
|
|
-DCOOLWSD_CONFIGDIR='"@COOLWSD_CONFIGDIR@"' \
|
2020-02-15 20:32:57 +01:00
|
|
|
-DDEBUG_ABSSRCDIR='"@abs_srcdir@"' \
|
|
|
|
${include_paths}
|
2015-10-21 12:01:47 +02:00
|
|
|
|
2022-03-06 15:07:21 +01:00
|
|
|
# These are ordered by how long each takes to run.
|
|
|
|
# The longest-running tests are put first, the
|
|
|
|
# fastest tests are last. This reduces the
|
|
|
|
# total time with parallel runs.
|
|
|
|
# The time each test takes is logged, looked for
|
|
|
|
# 'Finished in' in the `make check` output.
|
|
|
|
# When adding new tests, please maintain order.
|
|
|
|
all_la_unit_tests = \
|
2024-04-25 16:55:16 +02:00
|
|
|
unit-synthetic-lok.la \
|
2022-12-06 00:48:01 +01:00
|
|
|
unit-wopi-async-slow.la \
|
2023-05-23 00:34:42 +02:00
|
|
|
unit-tiletest.la \
|
2023-01-17 00:42:31 +01:00
|
|
|
unit-wopi-fail-upload.la \
|
2023-04-19 23:14:06 +02:00
|
|
|
unit-each-view.la \
|
|
|
|
unit-wopi-stuck-save.la \
|
2023-05-23 00:34:42 +02:00
|
|
|
unit-load.la \
|
|
|
|
unit-integration.la \
|
|
|
|
unit-httpws.la \
|
|
|
|
unit-quarantine.la \
|
2023-04-19 23:14:06 +02:00
|
|
|
unit-load-torture.la \
|
2024-04-15 16:50:10 +02:00
|
|
|
unit-save-torture.la \
|
2023-04-19 23:14:06 +02:00
|
|
|
unit-copy-paste.la \
|
cool#8465 clipboard: improve handling of plain text copy, complex case
In case the selection is complex (not simple), we used to just request
HTML, and then the browser converted that to plain text, which has the
downsides already mentioned in commit
7f9de46688a64b42ba8f65cceb9fe2c6ddab89ef (cool#8465 clipboard: improve
handling of plain text copy, simple case, 2024-03-08).
Steps to support this:
1) Clipboard.js now asks for the text/html,text/plain;charset=utf-8 MIME
types.
2) wsd: ClientRequestDispatcher::handleClipboardRequest() now maps this
to DocumentBroker::CLIP_REQUEST_GET_HTML_PLAIN_ONLY
3) ClientSession::handleClipboardRequest() maps this to the HTML+plain
text MIME type list.
4) kit: ChildSession::getClipboard() is now improved to take a list of
MIME types, not just 1 or everything.
5) kit: ChildSession::getClipboard() now emits JSON in case not all, but
multiple MIME types are requested.
6) wsd: ClientSession::postProcessCopyPayload() now knows how to
postprocess clipboardcontent messages, which may or may not be JSON
(it's JSON if more formats are requested explicitly, leaving the 1
format or all format cases unchanged)
7) Control.DownloadProgress.js now handles the case when we get JSON and
sets the core-provided plain text next to the HTML.
Leave the handling of non-JSON case in, because this means we can
copy from an old COOL server to a new one.
Note that this approach has the benefit that once the clipboard marker
is inserted, the length of the text/html format would change, which
means we can't parse the clipboard data till the marker is removed.
Emitting JSON for html+text means adding the marker keeps the ability to
parse the HTML and the plain text part of the clipboard in JS.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I67a1f669e8a638d34cc25a2f288a7b30884b9892
2024-03-19 12:12:16 +01:00
|
|
|
unit-copy-paste-writer.la \
|
2022-03-06 15:07:21 +01:00
|
|
|
unit-crash.la \
|
2023-04-19 23:14:06 +02:00
|
|
|
unit-wopi-fileurl.la \
|
2022-07-24 17:18:10 +02:00
|
|
|
unit-wopi-save-on-exit.la \
|
|
|
|
unit-wopi-documentconflict.la \
|
|
|
|
unit-close.la \
|
2023-05-23 00:34:42 +02:00
|
|
|
unit-wopi-languages.la \
|
|
|
|
unit-insert-delete.la \
|
|
|
|
unit-password-protected.la \
|
2022-07-24 17:18:10 +02:00
|
|
|
unit-uno-command.la \
|
2023-04-19 23:14:06 +02:00
|
|
|
unit-wopi-httpredirect.la \
|
2023-06-25 06:33:33 +02:00
|
|
|
unit-wopi-watermark.la \
|
|
|
|
unit-wopi-lock.la \
|
2023-05-23 00:34:42 +02:00
|
|
|
unit-calc.la \
|
2022-07-24 17:18:10 +02:00
|
|
|
unit-http.la \
|
2022-03-06 15:07:21 +01:00
|
|
|
unit-wopi-temp.la \
|
2023-05-23 00:34:42 +02:00
|
|
|
unit-session.la \
|
|
|
|
unit-render-shape.la \
|
|
|
|
unit-wopi-ownertermination.la \
|
|
|
|
unit-wopi-httpheaders.la \
|
|
|
|
unit-wopi.la \
|
2022-07-24 17:18:10 +02:00
|
|
|
unit-wopi-crash-modified.la \
|
|
|
|
unit-oauth.la \
|
|
|
|
unit-wopi-versionrestore.la \
|
2022-03-06 15:07:21 +01:00
|
|
|
unit-convert.la \
|
|
|
|
unit-rendering-options.la \
|
|
|
|
unit-paste.la \
|
|
|
|
unit-large-paste.la \
|
|
|
|
unit-typing.la \
|
2022-07-24 17:18:10 +02:00
|
|
|
unit-cursor.la \
|
|
|
|
unit-render-search-result.la \
|
|
|
|
unit-tiff-load.la \
|
2023-04-19 23:14:06 +02:00
|
|
|
unit-wopi-saveas-with-encoded-file-name.la \
|
|
|
|
unit-storage.la \
|
|
|
|
unit-wopi-async-upload-modifyclose.la \
|
|
|
|
unit-wopi-saveas.la \
|
|
|
|
unit_wopi_renamefile.la \
|
|
|
|
unit-wopi-loadencoded.la \
|
|
|
|
unit-prefork.la \
|
2022-03-06 15:07:21 +01:00
|
|
|
unit-bad-doc-load.la \
|
2022-07-24 17:18:10 +02:00
|
|
|
unit-hosting.la \
|
2024-05-02 18:21:57 +02:00
|
|
|
unit-join-disconnect.la \
|
2022-03-06 15:07:21 +01:00
|
|
|
unit-timeout.la \
|
|
|
|
unit-base.la
|
2022-03-06 19:07:47 +01:00
|
|
|
# unit-admin.la
|
2022-07-21 14:34:14 +02:00
|
|
|
# unit-tilecache.la # Empty test.
|
2022-03-06 15:07:21 +01:00
|
|
|
|
|
|
|
if ENABLE_LIBFUZZER
|
|
|
|
all_la_unit_tests += unit-fuzz.la
|
|
|
|
endif
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES = ${all_la_unit_tests}
|
2016-04-05 18:41:10 +02:00
|
|
|
|
2019-05-27 09:09:49 +02:00
|
|
|
MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
|
2023-05-08 00:19:24 +02:00
|
|
|
AM_LDFLAGS = -module $(MAGIC_TO_FORCE_SHLIB_CREATION) $(ZLIB_LIBS) $(ZSTD_LIBS) ${PNG_LIBS}
|
|
|
|
|
|
|
|
# Clang's linker doesn't like -pthread.
|
|
|
|
if !HAVE_CLANG
|
|
|
|
AM_LDFLAGS += -pthread
|
|
|
|
endif
|
2016-09-28 21:07:07 +02:00
|
|
|
|
2018-05-04 18:47:33 +02:00
|
|
|
if ENABLE_SSL
|
2022-11-11 19:03:09 +01:00
|
|
|
AM_LDFLAGS += ${OPENSSL_LIBS}
|
2018-05-04 18:47:33 +02:00
|
|
|
endif
|
|
|
|
|
2016-09-28 21:07:07 +02:00
|
|
|
# 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
|
|
|
|
|
2020-01-20 17:45:53 +01:00
|
|
|
AM_CPPFLAGS = -pthread -I$(top_srcdir) -DBUILDING_TESTS -DLOK_ABORT_ON_ASSERTION
|
2016-04-05 18:41:10 +02:00
|
|
|
|
2016-05-01 18:35:42 +02:00
|
|
|
wsd_sources = \
|
2018-11-22 12:03:42 +01:00
|
|
|
../common/Authorization.cpp \
|
2024-03-06 13:43:53 +01:00
|
|
|
../common/SpookyV2.cpp \
|
2016-11-24 15:56:06 +01:00
|
|
|
../kit/Kit.cpp \
|
2024-03-06 13:43:53 +01:00
|
|
|
../kit/KitWebSocket.cpp \
|
2019-05-03 18:05:52 +02:00
|
|
|
../kit/TestStubs.cpp \
|
2020-06-03 18:46:42 +02:00
|
|
|
../wsd/FileServerUtil.cpp \
|
2020-05-24 15:21:18 +02:00
|
|
|
../wsd/RequestDetails.cpp \
|
2020-04-08 19:25:44 +02:00
|
|
|
../wsd/TileCache.cpp \
|
|
|
|
../wsd/ProofKey.cpp
|
2019-05-24 11:08:54 +02:00
|
|
|
|
2023-04-20 16:36:39 +02:00
|
|
|
test_base_sources = \
|
2024-05-08 18:47:53 +02:00
|
|
|
KitQueueTests.cpp \
|
2022-03-28 01:15:59 +02:00
|
|
|
RequestDetailsTests.cpp \
|
2022-04-12 02:27:44 +02:00
|
|
|
StringVectorTests.cpp \
|
2023-08-06 12:50:19 +02:00
|
|
|
FileServeWhiteBoxTests.cpp \
|
2017-09-19 22:16:44 +02:00
|
|
|
WhiteBoxTests.cpp \
|
2021-03-14 01:48:03 +01:00
|
|
|
HttpWhiteBoxTests.cpp \
|
2017-09-16 18:32:20 +02:00
|
|
|
DeltaTests.cpp \
|
2021-11-29 19:02:53 +01:00
|
|
|
UtilTests.cpp \
|
2020-04-07 22:42:30 +02:00
|
|
|
WopiProofTests.cpp \
|
2019-05-27 09:09:49 +02:00
|
|
|
$(wsd_sources)
|
2019-05-24 11:08:54 +02:00
|
|
|
|
2021-03-14 14:46:20 +01:00
|
|
|
common_sources = \
|
|
|
|
../common/Protocol.cpp \
|
|
|
|
../common/ConfigUtil.cpp \
|
2021-06-18 13:53:51 +02:00
|
|
|
../common/DummyTraceEventEmitter.cpp \
|
2021-03-14 14:46:20 +01:00
|
|
|
../common/Log.cpp \
|
|
|
|
../common/Session.cpp \
|
|
|
|
../common/SigUtil.cpp \
|
|
|
|
../common/Unit.cpp \
|
|
|
|
../common/FileUtil.cpp \
|
|
|
|
../common/Util.cpp \
|
2024-03-17 20:23:18 +01:00
|
|
|
../common/Util-desktop.cpp \
|
2021-03-14 14:46:20 +01:00
|
|
|
../common/StringVector.cpp \
|
2021-06-01 12:21:09 +02:00
|
|
|
../common/TraceEvent.cpp \
|
2023-08-28 22:14:46 +02:00
|
|
|
../common/Simd.cpp \
|
2024-05-08 18:47:53 +02:00
|
|
|
../kit/KitQueue.cpp \
|
2022-02-02 20:07:19 +01:00
|
|
|
../wsd/Exceptions.cpp \
|
2021-03-14 14:46:20 +01:00
|
|
|
../net/HttpRequest.cpp \
|
|
|
|
../net/Socket.cpp \
|
|
|
|
../net/NetUtil.cpp \
|
|
|
|
../wsd/Auth.cpp
|
|
|
|
|
|
|
|
unithttplib_CPPFLAGS = -I$(top_srcdir) -DBUILDING_TESTS -DSTANDALONE_CPPUNIT -g
|
|
|
|
unithttplib_SOURCES = $(common_sources) test.cpp HttpRequestTests.cpp
|
|
|
|
unithttplib_LDADD = $(CPPUNIT_LIBS)
|
|
|
|
|
2020-06-20 20:09:21 +02:00
|
|
|
unittest_CPPFLAGS = -I$(top_srcdir) -DBUILDING_TESTS -DSTANDALONE_CPPUNIT -g
|
2020-01-24 08:48:14 +01:00
|
|
|
unittest_SOURCES = \
|
2023-04-20 16:36:39 +02:00
|
|
|
$(test_base_sources) \
|
2021-03-14 14:46:20 +01:00
|
|
|
$(common_sources) \
|
2023-04-20 16:36:39 +02:00
|
|
|
../wsd/TestStubs.cpp \
|
|
|
|
test.cpp
|
2020-01-24 08:48:14 +01:00
|
|
|
|
2020-04-09 15:28:57 +02:00
|
|
|
unittest_LDADD = $(CPPUNIT_LIBS)
|
|
|
|
unit_base_la_LIBADD = $(CPPUNIT_LIBS)
|
2020-01-24 08:48:14 +01:00
|
|
|
if ENABLE_SSL
|
|
|
|
unittest_SOURCES += ../net/Ssl.cpp
|
2021-03-14 14:46:20 +01:00
|
|
|
unithttplib_SOURCES += ../net/Ssl.cpp
|
2020-04-09 15:28:57 +02:00
|
|
|
else
|
|
|
|
unittest_LDADD += -lssl -lcrypto
|
2021-03-14 14:46:20 +01:00
|
|
|
unithttplib_LDADD += -lssl -lcrypto
|
2020-04-09 15:28:57 +02:00
|
|
|
unit_base_la_LIBADD += -lssl -lcrypto
|
2020-01-24 08:48:14 +01:00
|
|
|
endif
|
|
|
|
|
2020-12-23 01:08:45 +01:00
|
|
|
fakesockettest_CPPFLAGS = -g
|
2024-03-17 20:23:18 +01:00
|
|
|
fakesockettest_SOURCES = fakesockettest.cpp ../net/FakeSocket.cpp ../common/DummyTraceEventEmitter.cpp ../common/Log.cpp ../common/Util.cpp ../common/Util-desktop.cpp
|
2018-11-01 10:18:07 +01:00
|
|
|
fakesockettest_LDADD = $(CPPUNIT_LIBS)
|
|
|
|
|
2020-01-17 21:49:38 +01:00
|
|
|
# old-style unit tests - bootstrapped via UnitClient
|
2023-04-20 16:36:39 +02:00
|
|
|
unit_base_la_SOURCES = UnitClient.cpp ${test_base_sources}
|
2024-03-08 19:00:23 +01:00
|
|
|
unit_tiletest_la_SOURCES = UnitClient.cpp TileCacheTests.cpp KitPidHelpers.cpp
|
2020-01-17 21:49:38 +01:00
|
|
|
unit_tiletest_la_LIBADD = $(CPPUNIT_LIBS)
|
2024-03-08 19:00:23 +01:00
|
|
|
unit_integration_la_SOURCES = UnitClient.cpp integration-http-server.cpp KitPidHelpers.cpp
|
2020-01-17 21:49:38 +01:00
|
|
|
unit_integration_la_LIBADD = $(CPPUNIT_LIBS)
|
2024-03-08 19:00:23 +01:00
|
|
|
unit_httpws_la_SOURCES = UnitClient.cpp httpwstest.cpp KitPidHelpers.cpp
|
2020-01-17 21:49:38 +01:00
|
|
|
unit_httpws_la_LIBADD = $(CPPUNIT_LIBS)
|
2024-03-08 19:00:23 +01:00
|
|
|
unit_crash_la_SOURCES = UnitClient.cpp httpcrashtest.cpp KitPidHelpers.cpp
|
2020-01-17 21:49:38 +01:00
|
|
|
unit_crash_la_LIBADD = $(CPPUNIT_LIBS)
|
|
|
|
|
2016-04-05 18:41:10 +02:00
|
|
|
# unit test modules:
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_http_la_SOURCES = UnitHTTP.cpp
|
2019-11-17 14:46:19 +01:00
|
|
|
unit_http_la_LIBADD = $(CPPUNIT_LIBS)
|
2022-03-06 15:07:21 +01:00
|
|
|
if ENABLE_LIBFUZZER
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_fuzz_la_SOURCES = UnitFuzz.cpp
|
2022-03-06 15:07:21 +01:00
|
|
|
endif
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_admin_la_SOURCES = UnitAdmin.cpp
|
|
|
|
unit_admin_la_LIBADD = $(CPPUNIT_LIBS)
|
|
|
|
unit_typing_la_SOURCES = UnitTyping.cpp
|
|
|
|
unit_typing_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-08-14 09:05:23 +02:00
|
|
|
unit_copy_paste_la_SOURCES = UnitCopyPaste.cpp
|
2019-06-20 21:20:26 +02:00
|
|
|
unit_copy_paste_la_LIBADD = $(CPPUNIT_LIBS)
|
cool#8465 clipboard: improve handling of plain text copy, complex case
In case the selection is complex (not simple), we used to just request
HTML, and then the browser converted that to plain text, which has the
downsides already mentioned in commit
7f9de46688a64b42ba8f65cceb9fe2c6ddab89ef (cool#8465 clipboard: improve
handling of plain text copy, simple case, 2024-03-08).
Steps to support this:
1) Clipboard.js now asks for the text/html,text/plain;charset=utf-8 MIME
types.
2) wsd: ClientRequestDispatcher::handleClipboardRequest() now maps this
to DocumentBroker::CLIP_REQUEST_GET_HTML_PLAIN_ONLY
3) ClientSession::handleClipboardRequest() maps this to the HTML+plain
text MIME type list.
4) kit: ChildSession::getClipboard() is now improved to take a list of
MIME types, not just 1 or everything.
5) kit: ChildSession::getClipboard() now emits JSON in case not all, but
multiple MIME types are requested.
6) wsd: ClientSession::postProcessCopyPayload() now knows how to
postprocess clipboardcontent messages, which may or may not be JSON
(it's JSON if more formats are requested explicitly, leaving the 1
format or all format cases unchanged)
7) Control.DownloadProgress.js now handles the case when we get JSON and
sets the core-provided plain text next to the HTML.
Leave the handling of non-JSON case in, because this means we can
copy from an old COOL server to a new one.
Note that this approach has the benefit that once the clipboard marker
is inserted, the length of the text/html format would change, which
means we can't parse the clipboard data till the marker is removed.
Emitting JSON for html+text means adding the marker keeps the ability to
parse the HTML and the plain text part of the clipboard in JS.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I67a1f669e8a638d34cc25a2f288a7b30884b9892
2024-03-19 12:12:16 +01:00
|
|
|
unit_copy_paste_writer_la_SOURCES = UnitCopyPasteWriter.cpp
|
|
|
|
unit_copy_paste_writer_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_convert_la_SOURCES = UnitConvert.cpp
|
2024-05-02 18:21:57 +02:00
|
|
|
unit_join_disconnect_la_SOURCES = UnitJoinDisconnect.cpp
|
|
|
|
unit_join_disconnect_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_timeout_la_SOURCES = UnitTimeout.cpp
|
2022-11-12 14:19:42 +01:00
|
|
|
unit_timeout_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_prefork_la_SOURCES = UnitPrefork.cpp
|
2022-11-12 14:19:42 +01:00
|
|
|
unit_prefork_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_storage_la_SOURCES = UnitStorage.cpp
|
2022-03-06 19:07:47 +01:00
|
|
|
unit_storage_la_LIBADD = $(CPPUNIT_LIBS)
|
2022-07-21 14:34:14 +02:00
|
|
|
# unit_tilecache_la_SOURCES = UnitTileCache.cpp
|
|
|
|
# unit_tilecache_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_oauth_la_SOURCES = UnitOAuth.cpp
|
|
|
|
unit_oauth_la_LIBADD = $(CPPUNIT_LIBS)
|
|
|
|
unit_wopi_la_SOURCES = UnitWOPI.cpp
|
|
|
|
unit_wopi_la_LIBADD = $(CPPUNIT_LIBS)
|
2021-07-11 15:33:45 +02:00
|
|
|
unit_wopi_async_upload_modifyclose_la_SOURCES = UnitWOPIAsyncUpload_ModifyClose.cpp
|
|
|
|
unit_wopi_async_upload_modifyclose_la_LIBADD = $(CPPUNIT_LIBS)
|
2021-11-28 16:18:44 +01:00
|
|
|
unit_wopi_async_slow_la_SOURCES = UnitWOPISlow.cpp
|
|
|
|
unit_wopi_async_slow_la_LIBADD = $(CPPUNIT_LIBS)
|
2022-03-31 03:09:18 +02:00
|
|
|
unit_wopi_crash_modified_la_SOURCES = UnitWOPICrashModified.cpp
|
|
|
|
unit_wopi_crash_modified_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_wopi_saveas_la_SOURCES = UnitWOPISaveAs.cpp
|
|
|
|
unit_wopi_saveas_la_LIBADD = $(CPPUNIT_LIBS)
|
2021-12-03 14:19:43 +01:00
|
|
|
unit_wopi_saveas_with_encoded_file_name_la_SOURCES = UnitWOPISaveAsWithEncodedFileName.cpp
|
|
|
|
unit_wopi_saveas_with_encoded_file_name_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_wopi_ownertermination_la_SOURCES = UnitWopiOwnertermination.cpp
|
|
|
|
unit_wopi_ownertermination_la_LIBADD = $(CPPUNIT_LIBS)
|
|
|
|
unit_wopi_versionrestore_la_SOURCES = UnitWOPIVersionRestore.cpp
|
|
|
|
unit_wopi_versionrestore_la_LIBADD = $(CPPUNIT_LIBS)
|
|
|
|
unit_wopi_documentconflict_la_SOURCES = UnitWOPIDocumentConflict.cpp
|
|
|
|
unit_wopi_documentconflict_la_LIBADD = $(CPPUNIT_LIBS)
|
2022-02-06 00:14:38 +01:00
|
|
|
unit_wopi_save_on_exit_la_SOURCES = UnitWOPISaveOnExit.cpp
|
|
|
|
unit_wopi_save_on_exit_la_LIBADD = $(CPPUNIT_LIBS)
|
2022-06-18 16:33:54 +02:00
|
|
|
unit_wopi_stuck_save_la_SOURCES = UnitWOPIStuckSave.cpp
|
|
|
|
unit_wopi_stuck_save_la_LIBADD = $(CPPUNIT_LIBS)
|
2022-02-09 06:10:25 +01:00
|
|
|
unit_wopi_fail_upload_la_SOURCES = UnitWOPIFailUpload.cpp
|
|
|
|
unit_wopi_fail_upload_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_wopi_renamefile_la_SOURCES = UnitWOPIRenameFile.cpp
|
|
|
|
unit_wopi_renamefile_la_LIBADD = $(CPPUNIT_LIBS)
|
2022-04-30 04:24:40 +02:00
|
|
|
unit_wopi_languages_la_SOURCES = UnitWOPILanguages.cpp
|
|
|
|
unit_wopi_languages_la_LIBADD = $(CPPUNIT_LIBS)
|
2021-11-11 10:17:43 +01:00
|
|
|
unit_wopi_lock_la_SOURCES = UnitWOPILock.cpp
|
|
|
|
unit_wopi_lock_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-10-29 14:26:27 +01:00
|
|
|
unit_wopi_watermark_la_SOURCES = UnitWOPIWatermark.cpp
|
|
|
|
unit_wopi_watermark_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-27 09:09:49 +02:00
|
|
|
unit_wopi_loadencoded_la_SOURCES = UnitWOPILoadEncoded.cpp
|
|
|
|
unit_wopi_loadencoded_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-05-22 05:33:26 +02:00
|
|
|
unit_wopi_temp_la_SOURCES = UnitWOPITemplate.cpp
|
|
|
|
unit_wopi_temp_la_LIBADD = $(CPPUNIT_LIBS)
|
2021-02-07 23:58:01 +01:00
|
|
|
unit_wopi_fileurl_la_SOURCES = UnitWOPIFileUrl.cpp
|
|
|
|
unit_wopi_fileurl_la_LIBADD = $(CPPUNIT_LIBS)
|
2020-06-22 14:24:11 +02:00
|
|
|
unit_wopi_httpheaders_la_SOURCES = UnitWOPIHttpHeaders.cpp
|
|
|
|
unit_wopi_httpheaders_la_LIBADD = $(CPPUNIT_LIBS)
|
2021-06-18 16:50:40 +02:00
|
|
|
unit_wopi_httpredirect_la_SOURCES = UnitWOPIHttpRedirect.cpp
|
|
|
|
unit_wopi_httpredirect_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-09-12 23:10:04 +02:00
|
|
|
unit_tiff_load_la_SOURCES = UnitTiffLoad.cpp
|
|
|
|
unit_tiff_load_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-10-08 08:50:05 +02:00
|
|
|
unit_large_paste_la_SOURCES = UnitLargePaste.cpp
|
|
|
|
unit_large_paste_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-10-18 09:06:53 +02:00
|
|
|
unit_paste_la_SOURCES = UnitPaste.cpp
|
|
|
|
unit_paste_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-10-21 09:04:12 +02:00
|
|
|
unit_load_torture_la_SOURCES = UnitLoadTorture.cpp
|
|
|
|
unit_load_torture_la_LIBADD = $(CPPUNIT_LIBS)
|
2024-04-15 16:50:10 +02:00
|
|
|
unit_save_torture_la_SOURCES = UnitSaveTorture.cpp
|
|
|
|
unit_save_torture_la_LIBADD = $(CPPUNIT_LIBS)
|
2024-04-25 16:55:16 +02:00
|
|
|
unit_synthetic_lok_la_SOURCES = UnitSyntheticLok.cpp
|
|
|
|
unit_synthetic_lok__la_LIBADD = $(CPPUNIT_LIBS)
|
2019-10-25 08:54:46 +02:00
|
|
|
unit_rendering_options_la_SOURCES = UnitRenderingOptions.cpp
|
|
|
|
unit_rendering_options_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-10-28 09:12:25 +01:00
|
|
|
unit_password_protected_la_SOURCES = UnitPasswordProtected.cpp
|
|
|
|
unit_password_protected_la_LIBADD = $(CPPUNIT_LIBS)
|
2021-08-09 07:48:27 +02:00
|
|
|
unit_render_search_result_la_SOURCES = UnitRenderSearchResult.cpp
|
|
|
|
unit_render_search_result_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-11-04 08:34:38 +01:00
|
|
|
unit_render_shape_la_SOURCES = UnitRenderShape.cpp
|
|
|
|
unit_render_shape_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-11-12 08:47:39 +01:00
|
|
|
unit_each_view_la_SOURCES = UnitEachView.cpp
|
|
|
|
unit_each_view_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-11-14 08:40:51 +01:00
|
|
|
unit_session_la_SOURCES = UnitSession.cpp
|
|
|
|
unit_session_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-11-18 08:56:35 +01:00
|
|
|
unit_uno_command_la_SOURCES = UnitUNOCommand.cpp
|
|
|
|
unit_uno_command_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-11-25 15:00:38 +01:00
|
|
|
unit_load_la_SOURCES = UnitLoad.cpp
|
2019-11-22 09:07:24 +01:00
|
|
|
unit_load_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-12-02 09:11:32 +01:00
|
|
|
unit_cursor_la_SOURCES = UnitCursor.cpp
|
|
|
|
unit_cursor_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-12-06 08:51:51 +01:00
|
|
|
unit_calc_la_SOURCES = UnitCalc.cpp
|
|
|
|
unit_calc_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-12-18 21:16:26 +01:00
|
|
|
unit_insert_delete_la_SOURCES = UnitInsertDelete.cpp
|
|
|
|
unit_insert_delete_la_LIBADD = $(CPPUNIT_LIBS)
|
2019-12-20 09:04:17 +01:00
|
|
|
unit_close_la_SOURCES = UnitClose.cpp
|
|
|
|
unit_close_la_LIBADD = $(CPPUNIT_LIBS)
|
2020-01-09 08:33:48 +01:00
|
|
|
unit_bad_doc_load_la_SOURCES = UnitBadDocLoad.cpp
|
|
|
|
unit_bad_doc_load_la_LIBADD = $(CPPUNIT_LIBS)
|
2020-01-17 08:50:15 +01:00
|
|
|
unit_hosting_la_SOURCES = UnitHosting.cpp
|
|
|
|
unit_hosting_la_LIBADD = $(CPPUNIT_LIBS)
|
2023-04-21 13:50:48 +02:00
|
|
|
unit_quarantine_la_SOURCES = UnitQuarantine.cpp
|
|
|
|
unit_quarantine_la_LIBADD = $(CPPUNIT_LIBS)
|
2016-04-05 18:41:10 +02:00
|
|
|
|
2016-04-12 08:29:57 +02:00
|
|
|
if HAVE_LO_PATH
|
2016-04-12 08:37:24 +02:00
|
|
|
SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
|
2016-04-12 08:29:57 +02:00
|
|
|
else
|
|
|
|
SYSTEM_STAMP =
|
|
|
|
endif
|
|
|
|
|
2021-11-17 11:16:49 +01:00
|
|
|
CLEANUP_COMMAND=if test -s ../coolwsd; then echo "Cleaning up..." && ../coolwsd --disable-cool-user-checking --cleanup --o:logging.level=trace; fi
|
2020-06-28 17:30:22 +02:00
|
|
|
|
2016-04-05 18:41:10 +02:00
|
|
|
if HAVE_LO_PATH
|
2016-10-11 14:26:02 +02:00
|
|
|
check-local:
|
2022-02-11 00:12:43 +01:00
|
|
|
@$(CLEANUP_COMMAND)
|
2022-04-18 18:04:00 +02:00
|
|
|
@UNITTEST=1 ./fakesockettest 2> test.log || (cat test.log && /bin/false)
|
2017-04-05 15:44:44 +02:00
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
2022-02-11 00:12:43 +01:00
|
|
|
@echo "Done test check-local"
|
2020-01-17 21:49:38 +01:00
|
|
|
|
|
|
|
TESTS = \
|
2022-03-06 15:07:21 +01:00
|
|
|
${all_la_unit_tests} \
|
2021-04-13 23:05:36 +02:00
|
|
|
unithttplib
|
2020-01-20 16:26:54 +01:00
|
|
|
|
2016-04-05 18:41:10 +02:00
|
|
|
endif
|
|
|
|
|
2019-05-27 09:09:49 +02:00
|
|
|
TEST_EXTENSIONS = .la
|
2020-09-30 23:23:10 +02:00
|
|
|
LA_LOG_DRIVER = ${top_builddir}/test/run_unit.sh
|
2022-06-22 13:49:14 +02:00
|
|
|
LOG_DRIVER = ${top_builddir}/test/run_unit_standalone.sh
|
2016-04-15 17:39:05 +02:00
|
|
|
|
2023-06-07 13:31:02 +02:00
|
|
|
EXTRA_DIST = data/delta-text.png data/delta-text2.png data/delta-graphic.png data/delta-graphic2.png data/hello.odt data/hello.txt $(test_SOURCES) $(unittest_SOURCES) run_unit.sh run_unit_standalone.sh
|
2016-05-13 00:40:59 +02:00
|
|
|
|
|
|
|
check_valgrind: all
|
2017-04-05 15:44:44 +02:00
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
2016-05-13 00:40:59 +02:00
|
|
|
./run_unit.sh --log-file test.log --trs-file test.trs --valgrind
|
|
|
|
|
2016-09-30 10:43:04 +02:00
|
|
|
# run unittest during the normal build
|
|
|
|
all-local: unittest
|
|
|
|
@echo
|
|
|
|
@echo "Running build-time unit tests. For more thorough testing, please run 'make check'."
|
2022-02-11 00:12:43 +01:00
|
|
|
@echo "Test output is in `pwd`/test.log and is displayed on failure."
|
2016-09-30 10:43:04 +02:00
|
|
|
@echo
|
2017-04-05 15:44:44 +02:00
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
2022-04-18 18:04:00 +02:00
|
|
|
@UNITTEST=1 ${top_builddir}/test/unittest 2> test.log || (cat test.log && /bin/false)
|
2022-02-11 00:12:43 +01:00
|
|
|
@echo "Done test all-local"
|
|
|
|
@$(CLEANUP_COMMAND)
|
2021-07-21 16:51:47 +02:00
|
|
|
|
|
|
|
.PRECIOUS: $(TEST_LOGS)
|
2023-06-15 22:35:05 +02:00
|
|
|
endif
|