Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/ex_unit/lib/ex_unit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ defmodule ExUnit do
* `:logs` - the captured logs
* `:parameters` - the test parameters

When a test has finished, the following fields are added for consumption by `ExUnit.Formatter` callbacks:
* `:test_pid` - the PID that the test was running on
"""
defstruct [:name, :case, :module, :state, time: 0, tags: %{}, logs: "", parameters: %{}]

Expand Down
1 change: 1 addition & 0 deletions lib/ex_unit/lib/ex_unit/runner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ defmodule ExUnit.Runner do
end

defp receive_test_reply(test, test_pid, test_ref, timeout) do
test = Map.put(test, :test_pid, test_pid)
receive do
{^test_pid, :test_finished, test} ->
Process.demonitor(test_ref, [:flush])
Expand Down