1 |
commit: a2f96c874b23ad03c613265cf326172a264c3b24 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 23 20:16:47 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 23 20:16:47 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2f96c87 |
7 |
|
8 |
dev-libs/re2: fix tests on 32-bit platforms |
9 |
|
10 |
Closes: https://bugs.gentoo.org/724404 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
.../files/0.2020.05.01-test-memory-budget.patch | 27 ++++++++++++++++++++++ |
14 |
dev-libs/re2/re2-0.2020.05.01.ebuild | 3 +++ |
15 |
2 files changed, 30 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/re2/files/0.2020.05.01-test-memory-budget.patch b/dev-libs/re2/files/0.2020.05.01-test-memory-budget.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..3e62934153c |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/re2/files/0.2020.05.01-test-memory-budget.patch |
22 |
@@ -0,0 +1,27 @@ |
23 |
+From bde1ea09550a61b4a092cdf0e3ba8dca4200947a Mon Sep 17 00:00:00 2001 |
24 |
+From: Paul Wankadia <junyer@××××××.com> |
25 |
+Date: Sun, 10 May 2020 07:12:35 -0700 |
26 |
+Subject: [PATCH] Lower the memory budget in TestCompile.InsufficientMemory. |
27 |
+ |
28 |
+Fixes #256. |
29 |
+ |
30 |
+Change-Id: I975c5f6f7a12dc86fedc0f3ab35f16295c18a7e8 |
31 |
+Reviewed-on: https://code-review.googlesource.com/c/re2/+/56150 |
32 |
+Reviewed-by: Paul Wankadia <junyer@××××××.com> |
33 |
+--- |
34 |
+ re2/testing/compile_test.cc | 2 +- |
35 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
36 |
+ |
37 |
+diff --git a/re2/testing/compile_test.cc b/re2/testing/compile_test.cc |
38 |
+index 4598aa64..2096e2f0 100644 |
39 |
+--- a/re2/testing/compile_test.cc |
40 |
++++ b/re2/testing/compile_test.cc |
41 |
+@@ -236,7 +236,7 @@ TEST(TestCompile, InsufficientMemory) { |
42 |
+ "^(?P<name1>[^\\s]+)\\s+(?P<name2>[^\\s]+)\\s+(?P<name3>.+)$", |
43 |
+ Regexp::LikePerl, NULL); |
44 |
+ EXPECT_TRUE(re != NULL); |
45 |
+- Prog* prog = re->CompileToProg(920); |
46 |
++ Prog* prog = re->CompileToProg(850); |
47 |
+ // If the memory budget has been exhausted, compilation should fail |
48 |
+ // and return NULL instead of trying to do anything with NoMatch(). |
49 |
+ EXPECT_TRUE(prog == NULL); |
50 |
|
51 |
diff --git a/dev-libs/re2/re2-0.2020.05.01.ebuild b/dev-libs/re2/re2-0.2020.05.01.ebuild |
52 |
index c0c9da9e15f..45f70cb1090 100644 |
53 |
--- a/dev-libs/re2/re2-0.2020.05.01.ebuild |
54 |
+++ b/dev-libs/re2/re2-0.2020.05.01.ebuild |
55 |
@@ -31,6 +31,9 @@ DOCS=( AUTHORS CONTRIBUTORS README doc/syntax.txt ) |
56 |
HTML_DOCS=( doc/syntax.html ) |
57 |
|
58 |
src_prepare() { |
59 |
+ local PATCHES=( |
60 |
+ "${FILESDIR}"/0.2020.05.01-test-memory-budget.patch |
61 |
+ ) |
62 |
default |
63 |
grep -q "^SONAME=${SONAME}\$" Makefile || die "SONAME mismatch" |
64 |
if use icu; then |