@@ -142,16 +142,16 @@ will be run.
142
142
- `nworker_threads::Union{String,Int}`: The number of threads to use for each worker process. Defaults to 2.
143
143
Can also be set using the `RETESTITEMS_NWORKER_THREADS` environment variable. Interactive threads are
144
144
supported through a string (e.g. "auto,2").
145
- - `worker_init_expr::Expr`: an expression that will be evaluated on each worker process before any tests are run.
145
+ - `worker_init_expr::Expr`: an expression that will be run on each worker process before any tests are run.
146
146
Can be used to load packages or set up the environment. Must be a `:block` expression.
147
- - `test_end_expr::Expr`: an expression that will be evaluated after each testitem is run.
147
+ - `test_end_expr::Expr`: an expression that will be run after each testitem is run.
148
148
Can be used to verify that global state is unchanged after running a test. Must be a `:block` expression.
149
149
- `memory_threshold::Real`: Sets the fraction of memory that can be in use before a worker processes are
150
150
restarted to free memory. Defaults to $(DEFAULT_MEMORY_THRESHOLD[]) . Only supported with `nworkers > 0`.
151
151
For example, if set to 0.8, then when >80% of the available memory is in use, a worker process will be killed and
152
- replaced with a new worker before the next testitem is evaluated . The testitem will then be run on the new worker
152
+ replaced with a new worker before the next testitem is run . The testitem will then be run on the new worker
153
153
process, regardless of if memory pressure dropped below the threshold. If the memory pressure remains above the
154
- threshold, then a worker process will again be replaced before the next testitem is evaluated .
154
+ threshold, then a worker process will again be replaced before the next testitem is run .
155
155
Can also be set using the `RETESTITEMS_MEMORY_THRESHOLD` environment variable.
156
156
**Note**: the `memory_threshold` keyword is experimental and may be removed in future versions.
157
157
- `report::Bool=false`: If `true`, write a JUnit-format XML file summarising the test results.
@@ -357,7 +357,7 @@ function _runtests_in_current_env(
357
357
end
358
358
end
359
359
# Now all workers are started, we can begin processing test items.
360
- @info " Starting evaluating test items"
360
+ @info " Starting running test items"
361
361
starting = get_starting_testitems (testitems, nworkers)
362
362
@sync for (i, w) in enumerate (workers)
363
363
ti = starting[i]
@@ -380,7 +380,7 @@ function _runtests_in_current_env(
380
380
return nothing
381
381
end
382
382
383
- # Start a new `Worker` with `nworker_threads` threads and evaluate `worker_init_expr` on it.
383
+ # Start a new `Worker` with `nworker_threads` threads and run `worker_init_expr` on it.
384
384
# The provided `worker_num` is only for logging purposes, and not persisted as part of the worker.
385
385
function start_worker (proj_name, nworker_threads, worker_init_expr, ntestitems; worker_num= nothing )
386
386
w = Worker (; threads= " $nworker_threads " )
@@ -439,13 +439,13 @@ function record_timeout!(testitem, run_number::Int, timeout_limit::Real)
439
439
string (mins, " m" , lpad (secs, 2 , " 0" ), " s" )
440
440
end
441
441
end
442
- msg = " Timed out after $time_str evaluating test item $(repr (testitem. name)) (run=$run_number )"
442
+ msg = " Timed out after $time_str running test item $(repr (testitem. name)) (run=$run_number )"
443
443
record_test_error! (testitem, msg, timeout_limit)
444
444
end
445
445
446
446
function record_worker_terminated! (testitem, worker:: Worker , run_number:: Int )
447
447
termsignal = worker. process. termsignal
448
- msg = " Worker process aborted (signal=$termsignal ) evaluating test item $(repr (testitem. name)) (run=$run_number )"
448
+ msg = " Worker process aborted (signal=$termsignal ) running test item $(repr (testitem. name)) (run=$run_number )"
449
449
record_test_error! (testitem, msg)
450
450
end
451
451
@@ -537,11 +537,11 @@ function manage_worker(
537
537
@debugv 1 " Test item $(repr (testitem. name)) timed out. Terminating worker $worker "
538
538
terminate! (worker)
539
539
wait (worker)
540
- @error " $worker timed out evaluating test item $(repr (testitem. name)) after $timeout seconds. \
540
+ @error " $worker timed out running test item $(repr (testitem. name)) after $timeout seconds. \
541
541
Recording test error."
542
542
record_timeout! (testitem, run_number, timeout)
543
543
elseif e isa WorkerTerminatedException
544
- @error " $worker died evaluating test item $(repr (testitem. name)) . \
544
+ @error " $worker died running test item $(repr (testitem. name)) . \
545
545
Recording test error."
546
546
record_worker_terminated! (testitem, worker, run_number)
547
547
else
@@ -924,13 +924,13 @@ function runtestitem(
924
924
# disabled for now since there were issues when tests tried serialize/deserialize
925
925
# with things defined in an anonymous module
926
926
# environment = Module()
927
- @debugv 1 " Evaluating test item $(repr (name))$(_on_worker ()) ."
927
+ @debugv 1 " Running test item $(repr (name))$(_on_worker ()) ."
928
928
_, stats = @timed_with_compilation _redirect_logs (logs == :eager ? DEFAULT_STDOUT[] : logpath (ti)) do
929
929
with_source_path (() -> Core. eval (Main, mod_expr), ti. file)
930
930
with_source_path (() -> Core. eval (Main, test_end_mod_expr), ti. file)
931
931
nothing # return nothing as the first return value of @timed_with_compilation
932
932
end
933
- @debugv 1 " Done evaluating test item $(repr (name))$(_on_worker ()) ."
933
+ @debugv 1 " Done running test item $(repr (name))$(_on_worker ()) ."
934
934
catch err
935
935
err isa InterruptException && rethrow ()
936
936
# Handle exceptions thrown outside a `@test` in the body of the @testitem:
0 commit comments