Add "--parallel-program=X" option to test runner.

This is done to run test programs in parallel that are not simulations,
and therefore do not produce the standard (for this module) pattern of
outputs for comparison.
This commit is contained in:
Atgeirr Flø Rasmussen 2020-01-23 09:47:34 +01:00
parent 4a0effe8cc
commit 7d3690ee99

View File

@ -109,6 +109,21 @@ case "$TEST_TYPE" in
exit 0
;;
"--parallel-program="*)
NUM_PROCS="${TEST_TYPE/--parallel-program=/}"
echo "executing \"mpirun -np \"$NUM_PROCS\" $TEST_BINARY $TEST_ARGS\""
mpirun -np "$NUM_PROCS" "$TEST_BINARY" $TEST_ARGS | tee "test-$RND.log"
RET="${PIPESTATUS[0]}"
if test "$RET" != "0"; then
echo "Executing the binary failed!"
rm "test-$RND.log"
exit 1
fi
exit 0
;;
"--parallel-simulation="*)
NUM_PROCS="${TEST_TYPE/--parallel-simulation=/}"