@@ -58,6 +58,7 @@ TEMP_SIMULATIONS_DIR_PATH=testTempSimulationsDirectoryPath
5858RESOURCES_DIR_PATH=testResourcesDirectoryPath
5959RESULTS_DIR_PATH=testResultsDirectoryPath
6060START_TIME="2021-09-10 08:45:31"
61+ RUN_STATUS_FILE="${RESULTS_DIR_PATH}/COMPLETED"
6162if [ -z "${START_TIME}" ]; then
6263 START_TIME=$(date +"%Y-%m-%d %H:%M:%S" --utc)
6364fi
@@ -84,9 +85,11 @@ if [ ! -d ${RESULTS_DIR_PATH} ]; then
8485fi
8586gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s testSimulationClass -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH}
8687
87- if [ $? -eq 0 ]; then
88- touch ${RESULTS_DIR_PATH}/COMPLETED
88+ if [ $? -ne 0 ]; then
89+ RUN_STATUS_FILE="${RESULTS_DIR_PATH}/FAILED"
90+ echo "gatling.sh has failed!" 1>&2
8991fi
92+ touch ${RUN_STATUS_FILE}
9093`
9194 Expect (GetGatlingRunnerCommand (simulationsDirectoryPath , tempSimulationsDirectoryPath , resourcesDirectoryPath , resultsDirectoryPath , startTime , simulationClass , generateLocalReport )).To (Equal (expectedValue ))
9295 })
@@ -99,6 +102,7 @@ TEMP_SIMULATIONS_DIR_PATH=testTempSimulationsDirectoryPath
99102RESOURCES_DIR_PATH=testResourcesDirectoryPath
100103RESULTS_DIR_PATH=testResultsDirectoryPath
101104START_TIME="2021-09-10 08:45:31"
105+ RUN_STATUS_FILE="${RESULTS_DIR_PATH}/COMPLETED"
102106if [ -z "${START_TIME}" ]; then
103107 START_TIME=$(date +"%Y-%m-%d %H:%M:%S" --utc)
104108fi
@@ -125,9 +129,11 @@ if [ ! -d ${RESULTS_DIR_PATH} ]; then
125129fi
126130gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s testSimulationClass -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH} -nr
127131
128- if [ $? -eq 0 ]; then
129- touch ${RESULTS_DIR_PATH}/COMPLETED
132+ if [ $? -ne 0 ]; then
133+ RUN_STATUS_FILE="${RESULTS_DIR_PATH}/FAILED"
134+ echo "gatling.sh has failed!" 1>&2
130135fi
136+ touch ${RUN_STATUS_FILE}
131137`
132138 Expect (GetGatlingRunnerCommand (simulationsDirectoryPath , tempSimulationsDirectoryPath , resourcesDirectoryPath , resultsDirectoryPath , startTime , simulationClass , generateLocalReport )).To (Equal (expectedValue ))
133139 })
0 commit comments