11using MPI
2- using Base . Test
2+ using Compat . Test
33
44using Compat
55import Compat. String
@@ -21,13 +21,20 @@ juliafiles = ["test_cman_julia.jl"]
2121singlefiles = [" test_spawn.jl" ]
2222
2323excludedfiles = []
24- if is_windows ()
25- excludedfiles = [" test_info.jl" , " test_onesided.jl" , " test_finalize_atexit.jl" ]
24+ if Compat. Sys. iswindows ()
25+ push! (excludedfiles, " test_info.jl" )
26+ push! (excludedfiles, " test_onesided.jl" )
27+ push! (excludedfiles, " test_finalize_atexit.jl" )
2628 if Sys. WORD_SIZE == 32
2729 push! (excludedfiles, " test_spawn.jl" )
2830 end
2931end
3032
33+ if VERSION > v " 0.7.0-DEV.2005"
34+ push! (excludedfiles, " test_cman_julia.jl" )
35+ push! (excludedfiles, " test_cman_mpi.jl" )
36+ push! (excludedfiles, " test_cman_tcp.jl" )
37+ end
3138function runtests ()
3239 nprocs = clamp (Sys. CPU_CORES, 2 , 4 )
3340 exename = joinpath (BINDIR, Base. julia_exename ())
@@ -36,14 +43,14 @@ function runtests()
3643 testfiles = sort (filter (istest, readdir (testdir)))
3744
3845 extra_args = []
39- @static if ! is_windows ()
40- if contains ( readlines ( open (` mpiexec --version` )[ 1 ])[ 1 ], " OpenRTE " )
46+ @static if ! Compat . Sys . iswindows ()
47+ if Compat . occursin ( " OpenRTE " , Compat . open (f -> read (f, String), ` mpiexec --version` ))
4148 push! (extra_args," --oversubscribe" )
4249 end
4350 end
4451
4552 nfail = 0
46- print_with_color ( :white , " Running MPI.jl tests\n " )
53+ Compat . printstyled ( " Running MPI.jl tests\n " ; color = :white )
4754 for f in testfiles
4855 if f ∈ excludedfiles
4956 println (" Skipping disabled test $f " )
@@ -58,11 +65,11 @@ function runtests()
5865 else
5966 run (` mpiexec $extra_args -n $nprocs $exename --code-coverage=$coverage_opt $(joinpath (testdir, f)) ` )
6067 end
61- Base. with_output_color (:green ,STDOUT ) do io
68+ Base. with_output_color (:green ,Compat . stdout ) do io
6269 println (io," \t SUCCESS: $f " )
6370 end
6471 catch ex
65- Base. with_output_color (:red ,STDERR ) do io
72+ Base. with_output_color (:red ,Compat . stderr ) do io
6673 println (io," \t Error: $(joinpath (testdir, f)) " )
6774 showerror (io,ex,backtrace ())
6875 end
0 commit comments