@@ -14,21 +14,34 @@ const coverage_opts =
1414 JL_LOG_USER => " user" ,
1515 JL_LOG_ALL => " all" )
1616
17+ # Files to run without mpiexec
18+ juliafiles = [" test_cman_julia.jl" ]
19+ # Files to run with mpiexec -n 1
20+ singlefiles = []
21+
1722function runtests ()
1823 nprocs = clamp (Sys. CPU_CORES, 2 , 4 )
1924 exename = joinpath (JULIA_HOME, Base. julia_exename ())
2025 testdir = dirname (@__FILE__ )
21- istest (f) = endswith (f, " .jl" ) && f != " runtests.jl "
26+ istest (f) = endswith (f, " .jl" ) && startswith (f, " test_ " )
2227 testfiles = sort (filter (istest, readdir (testdir)))
28+
29+ extra_args = []
30+ if contains (readlines (open (` mpiexec --version` )[1 ])[1 ], " OpenRTE" )
31+ push! (extra_args," --oversubscribe" )
32+ end
33+
2334 nfail = 0
2435 print_with_color (:white , " Running MPI.jl tests\n " )
2536 for f in testfiles
2637 try
2738 coverage_opt = coverage_opts[Base. JLOptions (). code_coverage]
28- if f == " test_cman_julia.jl"
39+ if f ∈ singlefiles
40+ run (` mpiexec $extra_args -n 1 $exename --code-coverage=$coverage_opt $(joinpath (testdir, f)) ` )
41+ elseif f ∈ juliafiles
2942 run (` $exename --code-coverage=$coverage_opt $(joinpath (testdir, f)) ` )
3043 else
31- run (` mpiexec -n $nprocs $exename --code-coverage=$coverage_opt $(joinpath (testdir, f)) ` )
44+ run (` mpiexec $extra_args -n $nprocs $exename --code-coverage=$coverage_opt $(joinpath (testdir, f)) ` )
3245 end
3346 Base. with_output_color (:green ,STDOUT) do io
3447 println (io," \t SUCCESS: $f " )
0 commit comments