[Libreoffice-commits] online.git: cypress_test/run_iteratively.sh

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 10 11:38:05 UTC 2020


 cypress_test/run_iteratively.sh |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

New commits:
commit bc9f0579e3d78bbe9bcd92e769b9cfcf6698e650
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Apr 10 13:08:50 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Apr 10 13:37:48 2020 +0200

    cypress: add run_iteratively.sh for catching inconsistent test failures.
    
    It's useful to run a test suite more times, until it fails
    when a failure comes up randomly.
    
    Change-Id: I33708eff1db65f571c2cde323aaa683e6e1676e7
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92031
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cypress_test/run_iteratively.sh b/cypress_test/run_iteratively.sh
new file mode 100755
index 000000000..3d8050374
--- /dev/null
+++ b/cypress_test/run_iteratively.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+if [ "$#" -ne 2 ]; then
+    echo "Illegal number of parameters"
+    echo "Usage: ./run_iteratively <test_type> <test_suite>"
+    echo "e.g: ./run_iteratively mobile writer/shape_properties_spec.js"
+    exit 1
+fi
+
+loop_count=10
+
+if [ $1 = "mobile" ]
+then
+    command="make check-mobile spec="$2
+else
+    command="make check-desktop spec="$2
+fi
+
+i=0
+while $command
+do
+    if [ $i -ge $loop_count ]
+    then
+        break
+    fi
+    i=$((i+1))
+done


More information about the Libreoffice-commits mailing list