[Libreoffice-commits] online.git: cypress_test/cypress.json cypress_test/integration_tests cypress_test/Makefile.am cypress_test/run_parallel.sh
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 18 10:51:04 UTC 2020
cypress_test/Makefile.am | 2 -
cypress_test/cypress.json | 6 +++
cypress_test/integration_tests/multiuser/calc/sheet_operations_user1_spec.js | 2 -
cypress_test/integration_tests/multiuser/calc/sheet_operations_user2_spec.js | 2 -
cypress_test/integration_tests/multiuser/impress/slide_operations_user1_spec.js | 2 -
cypress_test/integration_tests/multiuser/impress/slide_operations_user2_spec.js | 2 -
cypress_test/integration_tests/multiuser/writer/paragraph_prop_user1_spec.js | 2 -
cypress_test/integration_tests/multiuser/writer/paragraph_prop_user2_spec.js | 2 -
cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user1_spec.js | 2 -
cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user2_spec.js | 2 -
cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js | 2 -
cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js | 2 -
cypress_test/run_parallel.sh | 16 ----------
13 files changed, 16 insertions(+), 28 deletions(-)
New commits:
commit 5c2f5eac2e051773e0db7da9e82ba4b82e4256e8
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Sep 17 15:30:31 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 18 12:50:45 2020 +0200
cypress: use built-in test retries.
It's more effective, since it reruns only the failing test,
not the whole test suite. Also it has a nicer output.
Change-Id: I8a50a20366b76a5cedb4e9383220c53f367c5a68
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102995
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 429473e30..518bf3f01 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -328,7 +328,6 @@ define run_desktop_tests
--spec $(1) \
--type desktop \
--log-file $(2) \
- --second-chance \
,\
$(CYPRESS_BINARY) run \
--browser $(BROWSER) \
@@ -351,7 +350,6 @@ define run_mobile_tests
--spec $(1) \
--type mobile \
--log-file $(2) \
- --second-chance \
,\
$(CYPRESS_BINARY) run \
--browser $(BROWSER) \
diff --git a/cypress_test/cypress.json b/cypress_test/cypress.json
index 2feecac35..3673ea2e9 100644
--- a/cypress_test/cypress.json
+++ b/cypress_test/cypress.json
@@ -6,5 +6,9 @@
"testFiles" : "**/*_spec.js",
"modifyObstructiveCode": false,
"fixturesFolder" : "data",
- "chromeWebSecurity": false
+ "chromeWebSecurity": false,
+ "retries": {
+ "runMode": 1,
+ "openMode": 0
+ }
}
diff --git a/cypress_test/integration_tests/multiuser/calc/sheet_operations_user1_spec.js b/cypress_test/integration_tests/multiuser/calc/sheet_operations_user1_spec.js
index 5773e2926..a0ce8cba5 100644
--- a/cypress_test/integration_tests/multiuser/calc/sheet_operations_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/calc/sheet_operations_user1_spec.js
@@ -2,7 +2,7 @@
var helper = require('../../common/helper');
-describe('Sheet operations: user-1.', function() {
+describe('Sheet operations: user-1.', {retries : 0}, function() {
var testFileName = 'sheet_operations.ods';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/calc/sheet_operations_user2_spec.js b/cypress_test/integration_tests/multiuser/calc/sheet_operations_user2_spec.js
index 6cc9cf8cb..997dc8687 100644
--- a/cypress_test/integration_tests/multiuser/calc/sheet_operations_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/calc/sheet_operations_user2_spec.js
@@ -2,7 +2,7 @@
var helper = require('../../common/helper');
-describe('Sheet operations: user-2.', function() {
+describe('Sheet operations: user-2.', {retries : 0}, function() {
var testFileName = 'sheet_operations.ods';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/impress/slide_operations_user1_spec.js b/cypress_test/integration_tests/multiuser/impress/slide_operations_user1_spec.js
index 4903b9f2d..6fd60d013 100644
--- a/cypress_test/integration_tests/multiuser/impress/slide_operations_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/impress/slide_operations_user1_spec.js
@@ -3,7 +3,7 @@
var helper = require('../../common/helper');
var impressHelper = require('../../common/impress_helper');
-describe('Slide operations: user-1.', function() {
+describe('Slide operations: user-1.', {retries : 0}, function() {
var testFileName = 'slide_operations.odp';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/impress/slide_operations_user2_spec.js b/cypress_test/integration_tests/multiuser/impress/slide_operations_user2_spec.js
index 4f8124bd5..b50cfe6d3 100644
--- a/cypress_test/integration_tests/multiuser/impress/slide_operations_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/impress/slide_operations_user2_spec.js
@@ -3,7 +3,7 @@
var helper = require('../../common/helper');
var impressHelper = require('../../common/impress_helper');
-describe('Slide operations: user-2.', function() {
+describe('Slide operations: user-2.', {retries : 0}, function() {
var testFileName = 'slide_operations.odp';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user1_spec.js b/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user1_spec.js
index c92b94371..152699433 100644
--- a/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user1_spec.js
@@ -2,7 +2,7 @@
var helper = require('../../common/helper');
-describe('Change paragraph properties: user-1.', function() {
+describe('Change paragraph properties: user-1.', {retries : 0}, function() {
var testFileName = 'paragraph_prop.odt';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user2_spec.js b/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user2_spec.js
index 4dce2446a..542e2218b 100644
--- a/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/writer/paragraph_prop_user2_spec.js
@@ -2,7 +2,7 @@
var helper = require('../../common/helper');
-describe('Change paragraph properties: user-2.', function() {
+describe('Change paragraph properties: user-2.', {retries : 0}, function() {
var testFileName = 'paragraph_prop.odt';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user1_spec.js b/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user1_spec.js
index 75dda6343..9e9dad435 100644
--- a/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user1_spec.js
@@ -3,7 +3,7 @@
var helper = require('../../common/helper');
var desktopHelper = require('../../common/desktop_helper');
-describe('Sidebar visibility: user-1.', function() {
+describe('Sidebar visibility: user-1.', {retries : 0}, function() {
var testFileName = 'sidebar_visibility.odt';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user2_spec.js b/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user2_spec.js
index 926f98ada..517eaac48 100644
--- a/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/writer/sidebar_visibility_user2_spec.js
@@ -2,7 +2,7 @@
var helper = require('../../common/helper');
-describe('Sidebar visibility: user-2.', function() {
+describe('Sidebar visibility: user-2.', {retries : 0}, function() {
var testFileName = 'sidebar_visibility.odt';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
index 8cccd8dc4..39922a720 100644
--- a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
@@ -2,7 +2,7 @@
var helper = require('../../common/helper');
-describe('Simultaneous typing: user-1.', function() {
+describe('Simultaneous typing: user-1.', {retries : 0}, function() {
var testFileName = 'simultaneous_typing.odt';
beforeEach(function() {
diff --git a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
index e7d79872b..6d1d3dab1 100644
--- a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
@@ -2,7 +2,7 @@
var helper = require('../../common/helper');
-describe('Simultaneous typing: user-2.', function() {
+describe('Simultaneous typing: user-2.', {retries : 0}, function() {
var testFileName = 'simultaneous_typing.odt';
beforeEach(function() {
diff --git a/cypress_test/run_parallel.sh b/cypress_test/run_parallel.sh
index 48feecef6..f7c83dc03 100755
--- a/cypress_test/run_parallel.sh
+++ b/cypress_test/run_parallel.sh
@@ -37,7 +37,6 @@ while test $# -gt 0; do
--env) TEST_ENV=$2; shift;;
--type) TEST_TYPE=$2; shift;;
--browser) BROWSER=$2; shift;;
- --second-chance) SECOND_CHANCE=true; shift;;
--help) print_help ;;
-*) ;; # ignore
esac
@@ -88,25 +87,12 @@ print_error() {
fi
}
-echo_command_run() {
- echo "`echo ${RUN_COMMAND} && ${RUN_COMMAND} || touch ${TEST_ERROR}`"
-}
-
mkdir -p `dirname ${TEST_LOG}`
touch ${TEST_LOG}
rm -rf ${TEST_ERROR}
-echo_command_run > ${TEST_LOG} 2>&1
+echo "`echo ${RUN_COMMAND} && ${RUN_COMMAND} || touch ${TEST_ERROR}`" > ${TEST_LOG} 2>&1
if [ ! -f ${TEST_ERROR} ];
then cat ${TEST_LOG};
- elif [ ${SECOND_CHANCE} = true ];
- then echo "Second chance!" > ${TEST_LOG} && \
- rm -rf ${TEST_ERROR} && \
- echo_command_run >> ${TEST_LOG} 2>&1 && \
- if [ ! -f ${TEST_ERROR} ];\
- then cat ${TEST_LOG};\
- else cat ${TEST_LOG} >> ${ERROR_LOG} && \
- print_error; \
- fi;
else cat ${TEST_LOG} >> ${ERROR_LOG} && \
print_error;
fi;
More information about the Libreoffice-commits
mailing list