Skip to content

Commit 7badabe

Browse files
committed
wip: Fix bash error
1 parent a5e489f commit 7badabe

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

benchmark/load/run.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
set -ex
44

55
type=$1
6-
app=$2
7-
8-
export OUTPUT_DIR="${REPORTS_DIR}/${type}/${app}"
96

107
if [ -n "$CI_JOB_TOKEN" ]; then
118
# Inside BP, so we can assume 24 CPU cores on the second socket available and set CPU affinity
@@ -16,14 +13,18 @@ fi
1613

1714
source "${UTILS_DIR}/update-java-version.sh" 17
1815

19-
if [ "${app}" == "petclinic" ]; then
20-
HEALTHCHECK_URL=http://localhost:8080
21-
elif [ "${app}" == "insecure-bank" ]; then
22-
HEALTHCHECK_URL=http://localhost:8080/login
23-
else
24-
echo "Unknown app ${app}"
25-
exit 1
26-
fi
16+
for app in *; do
17+
export OUTPUT_DIR="${REPORTS_DIR}/${type}/${app}"
18+
19+
if [ "${app}" == "petclinic" ]; then
20+
HEALTHCHECK_URL=http://localhost:8080
21+
elif [ "${app}" == "insecure-bank" ]; then
22+
HEALTHCHECK_URL=http://localhost:8080/login
23+
else
24+
echo "Unknown app ${app}"
25+
exit 1
26+
fi
2727

28-
bash -c "${UTILS_DIR}/../${type}/${app}/start-servers.sh"
29-
bash -c "${CPU_AFFINITY_K6}${UTILS_DIR}/run-k6-load-test.sh ${HEALTHCHECK_URL} ${OUTPUT_DIR} 'pkill java'"
28+
bash -c "${UTILS_DIR}/../${type}/${app}/start-servers.sh"
29+
bash -c "${CPU_AFFINITY_K6}${UTILS_DIR}/run-k6-load-test.sh ${HEALTHCHECK_URL} ${OUTPUT_DIR} 'pkill java'"
30+
done

0 commit comments

Comments
 (0)