Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions tests/integrate/Autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,35 @@ for dir in $testdir; do
mpirun -np $np $abacus > log.txt
fi

# if ABACUS failed, print out the error message
if [ $? -ne 0 ]; then
echo -e "\e[0;31m[ERROR ]\e[0m $dir failed."
let failed++
failed_case_list+=$dir'\n'
case_status+=$dir' 0\n'
cat log.txt
else
# check the output
test -d OUT.autotest || (echo "No 'OUT.autotest' dir presented. Some errors may happened in ABACUS." && exit 1)
if test -z $g
then
bash -e ../../integrate/tools/catch_properties.sh result.out
if [ $? -ne 0 ]; then
echo -e "\e[0;31m [ERROR ] Fatal Error in catch_properties.sh \e[0m"
let fatal++
fatal_case_list+=$dir'\n'
else
my_threshold=$(get_threshold $threshold_file "threshold" $threshold)
my_force_threshold=$(get_threshold $threshold_file "force_threshold" $force_threshold)
my_stress_threshold=$(get_threshold $threshold_file "stress_threshold" $stress_threshold)
my_fatal_threshold=$(get_threshold $threshold_file "fatal_threshold" $fatal_threshold)
check_out result.out $my_threshold $my_force_threshold $my_stress_threshold $my_fatal_threshold
fi
else
../tools/catch_properties.sh result.ref
fi
fi

if [ "$sanitize" == true ]; then
echo -e "## Test case ${dir}\n" >> ${report}
for diagnostic in asan.*; do
Expand All @@ -265,25 +294,6 @@ for dir in $testdir; do
echo -e "\`\`\`\n" >> ${report}
done
fi
#$abacus > log.txt
test -d OUT.autotest || (echo "No 'OUT.autotest' dir presented. Some errors may happened in ABACUS." && exit 1)
if test -z $g
then
bash -e ../../integrate/tools/catch_properties.sh result.out
if [ $? -ne 0 ]; then
echo -e "\e[0;31m [ERROR ] Fatal Error in catch_properties.sh \e[0m"
let fatal++
fatal_case_list+=$dir'\n'
else
my_threshold=$(get_threshold $threshold_file "threshold" $threshold)
my_force_threshold=$(get_threshold $threshold_file "force_threshold" $force_threshold)
my_stress_threshold=$(get_threshold $threshold_file "stress_threshold" $stress_threshold)
my_fatal_threshold=$(get_threshold $threshold_file "fatal_threshold" $fatal_threshold)
check_out result.out $my_threshold $my_force_threshold $my_stress_threshold $my_fatal_threshold
fi
else
../tools/catch_properties.sh result.ref
fi
}
echo ""
cd ../
Expand Down
Loading