Gentoo Archives: gentoo-commits

From: "Amadeusz Piotr Żołnowski" <aidecoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-erlang/hamcrest/, dev-erlang/hamcrest/files/
Date: Sat, 09 Jul 2016 17:45:09
Message-Id: 1468086293.82148fb09ba83244055de38fa00fd6ed5bb0aed2.aidecoe@gentoo
1 commit: 82148fb09ba83244055de38fa00fd6ed5bb0aed2
2 Author: Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 9 17:44:36 2016 +0000
4 Commit: Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 9 17:44:53 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82148fb0
7
8 dev-erlang/hamcrest: Restore unit tests
9
10 Apply patch from https://github.com/hyperthunk/hamcrest-erlang/pull/24
11
12 Package-Manager: portage-2.3.0
13
14 .../0.1.0_p20150103-0001-OTP-19-support.patch | 88 ++++++++++++++++++++++
15 .../hamcrest/hamcrest-0.1.0_p20150103.ebuild | 5 +-
16 2 files changed, 89 insertions(+), 4 deletions(-)
17
18 diff --git a/dev-erlang/hamcrest/files/0.1.0_p20150103-0001-OTP-19-support.patch b/dev-erlang/hamcrest/files/0.1.0_p20150103-0001-OTP-19-support.patch
19 new file mode 100644
20 index 0000000..94e507c
21 --- /dev/null
22 +++ b/dev-erlang/hamcrest/files/0.1.0_p20150103-0001-OTP-19-support.patch
23 @@ -0,0 +1,88 @@
24 +From 4eb8b813d0086a6eca9627ab64721378b07aa030 Mon Sep 17 00:00:00 2001
25 +From: Luke Bakken <lbakken@×××××.com>
26 +Date: Sat, 9 Jul 2016 07:43:41 -0700
27 +Subject: [PATCH] OTP 19 support via compilation of CT suite. This defines
28 + namespaced_types. Disable CT auto-compile. Fix warnings. Update to proper
29 + v1.2
30 +
31 +---
32 + .gitignore | 8 ++++++++
33 + test.config | 16 +++++++++++++---
34 + test/hamcrest_matchers_SUITE.erl | 4 ++--
35 + 3 files changed, 23 insertions(+), 5 deletions(-)
36 +
37 +diff --git a/.gitignore b/.gitignore
38 +index 59ac5eb..d6882d0 100755
39 +--- a/.gitignore
40 ++++ b/.gitignore
41 +@@ -4,6 +4,7 @@
42 + *.o
43 + *.so
44 + *.swp
45 ++.rebar/
46 + build/*
47 + ^build$
48 + Emakefile
49 +@@ -15,3 +16,10 @@ ebin/*.beam
50 + logs/*
51 + include/hamcrest.hrl
52 + qc.hrl
53 ++deps/
54 ++ct_*/
55 ++all_runs.html
56 ++ct_*
57 ++jquery-latest.js
58 ++jquery.tablesorter.min.js
59 ++variables-ct@localhost
60 +diff --git a/test.config b/test.config
61 +index bff1a63..f206e37 100644
62 +--- a/test.config
63 ++++ b/test.config
64 +@@ -1,9 +1,19 @@
65 +-
66 + {cover_enabled, true}.
67 ++
68 + {deps, [
69 +- %% TODO: bind to a specific commit or tag instead of 'master'
70 +- {proper, ".*", {git, "http://github.com/manopapad/proper.git", "v1.1"}}
71 ++ {proper, "1.*", {git, "http://github.com/manopapad/proper.git", "v1.2"}}
72 + ]}.
73 +
74 ++{erl_opts, [
75 ++ debug_info,
76 ++ fail_on_warning,
77 ++ {src_dirs, ["test"]},
78 ++ {platform_define, "^[0-9]+", namespaced_types}
79 ++ ]}.
80 ++
81 ++{validate_app_modules, false}.
82 ++
83 ++{ct_extra_params, "-no_auto_compile"}.
84 ++
85 + {plugin_dir, "priv/build/plugins"}.
86 + {plugins, [eqc_resolver]}.
87 +diff --git a/test/hamcrest_matchers_SUITE.erl b/test/hamcrest_matchers_SUITE.erl
88 +index f2889e2..6726425 100644
89 +--- a/test/hamcrest_matchers_SUITE.erl
90 ++++ b/test/hamcrest_matchers_SUITE.erl
91 +@@ -69,7 +69,7 @@ is_not_evaluates_to_logical_negation_of_underlying_matcher(_) ->
92 + ?EQC(P).
93 +
94 + is_not_provides_convenient_shortcut_for_not_equal_to(_) ->
95 +- P = ?FORALL({X, Y}, {binary(), binary()},
96 ++ P = ?FORALL({X, _Y}, {binary(), binary()},
97 + begin
98 + #'hamcrest.matchspec'{matcher=F1} = equal_to(X),
99 + #'hamcrest.matchspec'{matcher=F2} = is_not(X),
100 +@@ -240,7 +240,7 @@ ends_with_should_only_match_last_portion_of_string(_) ->
101 + ?IMPLIES(length(Xs) > 0,
102 + begin
103 + Y = round(length(Xs) / 2),
104 +- LStr = string:left(Xs, Y),
105 ++ _LStr = string:left(Xs, Y),
106 + RStr = string:right(Xs, Y),
107 + case (assert_that(Xs, ends_with(RStr))) of
108 + true -> true;
109 +--
110 +2.9.0
111 +
112
113 diff --git a/dev-erlang/hamcrest/hamcrest-0.1.0_p20150103.ebuild b/dev-erlang/hamcrest/hamcrest-0.1.0_p20150103.ebuild
114 index 25e888d..04bd458 100644
115 --- a/dev-erlang/hamcrest/hamcrest-0.1.0_p20150103.ebuild
116 +++ b/dev-erlang/hamcrest/hamcrest-0.1.0_p20150103.ebuild
117 @@ -22,10 +22,7 @@ DEPEND="${CDEPEND}
118 RDEPEND="${CDEPEND}"
119
120 DOCS=( NOTES README.markdown TODO.md )
121 -
122 -# FIXME: Fails, reported upstream:
123 -# FIXME: https://github.com/hyperthunk/hamcrest-erlang/issues/21
124 -RESTRICT="test"
125 +PATCHES=( "${FILESDIR}"/${PV}-0001-OTP-19-support.patch )
126
127 # Override with EAPI default because it's missing hamcrest.app.src and doesn't
128 # have any deps.