Skip to content

Commit 28742cf

Browse files
committed
test/runtests: add MPITEST_IGNORE_OUTPUT
Set environment variable MPITEST_IGNORE_OUTPUT if we want to enable verbose mode such as FI_LOG_LEVEL and prevent unexpected output triggering test failures. The tests will rely on "No Errors" output and exit status for pass/failure.
1 parent 14567b6 commit 28742cf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/mpi/runtests

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ $g_opt{defaultTimeLimitMultiplier} = 1.0; # default multiplier for timeout limit
100100
$g_opt{verbose} = 0; # Set to true to get more output
101101
$g_opt{debug} = 1;
102102
$g_opt{showprogress} = 0; # Set to true to get a "." with each run program.
103+
$g_opt{ignore_output} = 0; # Set to allow output to stdout/stderr without triggering error
103104
$g_opt{newline} = "\r\n"; # Set to \r\n for Windows-friendly, \n for Unix only
104105
$g_opt{run_mpitests} = 1; # Set to true to functional tests using run_mpitests
105106
# (i.e., run tests inside a single MPI_Init/Finalize)
@@ -180,6 +181,10 @@ if (defined($ENV{"MPITEST_TIMEOUT_MULTIPLIER"})) {
180181
$g_opt{defaultTimeLimitMultiplier} = $ENV{"MPITEST_TIMEOUT_MULTIPLIER"};
181182
}
182183

184+
if (defined($ENV{"MPITEST_IGNORE_OUTPUT"})) {
185+
$g_opt{ignore_output} = $ENV{"MPITEST_IGNORE_OUTPUT"};
186+
}
187+
183188
for my $key ("memory_total", "memory_multiplier", "cleanup") {
184189
my $k = "MPITEST_".uc($key);
185190
if (defined($ENV{$k})) {
@@ -1229,7 +1234,7 @@ sub check_result {
12291234
elsif (/^srun: error: .*: signal: Communication connection failure/) {
12301235
# skip
12311236
}
1232-
else {
1237+
elsif (!$g_opt{ignore_output}) {
12331238
$stray_output++;
12341239
}
12351240
}

0 commit comments

Comments
 (0)