1 |
commit: b06bbcd1a9c7e7910fe6f156646cdfe8d760c054 |
2 |
Author: Rick Farina <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 10 20:40:49 2020 +0000 |
4 |
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 10 20:41:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b06bbcd1 |
7 |
|
8 |
sys-apps/earlyoom: fix tests, give keywords |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org> |
12 |
|
13 |
sys-apps/earlyoom/earlyoom-1.3.ebuild | 8 +++-- |
14 |
.../earlyoom/files/earlyoom-1.3-test-fixed.patch | 34 ++++++++++++++++++++++ |
15 |
2 files changed, 39 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/earlyoom/earlyoom-1.3.ebuild b/sys-apps/earlyoom/earlyoom-1.3.ebuild |
18 |
index 2118282839f..c1fa70a6791 100644 |
19 |
--- a/sys-apps/earlyoom/earlyoom-1.3.ebuild |
20 |
+++ b/sys-apps/earlyoom/earlyoom-1.3.ebuild |
21 |
@@ -11,14 +11,16 @@ SRC_URI="https://github.com/rfjakob/earlyoom/archive/v$PV.tar.gz -> $P.tar.gz" |
22 |
|
23 |
LICENSE="MIT-with-advertising" |
24 |
SLOT="0" |
25 |
-#KEYWORDS="~amd64 ~x86" |
26 |
+KEYWORDS="~amd64 ~x86" |
27 |
IUSE="systemd docs" |
28 |
|
29 |
DEPEND="docs? ( app-text/pandoc )" |
30 |
RDEPEND="" |
31 |
|
32 |
-#https://github.com/rfjakob/earlyoom/issues/156 |
33 |
-RESTRICT="test" |
34 |
+src_prepare() { |
35 |
+ eapply "${FILESDIR}/${P}-test-fixed.patch" |
36 |
+ default |
37 |
+} |
38 |
|
39 |
src_compile() { |
40 |
VERSION="v${PV}" emake earlyoom |
41 |
|
42 |
diff --git a/sys-apps/earlyoom/files/earlyoom-1.3-test-fixed.patch b/sys-apps/earlyoom/files/earlyoom-1.3-test-fixed.patch |
43 |
new file mode 100644 |
44 |
index 00000000000..8c6fc3ab6df |
45 |
--- /dev/null |
46 |
+++ b/sys-apps/earlyoom/files/earlyoom-1.3-test-fixed.patch |
47 |
@@ -0,0 +1,34 @@ |
48 |
+From 3648b351e88331f3f2e46af4ae0ddd19e27bc7c2 Mon Sep 17 00:00:00 2001 |
49 |
+From: Jakob Unterwurzacher <jakobunt@×××××.com> |
50 |
+Date: Mon, 8 Jul 2019 21:07:04 +0200 |
51 |
+Subject: [PATCH] tests: fix TestCli failure when all processes have badness 0 |
52 |
+ |
53 |
+On a machine with a lot of RAM and no big processes running, |
54 |
+all processes may have badness 0, and we will get |
55 |
+ |
56 |
+ ^ new victim (higher vm_rss) |
57 |
+ |
58 |
+in the debug output, but not |
59 |
+ |
60 |
+ ^ new victim (higher badness) |
61 |
+ |
62 |
+. This is not a failure. |
63 |
+ |
64 |
+Fixes https://github.com/rfjakob/earlyoom/issues/137 |
65 |
+--- |
66 |
+ tests/cli_test.go | 2 +- |
67 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
68 |
+ |
69 |
+diff --git a/tests/cli_test.go b/tests/cli_test.go |
70 |
+index 7085290..ef4abee 100644 |
71 |
+--- a/tests/cli_test.go |
72 |
++++ b/tests/cli_test.go |
73 |
+@@ -72,7 +72,7 @@ func TestCli(t *testing.T) { |
74 |
+ {args: nil, code: -1, stderrContains: startupMsg, stdoutContains: memReport}, |
75 |
+ {args: []string{"-p"}, code: -1, stdoutContains: memReport}, |
76 |
+ {args: []string{"-v"}, code: 0, stderrContains: "earlyoom v", stdoutEmpty: true}, |
77 |
+- {args: []string{"-d"}, code: -1, stdoutContains: "^ new victim (higher badness)"}, |
78 |
++ {args: []string{"-d"}, code: -1, stdoutContains: "^ new victim"}, |
79 |
+ {args: []string{"-m", "1"}, code: -1, stderrContains: " 1 %", stdoutContains: memReport}, |
80 |
+ {args: []string{"-m", "0"}, code: 15, stderrContains: "fatal", stdoutEmpty: true}, |
81 |
+ {args: []string{"-m", "-10"}, code: 15, stderrContains: "fatal", stdoutEmpty: true}, |