You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2019/02/28 19:00:11 UTC
[couchdb-ioq] branch master updated: Make PropEr an optional (test)
dependency
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-ioq.git
The following commit(s) were added to refs/heads/master by this push:
new 471e6c2 Make PropEr an optional (test) dependency
new af4f976 Merge pull request #11 from apache/optional-proper
471e6c2 is described below
commit 471e6c23e10370692432accb112a6834405982c1
Author: Robert Newson <rn...@apache.org>
AuthorDate: Thu Feb 28 14:07:13 2019 +0000
Make PropEr an optional (test) dependency
---
rebar.config | 11 -----------
rebar.config.script | 18 ++++++++++++++++++
test/ioq_kv_tests.erl | 2 ++
3 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/rebar.config b/rebar.config
deleted file mode 100644
index b25fdb5..0000000
--- a/rebar.config
+++ /dev/null
@@ -1,11 +0,0 @@
-{deps, [
- {proper, ".*", {git, "https://github.com/manopapad/proper.git", "master"}}
-]}.
-
-{eunit_opts, [
- verbose,
- {report, {
- eunit_surefire, [{dir,"."}]
- }}
-]}.
-
diff --git a/rebar.config.script b/rebar.config.script
new file mode 100644
index 0000000..09fc8af
--- /dev/null
+++ b/rebar.config.script
@@ -0,0 +1,18 @@
+WithProper = code:lib_dir(proper) /= {error, bad_name}.
+
+
+ErlOpts =
+ case WithProper of
+ true ->
+ [{d, 'WITH_PROPER'}];
+ false ->
+ []
+ end,
+
+[{eunit_opts, [
+ verbose,
+ {report, {
+ eunit_surefire, [{dir,"."}]
+ }}
+]},
+{erl_opts, [{i, "../"} | ErlOpts]}].
diff --git a/test/ioq_kv_tests.erl b/test/ioq_kv_tests.erl
index 3c34573..48ee464 100644
--- a/test/ioq_kv_tests.erl
+++ b/test/ioq_kv_tests.erl
@@ -11,6 +11,7 @@
% the License.
-module(ioq_kv_tests).
+-ifdef(WITH_PROPER).
-behaviour(proper_statem).
-include_lib("proper/include/proper.hrl").
@@ -147,3 +148,4 @@ almost_any() ->
?LAZY(loose_tuple(almost_any())),
?LAZY(list(almost_any()))
]).
+-endif.