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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 24 13:30:47 UTC 2020


 cypress_test/Makefile.am                        |    6 ++++--
 cypress_test/integration_tests/common/helper.js |    4 ++--
 cypress_test/plugins/index.js                   |    4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 5b70bcd4d32444b0635f013a962d5723b4121965
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Jul 24 14:56:55 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Jul 24 15:30:29 2020 +0200

    cypress: avoid spaces in core version string.
    
    It causes issues when passing this string as a
    command line argument.
    
    Change-Id: I9af569c8ab941f392800c3c678085c384bec2908
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99374
    Tested-by: Jenkins
    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 39145115b..c0dab338b 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -39,9 +39,11 @@ DISPLAY_NUMBER = 100
 HEADLESS_BUILD := $(findstring Command failed,$(shell xhost > /dev/null 2>&1 || echo "Command failed, so we are in a headless environment."))
 export DISPLAY=$(if $(HEADLESS_BUILD),:$(DISPLAY_NUMBER),$(shell echo $$DISPLAY))
 
-CORE_VERSION := $(shell "@LO_PATH@"/program/soffice.bin --version 2> /dev/null)
-
 COMMA :=,
+EMPTY :=
+SPACE :=$(EMPTY) $(EMPTY)
+
+CORE_VERSION := $(subst $(SPACE),_,$(shell "@LO_PATH@"/program/soffice.bin --version 2> /dev/null))
 
 if ENABLE_DEBUG
 FILTER_DEBUG=cypress:electron,cypress:launcher
diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js
index 2452e5956..d206d63a8 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -260,9 +260,9 @@ function typeText(selector, text, delayMs=0) {
 function getLOVersion() {
 	var versionString = Cypress.env('LO_CORE_VERSION');
 	if (versionString.includes('Collabora')) {
-		if (versionString.includes(' 6.2.')) {
+		if (versionString.includes('_6.2.')) {
 			return 'cp-6-2';
-		} else if (versionString.includes(' 6.4.')) {
+		} else if (versionString.includes('_6.4.')) {
 			return 'cp-6-4';
 		}
 	}
diff --git a/cypress_test/plugins/index.js b/cypress_test/plugins/index.js
index a6b1771cb..b15e876c6 100644
--- a/cypress_test/plugins/index.js
+++ b/cypress_test/plugins/index.js
@@ -41,9 +41,9 @@ function plugin(on, config) {
 function getLOVersion(config) {
 	var versionString = config.env.LO_CORE_VERSION;
 	if (versionString.includes('Collabora')) {
-		if (versionString.includes(' 6.2.')) {
+		if (versionString.includes('_6.2.')) {
 			return 'cp-6-2';
-		} else if (versionString.includes(' 6.4.')) {
+		} else if (versionString.includes('_6.4.')) {
 			return 'cp-6-4';
 		}
 	}


More information about the Libreoffice-commits mailing list