-
Notifications
You must be signed in to change notification settings - Fork 10
/
backtest-branches.sh
executable file
·42 lines (33 loc) · 1.22 KB
/
backtest-branches.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
#CONFIGFILE="cluster-test.json"
BASEDIR=$(realpath $(dirname "$0"))
for CONFIGFILE in "stress-facets-local.json"
do
cd $BASEDIR
while read i; do
_LOCALREPO=$BASEDIR/SolrNightlyBenchmarksWorkDirectory/Download/`echo $i | jq -r '."name"'`
_REPOSRC=`echo $i | jq -r '."url"'`
_LOCALREPO_VC_DIR=$REPO/.git
_BUILDCOMMAND=`echo $i | jq -r '."build-command"'`
cd $_LOCALREPO
git fetch
if [[ $_BUILDCOMMAND == *"gradlew"* ]]; then
PREFIX="releases/solr/9"
else
PREFIX="releases/lucene-solr/8.11"
fi
for tag in `git tag|grep "$PREFIX"`; do
echo "Tag: $tag"
COMMIT=`git show-ref $tag| cut -f 1 -d ' '`
git reset --hard; git clean -fdx
git checkout $COMMIT
if [ -f "$BASEDIR/suites/results/results-$CONFIGFILE-$COMMIT.json" ]; then
echo "Result file already exists for $COMMIT"
else
echo "Testing $COMMIT for tag $tag"
$BASEDIR/cleanup.sh
$BASEDIR/stress.sh -c $COMMIT $BASEDIR/suites/$CONFIGFILE
#cd $BASEDIR; python createGraphBranches.py && cp $CONFIGFILE.html /var/www/html; cd -
fi
done
done <<< "$(jq -c '.["repositories"][]' suites/$CONFIGFILE)"
done