summaryrefslogtreecommitdiffhomepage
path: root/android/scripts/run-instrumented-tests-repeat.sh
blob: 2db1ba7c9a79cf5d5ee2f6a5603f631ffc27c92c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

# Help script to invoke run-instrumented-tests.sh multiple times.
#
# Usage:
# run-instrumented-tests-repeat.sh <repeat-count> [<args>]
#
# Example:
# run-instrumented-tests-repeat.sh 2 --test-type mockapi --infra-flavor prod --billing-flavor oss

set -eu

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"

REPEAT_COUNT=$1

for ((i=1; i <= REPEAT_COUNT; i++))
do
    echo "### Run $i ###"
    ./run-instrumented-tests.sh "${@:2}"
done