.gitignore | 1 + Makefile.am | 22 ++++++++++++++++------ configure.ac | 2 ++ test/run_unit.sh.in | 4 ++++ 4 files changed, 23 insertions(+), 6 deletions(-)
New commits: commit 04feab241ff3356789ee9f2f8133590eb7981fe2 Author: Andras Timar <andras.ti...@collabora.com> Date: Wed May 9 13:34:14 2018 +0200 use local tile cache directory for tests Change-Id: I4c66a45df93bee22131c5950029cffa863d397b0 Reviewed-on: https://gerrit.libreoffice.org/54028 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/.gitignore b/.gitignore index 8f1313bd3..697c13843 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ common/support-public-key.hpp systemplate test-driver jails +cache test/data/hello-world.odt *.o diff --git a/Makefile.am b/Makefile.am index 8107c3539..938a60fc0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -238,37 +238,43 @@ $(SYSTEM_STAMP) : ${top_srcdir}/loolwsd-systemplate-setup @JAILS_PATH@ : mkdir -p $@ +@TILECACHE_PATH@ : + mkdir -p $@ + clean-local: if test "z@JAILS_PATH@" != "z"; then rm -rf "@JAILS_PATH@"; fi if test "z@SYSTEMPLATE_PATH@" != "z"; then rm -rf "@SYSTEMPLATE_PATH@"; fi + if test "z@TILECHACHE_PATH@" != "z"; then rm -rf "@TILECHACHE_PATH@"; fi -run: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp +run: all @TILECACHE_PATH@ @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp @echo "Launching loolwsd" @fc-cache "@LO_PATH@"/share/fonts/truetype @cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt @echo ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \ --o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \ + --o:tile_cache_path="@TILECHACHE_PATH@" \ --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ --o:admin_console.username=admin --o:admin_console.password=admin \ --o:logging.file[@enable]=true --o:logging.level=trace -run-valgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp +run-valgrind: all @TILECACHE_PATH@ @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp @echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)" @fc-cache "@LO_PATH@"/share/fonts/truetype @cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes \ ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \ --o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \ + --o:tile_cache_path="@TILECHACHE_PATH@" \ --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ --o:admin_console.username=admin --o:admin_console.password=admin \ --o:logging.file[@enable]=false --o:logging.level=trace -run-gdb: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp +run-gdb: all @TILECACHE_PATH@ @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp @echo "Launching loolwsd under valgrind's callgrind" @fc-cache "@LO_PATH@"/share/fonts/truetype @cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt @@ -276,13 +282,14 @@ run-gdb: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp ./loolwsd --nocaps \ --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \ --o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \ + --o:tile_cache_path="@TILECHACHE_PATH@" \ --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ --o:admin_console.username=admin --o:admin_console.password=admin \ --o:logging.file[@enable]=false --o:logging.level=error -run-callgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp +run-callgrind: all @TILECACHE_PATH@ @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp @echo "Launching loolwsd under valgrind's callgrind" @fc-cache "@LO_PATH@"/share/fonts/truetype @cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt @@ -290,13 +297,14 @@ run-callgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp ./loolwsd --nocaps \ --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \ --o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \ + --o:tile_cache_path="@TILECHACHE_PATH@" \ --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ --o:admin_console.username=admin --o:admin_console.password=admin \ --o:logging.file[@enable]=false --o:logging.level=error -run-strace: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp +run-strace: all @TILECACHE_PATH@ @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp @echo "Launching loolwsd under strace" @fc-cache "@LO_PATH@"/share/fonts/truetype @cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt @@ -304,6 +312,7 @@ run-strace: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp ./loolwsd --nocaps \ --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \ --o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \ + --o:tile_cache_path="@TILECHACHE_PATH@" \ --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ @@ -319,6 +328,7 @@ endif clean-cache cache-clean: # Intentionally don't use "*" below... Avoid risk of accidentally running rm -rf /* test -n "@LOOLWSD_CACHEDIR@" && rm -rf "@LOOLWSD_CACHEDIR@"/[0-9a-f] + test -n "@TILECACHE_PATH@" && rm -rf "@TILECACHE_PATH@"/[0-9a-f] clang-tidy: parallel clang-tidy -header-filter=^$(PWD).* -- $(shell git ls-files|grep /.*cpp$$|grep -v test) @@ -329,7 +339,7 @@ clang-tidy: # capabilities won't survive packaging anyway. Instead, handle it when # installing the RPM or Debian package. -all-local: loolforkit @JAILS_PATH@ $(SYSTEM_STAMP) +all-local: loolforkit @TILECACHE_PATH@ @JAILS_PATH@ $(SYSTEM_STAMP) if ENABLE_SETCAP sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit sudo @SETCAP@ cap_sys_admin=ep loolmount diff --git a/configure.ac b/configure.ac index 4b06186e8..70c6f7d91 100644 --- a/configure.ac +++ b/configure.ac @@ -230,6 +230,7 @@ if test -n "$with_lo_path"; then version_file="$with_lo_path/program/versionrc" if test -f $version_file; then JAILS_PATH="\${abs_top_builddir}/jails" + TILECACHE_PATH="\${abs_top_builddir}/cache" SYSTEMPLATE_PATH="\${abs_top_builddir}/systemplate" have_lo_path=true lo_msg="test against $LO_PATH" @@ -245,6 +246,7 @@ fi AC_SUBST(LO_PATH) AC_DEFINE_UNQUOTED([LO_PATH],["$LO_PATH"],[Path to LibreOffice installation]) AC_SUBST(JAILS_PATH) +AC_SUBST(TILECACHE_PATH) AC_SUBST(SYSTEMPLATE_PATH) AM_CONDITIONAL(HAVE_LO_PATH,[test "$have_lo_path" = "true"]) diff --git a/test/run_unit.sh.in b/test/run_unit.sh.in index 68f592bdf..42e5b11ae 100755 --- a/test/run_unit.sh.in +++ b/test/run_unit.sh.in @@ -11,6 +11,7 @@ abs_top_builddir="${DIR}/.." systemplate_path="@SYSTEMPLATE_PATH@" enable_debug="@ENABLE_DEBUG@" jails_path="@JAILS_PATH@" +tilecache_path="@TILECACHE_PATH@" lo_path="@LO_PATH@" valgrind_cmd="valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes" verbose='' @@ -88,6 +89,7 @@ if test "z$tst" == "z"; then ${abs_top_builddir}/loolwsd --o:sys_template_path="$systemplate_path" \ --o:lo_template_path="$lo_path" \ --o:child_root_path="$jails_path" \ + --o:tile_cache_path="$tilecache_path" \ --o:storage.filesystem[@allow]=true \ --o:logging.level=trace \ --o:logging.file[@enable]=false \ @@ -120,6 +122,7 @@ else # newer unit tests. ${abs_top_builddir}/loolwsd --o:sys_template_path="$systemplate_path" \ --o:lo_template_path="$lo_path" \ --o:child_root_path="$jails_path" \ + --o:tile_cache_path="$tilecache_path" \ --o:storage.filesystem[@allow]=true \ --o:logging.level=trace \ --o:ssl.key_file_path="${abs_top_builddir}/etc/key.pem" \ @@ -136,6 +139,7 @@ else # newer unit tests. echo " $ gdb --args ${abs_top_builddir}/loolwsd --o:sys_template_path=\"$systemplate_path\" \\" echo " --o:lo_template_path=\"$lo_path\" \\" echo " --o:child_root_path=\"$jails_path\" \\" + echo " --o:tile_cache_path=\"$tilecache_path\" \\" echo " --o:storage.filesystem[@allow]=true \\" echo " --o:logging.level=trace \\" echo " --o:ssl.key_file_path=\"${abs_top_builddir}/etc/key.pem\" \\" _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits