[Libreoffice-commits] online.git: cypress_test/Makefile.am

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Wed May 20 19:42:12 UTC 2020


 cypress_test/Makefile.am |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

New commits:
commit 09dec128113ee9ae485065963b118b56cdd4f06b
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed May 20 17:34:28 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed May 20 21:41:54 2020 +0200

    cypress: improve the output in case of error.
    
    Mention also the command for the interactive test runner.
    
    Change-Id: Ia013ea589229542d571d9a587ec85ae05ed6b4da
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94590
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 158016d5f..7a19987be 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -194,18 +194,23 @@ define execute_run_parallel
 		     echo "`echo $(1) && $(1)`" >> $(2) 2>&1 && \
 		     if [ -z `grep -o -m 1 "Error:\|Command failed:" $(2)` ];\
 			then cat $(2);\
-			else cat $(2) >> $(ERROR_LOG)&& \
-			     echo "" >> $(ERROR_LOG) && \
-			     echo "To run this test file call: $(3)" >> $(ERROR_LOG) &&\
-			     echo "" >> $(ERROR_LOG); \
+			else cat $(2) >> $(ERROR_LOG) && \
+			     echo -e $(call error_output_string,$(3)) >> $(ERROR_LOG); \
 		     fi;\
 		else cat $(2) >> $(ERROR_LOG) && \
-		     echo "" >> $(ERROR_LOG) && \
-		     echo "To run this test file call: $(3)" >> $(ERROR_LOG) &&\
-		     echo "" >> $(ERROR_LOG); \
+		     echo -e $(call error_output_string,$(3)) >> $(ERROR_LOG); \
 	fi;
 endef
 
+define error_output_string
+"\n\
+CypressError: a test failed, please do one of the following:\n\n\
+Run the failing test:\n\
+\t$(1)\n\n\
+Open the interactive test runner:\n\
+\t$(if $(findstring mobile,$(1)),make run-mobile,make run-desktop)\n"
+endef
+
 NODE_BINS = \
 	$(CYPRESS_BINARY) \
 	$(ESLINT_BINARY) \


More information about the Libreoffice-commits mailing list