Skip to content
Permalink
Browse files
Fixes parameter parsing in AWS scripts.
  • Loading branch information
pivotal-jbarrett committed Apr 18, 2019
1 parent e4e0953 commit 43ea8eded9f15feafc771d7bdec80cfbd969ee98
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 39 deletions.
@@ -24,7 +24,7 @@ BENCHMARK_BRANCH='develop'

REPO='https://github.com/apache/geode'

while :; do
while (( "$#" )); do
case $1 in
-t|--tag )
if [ "$2" ]; then
@@ -50,10 +50,8 @@ while :; do
;;
-?* )
printf 'Invalid option: %s\n' "$1" >&2
break
exit 1
;;
* )
break
esac
shift
done
@@ -20,7 +20,7 @@
TAG=
CI=

while :; do
while (( "$#" )); do
case $1 in
-t|--tag )
if [ "$2" ]; then
@@ -49,10 +49,8 @@ while :; do
;;
-?* )
printf 'Invalid option: %s\n' "$1" >&2
break
exit 1
;;
* )
break
esac
shift
done
@@ -23,8 +23,8 @@ TAG=
COUNT=
CI=

while :; do
case $1 in
while (( "$#" )); do
case "$1" in
-t|--tag )
if [ "$2" ]; then
TAG=$2
@@ -62,10 +62,8 @@ while :; do
;;
-?* )
printf 'Invalid option: %s\n' "$1" >&2
break
exit 1
;;
* )
break
esac
shift
done
@@ -38,7 +38,7 @@ TAG=
METADATA=
OUTPUT=

while :; do
while (( "$#" )); do
case $1 in
-t|--tag )
if [ "$2" ]; then
@@ -133,10 +133,8 @@ while :; do
;;
-?* )
printf 'Invalid option: %s\n' "$1" >&2
break
exit 1
;;
* )
break
esac
shift
done
@@ -155,47 +153,48 @@ if ! [[ "$OUTPUT" = /* ]]; then
OUTPUT="$(pwd)/${OUTPUT}"
fi

if [[ -z "${VERSION}" ]]; then
if [[ -z "${BASELINE_BRANCH}" ]]; then
./run_tests.sh \
-t ${TAG} \
-r ${REPO} \
-b ${BRANCH} \
-v ${BASELINE_VERSION} \
-p ${BENCHMARK_REPO} \
-e ${BENCHMARK_BRANCH} \
-o ${OUTPUT}/branch \
-o ${OUTPUT}/baseline \
-m "${METADATA}" \
-- "$@"
else
./run_tests.sh \
-t ${TAG} \
-v ${VERSION} \
-r ${BASELINE_REPO} \
-b ${BASELINE_BRANCH} \
-p ${BENCHMARK_REPO} \
-e ${BENCHMARK_BRANCH} \
-o ${OUTPUT}/branch \
-o ${OUTPUT}/baseline \
-m "${METADATA}" \
-- "$@"
fi

if [[ -z "${BASELINE_BRANCH}" ]]; then
if [[ -z "${VERSION}" ]]; then
./run_tests.sh \
-t ${TAG} \
-v ${BASELINE_VERSION} \
-r ${REPO} \
-b ${BRANCH} \
-p ${BENCHMARK_REPO} \
-e ${BENCHMARK_BRANCH} \
-o ${OUTPUT}/baseline \
-o ${OUTPUT}/branch \
-m "${METADATA}" \
-- "$@"
else
./run_tests.sh \
-t ${TAG} \
-r ${BASELINE_REPO} \
-b ${BASELINE_BRANCH} \
-v ${VERSION} \
-p ${BENCHMARK_REPO} \
-e ${BENCHMARK_BRANCH} \
-o ${OUTPUT}/baseline \
-o ${OUTPUT}/branch \
-m "${METADATA}" \
-- "$@"
fi

set +x

./analyze_tests.sh ${OUTPUT}
@@ -24,7 +24,7 @@ BENCHMARK_BRANCH='develop'

REPO='https://github.com/apache/geode'

while :; do
while (( "$#" )); do
case $1 in
-t|--tag )
if [ "$2" ]; then
@@ -50,10 +50,8 @@ while :; do
;;
-?* )
printf 'Invalid option: %s\n' "$1" >&2
break
exit 1
;;
* )
break
esac
shift
done
@@ -34,7 +34,7 @@ METADATA=
OUTPUT=
VERSION=

while :; do
while (( "$#" )); do
case $1 in
-t|--tag )
if [ "$2" ]; then
@@ -108,10 +108,8 @@ while :; do
;;
-?* )
printf 'Invalid option: %s\n' "$1" >&2
break
exit 1
;;
* )
break
esac
shift
done
@@ -195,7 +193,8 @@ instance_id=$(ssh ${SSH_OPTIONS} geode@$FIRST_INSTANCE cat .geode-benchmarks-ide

ssh ${SSH_OPTIONS} geode@${FIRST_INSTANCE} \
rm -rf geode-benchmarks '&&' \
git clone ${BENCHMARK_REPO} --branch ${BENCHMARK_BRANCH}
git clone ${BENCHMARK_REPO} '&&' \
cd geode-benchmarks '&&' git checkout ${BENCHMARK_BRANCH}

BENCHMARK_SHA=$(ssh ${SSH_OPTIONS} geode@${FIRST_INSTANCE} \
cd geode-benchmarks '&&' \
@@ -207,7 +206,7 @@ METADATA="${METADATA},'source_repo':'${GEODE_REPO}','benchmark_repo':'${BENCHMAR

ssh ${SSH_OPTIONS} geode@${FIRST_INSTANCE} \
cd geode-benchmarks '&&' \
./gradlew -PgeodeVersion=${VERSION} benchmark -Phosts=${HOSTS} -Pmetadata="${METADATA}" "$@"
./gradlew -PgeodeVersion=${VERSION} benchmark "-Phosts=${HOSTS}" "-Pmetadata=${METADATA}" "$@"

mkdir -p ${OUTPUT}

0 comments on commit 43ea8ed

Please sign in to comment.