# Investigate exit_code for failures of test executable as well as EXIT_CODE for failures of the test.
# Do not clean up if either fails.
if[[${exit_code}== 0 ]];then
if[[${EXIT_CODE}!= 0 ]];then
printf"\n[FAIL] '${description}' failed after ${time_elapsed}! Test exited with exit code 0 but the logs contained errors, exceptions or non-empty .out files\n\n"
...
...
@@ -58,20 +63,32 @@ function run_test {
fi
fi
if[[${exit_code}!= 0 ]];then
if[[${exit_code}== 0 ]];then
cleanup
else
exit"${exit_code}"
fi
}
# Shuts down the cluster and cleans up all temporary folders and files. Make sure to clean up even in case of failures.
# Shuts down cluster and reverts changes to cluster configs
function cleanup_proc {
shutdown_all
revert_default_config
}
# Cleans up all temporary folders and files
function cleanup_tmp_files {
clean_log_files
rm-rf${TEST_DATA_DIR} 2> /dev/null
echo"Deleted ${TEST_DATA_DIR}"
}
# Shuts down the cluster and cleans up all temporary folders and files.