Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This uses the ExUnit manifest to filter to only tests that failed the last time they ran. As an optimization, we filter out files that have no failures so we load the minimum set of files necessary. Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
- Loading branch information
1 parent
214871b
commit 594f778
Showing
12 changed files
with
213 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defmodule TestFailed.MixProject do | ||
use Mix.Project | ||
|
||
def project do | ||
[ | ||
app: :test_only_failures, | ||
version: "0.0.1", | ||
test_pattern: "*_test_failed.exs" | ||
] | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
lib/mix/test/fixtures/test_failed/test/only_failing_test_failed.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
defmodule OnlyFailingTest do | ||
use ExUnit.Case | ||
|
||
test "fails", do: assert(System.get_env("PASS_FAILING_TESTS")) | ||
end |
7 changes: 7 additions & 0 deletions
7
lib/mix/test/fixtures/test_failed/test/only_passing_test_failed.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
IO.puts("loading OnlyPassingTest") | ||
|
||
defmodule OnlyPassingTest do | ||
use ExUnit.Case | ||
|
||
test "passes", do: assert(1 == 1) | ||
end |
9 changes: 9 additions & 0 deletions
9
lib/mix/test/fixtures/test_failed/test/passing_and_failing_test_failed.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
defmodule PassingAndFailingTest do | ||
use ExUnit.Case | ||
|
||
@tag :foo | ||
test "fails", do: assert(System.get_env("PASS_FAILING_TESTS")) | ||
|
||
@tag :foo | ||
test "passes", do: assert(1 == 1) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ExUnit.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters