Skip to content

Commit 86266fb

Browse files
committed
Exclude gleam tests if gleam is missing
1 parent a08ef98 commit 86266fb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/mix/test/mix/gleam_test.exs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Code.require_file("../test_helper.exs", __DIR__)
66

77
defmodule Mix.GleamTest do
88
use MixTest.Case
9+
@moduletag :gleam
910

1011
@compile {:no_warn_undefined, [:gleam_dep, :gleam@int]}
1112

lib/mix/test/test_helper.exs

+10-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,18 @@ cover_exclude =
4343
[]
4444
end
4545

46+
gleam_exclude =
47+
try do
48+
Mix.Gleam.require!()
49+
[]
50+
rescue
51+
Mix.Error -> [gleam: true]
52+
end
53+
4654
ExUnit.start(
4755
trace: !!System.get_env("TRACE"),
48-
exclude: epmd_exclude ++ os_exclude ++ git_exclude ++ line_exclude ++ cover_exclude,
56+
exclude:
57+
epmd_exclude ++ os_exclude ++ git_exclude ++ line_exclude ++ cover_exclude ++ gleam_exclude,
4958
include: line_include
5059
)
5160

0 commit comments

Comments
 (0)