https://gitlab.com/eztrace/eztrace/-/merge_requests/15

---
 test/mpi/run.sh           |    3 ++-
 test/mpi/test_mpi_ping.sh |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/test/mpi/run.sh
+++ b/test/mpi/run.sh
@@ -3,7 +3,8 @@
 source ../test_utils/test_utils.sh
 
 check_dependencies eztrace eztrace_avail otf2-print  || exit 1
-check_module "mpi"  || exit 1
+[ -n "$MPI_MODULE_NAME" ] || MPI_MODULE_NAME=mpi
+check_module "$MPI_MODULE_NAME"  || exit 1
 
 # Building tests
 check_compilation || exit 1
--- a/test/mpi/test_mpi_ping.sh
+++ b/test/mpi/test_mpi_ping.sh
@@ -4,7 +4,8 @@ source ../test_utils/test_utils.sh
 name="mpi_ping"
 np="2"
 
-run_and_check_command mpirun $MPIRUN_CLI_OPTION -np $np eztrace -t mpi ./$name
+[ -n "$MPI_MODULE_NAME" ] || MPI_MODULE_NAME=mpi
+run_and_check_command mpirun $MPIRUN_CLI_OPTION -np $np eztrace -t $MPI_MODULE_NAME ./$name
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 if ! otf2-print "$trace_filename" 2>&1 > /dev/null ; then
