File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -37,24 +37,22 @@ testfiles = sort(filter(istest, readdir(testdir)))
37
37
38
38
@testset " $f " for f in testfiles
39
39
mpiexec () do mpirun
40
- cmd = ` $mpirun -n $nprocs $(Base. julia_cmd ()) $(joinpath (testdir, f)) `
40
+ cmd (n = nprocs) = ` $mpirun -n $n $(Base. julia_cmd ()) $(joinpath (testdir, f)) `
41
41
if f == " test_spawn.jl"
42
42
# Some command as the others, but always use a single process
43
- _cmd = deepcopy (cmd)
44
- _cmd. exec[findfirst (== (" $nprocs " ), _cmd. exec)] = " 1"
45
- run (_cmd)
43
+ run (cmd (1 ))
46
44
elseif f == " test_threads.jl"
47
45
withenv (" JULIA_NUM_THREADS" => " 4" ) do
48
- run (cmd)
46
+ run (cmd () )
49
47
end
50
48
elseif f == " test_error.jl"
51
- r = run (ignorestatus (cmd))
49
+ r = run (ignorestatus (cmd () ))
52
50
@test ! success (r)
53
51
elseif f == " test_errorhandler.jl" && (MPI. identify_implementation ()[1 ] == MPI. UnknownMPI ||
54
52
# Fujitsu MPI is known to not work with custom error handlers
55
53
startswith (MPI. MPI_LIBRARY_VERSION_STRING, " FUJITSU MPI" ))
56
54
try
57
- run (cmd)
55
+ run (cmd () )
58
56
catch e
59
57
@error """
60
58
$(f) tests failed. This may due to the fact this implementation of MPI doesn't support custom error handlers.
@@ -69,7 +67,7 @@ testfiles = sort(filter(istest, readdir(testdir)))
69
67
if get (ENV , " JULIA_MPI_TEST_DISABLE_REDUCE_ON_APPLE" , " " ) != " " && Sys. isapple () && f == " test_reduce.jl"
70
68
return
71
69
end
72
- run (cmd)
70
+ run (cmd () )
73
71
end
74
72
@test true
75
73
end
You can’t perform that action at this time.
0 commit comments