This testing script should return a non-exit code when one of the
compilations fail.
Change-Id: Ie15bc5779372dd31d784eaffdee4b04abb9a1b11
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32097
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
touch "${exits}"
echo "compiler,build_target,exit_code" >> "${exits}"
+exit_code=0 # We return a non-zero exit code if any of the compilations fail.
+
for compiler in ${images[@]}; do
echo "Starting build tests with '${compiler}'..."
# Generate a randomized list of build targets
echo "${compiler},${build}/gem5${build_opt},${result}" >>"${exits}"
if [ ${result} -ne 0 ]; then
+ exit_code=1
echo " ! Failed with exit code ${result}."
else
echo " Done."
done
mv "${test_dir}" "${test_dir_final}"
+
+exit ${exit_code}