Added timeout to unit tests

Cette révision appartient à :
Yiltan Temucin
2024-12-06 14:02:56 -06:00
Parent d08ea96ea3
révision 98c164d72e
+2 -1
Voir le fichier
@@ -28,12 +28,13 @@ binary_name=$1
mode=$2
timestamp=$(date "+%Y-%m-%d-%H:%M:%S")
log_file="unit_tests_${timestamp}.log"
mpi_timeout=$((20 * 60)) # 20 minutes in seconds
# Function to execute mpirun command
function run_mpirun {
local np=$1
local gtest_filter=$2
cmd_str="mpirun -np $np $binary_name --gtest_filter=$gtest_filter >> $log_file 2>&1"
cmd_str="mpirun -np $np --timeout $mpi_timeout $binary_name --gtest_filter=$gtest_filter >> $log_file 2>&1"
echo $cmd_str
eval $cmd_str