summaryrefslogtreecommitdiff
path: root/cypress_test/run_iteratively.sh
blob: f7ba93b598f2964b7400e613e697ac2f178de60c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/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
elif [ $1 = "desktop" ]; then
    command="make check-desktop spec="$2
else
    command="make check-multi spec="$2
fi

i=0
while $command
do
    if [ $i -ge $loop_count ]
    then
        break
    fi
    i=$((i+1))
done