summaryrefslogtreecommitdiff
path: root/mix.exs
diff options
context:
space:
mode:
authorILYA Khlopotov <iilyak@apache.org>2019-06-20 21:41:40 +0000
committerILYA Khlopotov <iilyak@apache.org>2019-07-29 13:37:42 +0000
commitd427f353ab4be03998685f6a167d9559c7b50a76 (patch)
tree4620eb350beac6a1f8bdfbc79b1efe0ef0e60370 /mix.exs
parentd0ccfa2b463b7087c1c3a766ca3ae963c1d1738d (diff)
downloadcouchdb-d427f353ab4be03998685f6a167d9559c7b50a76.tar.gz
Unify runners for unit and integration tests
Diffstat (limited to 'mix.exs')
-rw-r--r--mix.exs25
1 files changed, 19 insertions, 6 deletions
diff --git a/mix.exs b/mix.exs
index d9c8c2160..2e213aeb1 100644
--- a/mix.exs
+++ b/mix.exs
@@ -13,8 +13,8 @@ defmodule CouchDBTest.Mixfile do
start_permanent: Mix.env() == :prod,
build_embedded: Mix.env() == :prod,
deps: deps(),
- consolidate_protocols: Mix.env() not in [:test, :dev],
- test_paths: get_test_paths(),
+ consolidate_protocols: Mix.env() not in [:test, :dev, :integration],
+ test_paths: get_test_paths(Mix.env()),
elixirc_paths: elixirc_paths(Mix.env())
]
end
@@ -22,26 +22,39 @@ defmodule CouchDBTest.Mixfile do
# Run "mix help compile.app" to learn about applications.
def application do
[
- extra_applications: [:logger]
+ extra_applications: [:logger],
+ applications: [:httpotion]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["test/elixir/lib", "test/elixir/test/support"]
+ defp elixirc_paths(:integration), do: ["test/elixir/lib", "test/elixir/test/support"]
defp elixirc_paths(_), do: ["test/elixir/lib"]
# Run "mix help deps" to learn about dependencies.
defp deps() do
[
- {:httpotion, "~> 3.0", only: [:dev, :test], runtime: false},
+ {:httpotion, "~> 3.0", only: [:dev, :test, :integration], runtime: false},
{:jiffy, path: Path.expand("src/jiffy", __DIR__)},
{:ibrowse,
path: Path.expand("src/ibrowse", __DIR__), override: true, compile: false},
- {:credo, "~> 1.0.0", only: [:dev, :test], runtime: false}
+ {:credo, "~> 1.0.0", only: [:dev, :test, :integration], runtime: false}
]
end
- def get_test_paths do
+ def get_test_paths(:test) do
Path.wildcard("src/*/test/exunit") |> Enum.filter(&File.dir?/1)
end
+
+ def get_test_paths(:integration) do
+ integration_tests =
+ Path.wildcard("src/*/test/integration") |> Enum.filter(&File.dir?/1)
+
+ ["test/elixir/test" | integration_tests]
+ end
+
+ def get_test_paths(_) do
+ []
+ end
end