cypress_test/Makefile.am |   42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

New commits:
commit 8c6e24b565bf0a1e8e08cdf8ba2acaa1bae2d947
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Wed Aug 5 14:14:07 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Wed Aug 5 14:56:39 2020 +0200

    cypress: simplify interactive runner rules.
    
    Change-Id: I491eb0c78429981b05a888975380857f7bce8dcd
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100168
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 10527df83..a6ca20c2c 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -149,8 +149,7 @@ run-desktop: @JAILS_PATH@ $(NODE_BINS)
        @echo
        @echo "Open cypress with desktop tests..."
        @echo
-       $(call run_interactive_test,DESKTOP,$(spec)) \
-                       || true
+       $(call run_interactive_desktop,$(spec)) || true
        @$(KILL_COMMAND) || true
 
 run-mobile: @JAILS_PATH@ $(NODE_BINS)
@@ -159,8 +158,7 @@ run-mobile: @JAILS_PATH@ $(NODE_BINS)
        @echo
        @echo "Open cypress with mobile tests..."
        @echo
-       $(call run_interactive_test,MOBILE,$(spec)) \
-                       || true
+       $(call run_interactive_mobile,$(spec)) || true
        @$(KILL_COMMAND) || true
 
 run-multi: @JAILS_PATH@ $(NODE_BINS)
@@ -265,26 +263,30 @@ MULTIUSER_CONFIG = \
 MULTIUSER_ENV = \
        
DATA_FOLDER=$(MULTIUSER_DATA_FOLDER),WORKDIR=$(MULTIUSER_WORKDIR),WSD_VERSION_HASH=$(WSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)"
 
-define run_interactive_test
-       $(if $(2),\
+define run_interactive_desktop
+       $(if $(1),\
                $(CYPRESS_BINARY) run \
                        --browser $(CHROME) \
                        --headed --no-exit \
-                       $(if $(findstring DESKTOP,$(1)),\
-                               --config $(DESKTOP_CONFIG) \
-                               --env $(DESKTOP_ENV) \
-                               
--spec=$(abs_dir)/integration_tests/desktop/$(2)\
-                               ,\
-                               --config $(MOBILE_CONFIG) \
-                               --env $(MOBILE_ENV) \
-                               
--spec=$(abs_dir)/integration_tests/mobile/$(2)),\
+                       --config $(DESKTOP_CONFIG) \
+                       --env $(DESKTOP_ENV) \
+                       --spec=$(abs_dir)/integration_tests/desktop/$(1),\
+               $(CYPRESS_BINARY) open \
+                       --config $(DESKTOP_CONFIG) \
+                       --env $(DESKTOP_ENV))
+endef
+
+define run_interactive_mobile
+       $(if $(1),\
+               $(CYPRESS_BINARY) run \
+                       --browser $(CHROME) \
+                       --headed --no-exit \
+                       --config $(MOBILE_CONFIG) \
+                       --env $(MOBILE_ENV) \
+                       --spec=$(abs_dir)/integration_tests/mobile/$(1),\
                $(CYPRESS_BINARY) open \
-                       $(if $(findstring DESKTOP,$(1)),\
-                               --config $(DESKTOP_CONFIG) \
-                               --env $(DESKTOP_ENV) \
-                               ,\
-                               --config $(MOBILE_CONFIG) \
-                               --env $(MOBILE_ENV) \))
+                       --config $(MOBILE_CONFIG) \
+                       --env $(MOBILE_ENV))
 endef
 
 define run_interactive_multi
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to