From ea0dff50fdd7821559c38f7d9e6809f396027f05 Mon Sep 17 00:00:00 2001 From: Luhan Cheng <lche0021@student.monash.edu> Date: Thu, 10 Dec 2020 10:43:05 +1100 Subject: [PATCH] record failed module --- smoke_test/smoke_test | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/smoke_test/smoke_test b/smoke_test/smoke_test index b5b87907..d61006d0 100755 --- a/smoke_test/smoke_test +++ b/smoke_test/smoke_test @@ -31,6 +31,7 @@ fi declare -a modules +failed_modules=() IFS_orig=$IFS IFS=$'\n' @@ -50,9 +51,10 @@ for i in $(head -n $NUM_MODULE $USAGE_REPORT); do echo '' > $OUTPUT_DIR/$name/$ver if [ ! -d $TESTCASE_DIR/$name ]; then echo "No testcase for $m found" | tee -a $REPORT - num_notest+=1 + num_notest+=1 else ALL_EXEC=$(find $TESTCASE_DIR/$name -maxdepth 1 -executable -type f) + module_failed=1 for t_case in ${ALL_EXEC}; do if [ $i == 'bintest' ] && ! $BINTEST;then break;fi orig_dir=$PWD @@ -67,17 +69,21 @@ for i in $(head -n $NUM_MODULE $USAGE_REPORT); do minor_error+=1 else num_failed+=1 + module_failed=0 fi echo "$m return non-zero exitcode $exitcode for testcase $t_case" 2>&1 | tee -a $REPORT fi done + if [ module_failed ]; then + echo "$name/$ver" >> $OUTPUT_DIR/failed_modules.txt + fi fi module purge printf "Done" done IFS=$IFS_orig -echo "Summary" 2>&1 | tee -a $REPORT +echo "Testcase summary" 2>&1 | tee -a $REPORT echo "Failed: $num_failed" 2>&1 | tee -a $REPORT echo "Success: $num_success" 2>&1 | tee -a $REPORT echo "minor error: $minor_error, this is often due to executable not having --version option" 2>&1 | tee -a $REPORT -- GitLab