cypress_test/Makefile.am | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
New commits: commit be9333bf5bc41403f369b0543a353eb9381f1e23 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Thu Feb 20 10:03:42 2020 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Thu Feb 20 13:13:52 2020 +0100 cypress: try harder to kill loolwsd server. pkill uses SIGTERM signal by default, which is good because using that makes loolwsd to clean up things before shut down. For example it removes the pid file. However, when loolwsd stuck for any reason, then SIGTERM might not be effective. In this case use SIGKILL. Change-Id: I3ed4bd24d6e73169b4d04dd7c9b4ac03bee8fdd1 diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am index f0a4804e1..e7ca4d75b 100644 --- a/cypress_test/Makefile.am +++ b/cypress_test/Makefile.am @@ -17,25 +17,27 @@ MOBILE_WORKDIR = ${abs_builddir}/workdir/mobile/ ALLOWED_PORTS = $(shell seq 9900 1 9980) FREE_PORT=$(shell node_modules/get-port-cli/cli.js --host=127.0.0.1 $(ALLOWED_PORTS)) +KILL_COMMAND=pkill -F $(PID_FILE) || pkill --signal SIGKILL -F $(PID_FILE) + if HAVE_LO_PATH check-local: @JAILS_PATH@ node_modules $(call run_JS_error_check) $(call start_loolwsd) $(call run_desktop_tests) $(call run_mobile_tests) - @pkill -F $(PID_FILE) || true + @$(KILL_COMMAND) || true check-desktop: @JAILS_PATH@ node_modules $(call run_JS_error_check) $(call start_loolwsd) $(call run_desktop_tests,$(spec)) - @pkill -F $(PID_FILE) || true + @$(KILL_COMMAND) || true check-mobile: @JAILS_PATH@ node_modules $(call run_JS_error_check) $(call start_loolwsd) $(call run_mobile_tests,$(spec)) - @pkill -F $(PID_FILE) || true + @$(KILL_COMMAND) || true run-desktop: @JAILS_PATH@ node_modules $(call start_loolwsd) @@ -45,7 +47,7 @@ run-desktop: @JAILS_PATH@ node_modules $(CYPRESS_BINARY) open --config integrationFolder=$(DESKTOP_TEST_FOLDER),userAgent=$(DESKTOP_USER_AGENT) \ --env DATA_FOLDER=$(DESKTOP_DATA_FOLDER),WORKDIR=$(DESKTOP_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT) \ || true - @pkill -F $(PID_FILE) || true + @$(KILL_COMMAND) || true run-mobile: @JAILS_PATH@ node_modules $(call start_loolwsd) @@ -55,7 +57,7 @@ run-mobile: @JAILS_PATH@ node_modules $(CYPRESS_BINARY) open --config integrationFolder=$(MOBILE_TEST_FOLDER),userAgent=$(MOBILE_USER_AGENT) \ --env DATA_FOLDER=$(MOBILE_DATA_FOLDER),WORKDIR=$(MOBILE_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT) \ || true - @pkill -F $(PID_FILE) || true + @$(KILL_COMMAND) || true define run_JS_error_check @echo "Checking for JS errors in test code..." @@ -91,7 +93,7 @@ define run_desktop_tests --headless \ --env DATA_FOLDER=$(DESKTOP_DATA_FOLDER),WORKDIR=$(DESKTOP_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT) \ $(if $(1), --spec=${abs_dir}/integration_tests/desktop/$(1)) \ - || (@pkill -F $(PID_FILE) && false) + || ($(KILL_COMMAND) && false) endef define run_mobile_tests @@ -103,7 +105,7 @@ define run_mobile_tests --headless \ --env DATA_FOLDER=$(MOBILE_DATA_FOLDER),WORKDIR=$(MOBILE_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT) \ $(if $(1), --spec=$(abs_dir)/integration_tests/mobile/$(1)) \ - || (@pkill -F $(PID_FILE) && false) + || ($(KILL_COMMAND) && false) endef node_modules: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits