[Libreoffice-commits] online.git: Branch 'feature/parallel_cypress' - 2 commits - cypress_test/Makefile.am
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 2 19:11:26 UTC 2020
cypress_test/Makefile.am | 44 ++++++++++++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 14 deletions(-)
New commits:
commit 0986466e4aa7fbdd89e690120448bfff027b924c
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Mar 2 20:03:15 2020 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Mon Mar 2 20:03:15 2020 +0100
remove this
Change-Id: If697f1399ab97d709025181380b279b27c5daea8
diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index a0e9476df..13a769f08 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -92,13 +92,6 @@ $(DESKTOP_TEST_FILES_DONE): $(PID_FILE)
@$(foreach done_file,$(DESKTOP_TEST_FILES_DONE),mkdir -p $(dir $(done_file)) && touch $(done_file) &&) true\
)
-check-seq: @JAILS_PATH@ $(NODE_BINS)
- $(call run_JS_error_check)
- $(call start_loolwsd)
- $(call run_desktop_tests)
- $(call run_mobile_tests)
- @$(KILL_COMMAND) || true
-
check-desktop: @JAILS_PATH@ $(NODE_BINS)
$(call run_JS_error_check)
$(call start_loolwsd)
commit 07bdb0cf90af98ab301238c36e483e7e881f61ce
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Mar 2 17:15:38 2020 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Mon Mar 2 19:57:19 2020 +0100
parallel-cypress: improve console output of parallel test run.
Change-Id: I29440bafdba101c3f4e86de7d587330b972289de
diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 29285e3f3..a0e9476df 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -8,6 +8,7 @@ GET_PORT_BINARY = $(abs_builddir)/node_modules/get-port-cli/cli.js
NPM_INSTALLED = $(abs_builddir)/workdir/npm_installed
PID_FILE=$(abs_builddir)/workdir/loolwsd.pid
+ERROR_LOG=$(abs_builddir)/workdir/error.log
DESKTOP_USER_AGENT = "cypress"
DESKTOP_TEST_FOLDER = $(abs_srcdir)/integration_tests/desktop
@@ -57,18 +58,23 @@ MOBILE_TEST_FILES_DONE= \
DESKTOP_TEST_FILES_DONE= \
$(foreach test_file,$(DEKSTOP_TEST_FILES),$(DESKTOP_TRACK_FOLDER)/$(test_file).done)
-check-local: $(DESKTOP_TEST_FILES_DONE) $(MOBILE_TEST_FILES_DONE)
+check-local: do-check
+ $(if $(wildcard $(ERROR_LOG)),$(error Cypress test failure!))
+
+do-check: $(DESKTOP_TEST_FILES_DONE) $(MOBILE_TEST_FILES_DONE)
@$(KILL_COMMAND) || true
$(if $(HEADLESS_BUILD), at pkill Xvfb,)
+ $(if $(wildcard $(ERROR_LOG)), at cat $(ERROR_LOG))
$(PID_FILE): @JAILS_PATH@ $(NODE_BINS)
+ @rm -f $(ERROR_LOG)
$(call run_JS_error_check)
$(if $(HEADLESS_BUILD),$(call start_Xvfb),)
$(call start_loolwsd)
$(MOBILE_TEST_FILES_DONE): $(PID_FILE)
$(if $(PARALLEL_BUILD),\
- $(call run_mobile_tests,$(subst $(MOBILE_TRACK_FOLDER)/,,$(basename $@))),\
+ $(call run_mobile_tests,$(subst $(MOBILE_TRACK_FOLDER)/,,$(basename $@)),$(basename $@).log),\
$(call run_mobile_tests))
$(if $(PARALLEL_BUILD),\
@mkdir -p $(dir $@) && touch $@\
@@ -78,7 +84,7 @@ $(MOBILE_TEST_FILES_DONE): $(PID_FILE)
$(DESKTOP_TEST_FILES_DONE): $(PID_FILE)
$(if $(PARALLEL_BUILD),\
- $(call run_desktop_tests,$(subst $(DESKTOP_TRACK_FOLDER)/,,$(basename $@))),\
+ $(call run_desktop_tests,$(subst $(DESKTOP_TRACK_FOLDER)/,,$(basename $@)),$(basename $@).log),\
$(call run_desktop_tests))
$(if $(PARALLEL_BUILD),\
@mkdir -p $(dir $@) && touch $@\
@@ -169,8 +175,12 @@ 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)) \
- || ($(KILL_COMMAND) && false))
- $(if $(PARALLEL_BUILD), at echo "`echo $(RUN_COMMAND) && $(RUN_COMMAND)`",$(RUN_COMMAND))
+ $(if $(PARALLEL_BUILD),,|| ($(KILL_COMMAND) && false)))
+ $(if $(PARALLEL_BUILD),\
+ $(call execute_run_parallel,$(RUN_COMMAND),$(2))\
+ ,\
+ $(RUN_COMMAND)\
+ )
endef
define run_mobile_tests
@@ -182,8 +192,21 @@ 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)) \
- || ($(KILL_COMMAND) && false))
- $(if $(PARALLEL_BUILD), at echo "`echo $(RUN_COMMAND) && $(RUN_COMMAND)`",$(RUN_COMMAND))
+ $(if $(PARALLEL_BUILD),,|| ($(KILL_COMMAND) && false)))
+ $(if $(PARALLEL_BUILD),\
+ $(call execute_run_parallel,$(RUN_COMMAND),$(2))\
+ ,\
+ $(RUN_COMMAND)\
+ )
+endef
+
+define execute_run_parallel
+ @mkdir -p $(dir $(2)) && touch $(2) && \
+ echo "`echo $(1) && $(1)`" > $(2) 2>&1 && \
+ if [ `grep -o "CypressError" $(2)` ];\
+ then cat $(2) >> $(ERROR_LOG);\
+ else cat $(2);\
+ fi;
endef
NODE_BINS = \
More information about the Libreoffice-commits
mailing list