Skip to content

Commit e03a226

Browse files
committed
wip: Fix bash error
1 parent adc00f7 commit e03a226

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

benchmark/load/run.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ fi
1414
source "${UTILS_DIR}/update-java-version.sh" 17
1515

1616
for app in *; do
17+
if [[ ! -d "${app}" ]]; then
18+
continue
19+
fi
20+
21+
message "${type} benchmark: ${app} started"
22+
1723
export OUTPUT_DIR="${REPORTS_DIR}/${type}/${app}"
24+
mkdir -p ${OUTPUT_DIR}
1825

1926
if [ "${app}" == "petclinic" ]; then
2027
HEALTHCHECK_URL=http://localhost:8080
@@ -26,5 +33,10 @@ for app in *; do
2633
fi
2734

2835
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'"
36+
(
37+
cd ${app} &&
38+
bash -c "${CPU_AFFINITY_K6}${UTILS_DIR}/run-k6-load-test.sh ${HEALTHCHECK_URL} ${OUTPUT_DIR} 'pkill java'"
39+
)
40+
41+
message "${type} benchmark: ${app} finished"
3042
done

0 commit comments

Comments
 (0)