1 |
commit: 6d6d693b3e0cd3aa6ea19ffe036e5f50c15aa7dd |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 2 15:22:52 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 2 15:22:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=6d6d693b |
7 |
|
8 |
qcheck: fix tests |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
qcheck.c | 5 +++-- |
13 |
tests/qcheck/list04.good | 2 +- |
14 |
tests/qcheck/list05.good | 2 +- |
15 |
tests/qcheck/list06.good | 2 +- |
16 |
tests/qcheck/list07.good | 2 +- |
17 |
5 files changed, 7 insertions(+), 6 deletions(-) |
18 |
|
19 |
diff --git a/qcheck.c b/qcheck.c |
20 |
index e8db1b8..1217a8a 100644 |
21 |
--- a/qcheck.c |
22 |
+++ b/qcheck.c |
23 |
@@ -346,7 +346,7 @@ qcheck_cb(tree_pkg_ctx *pkg_ctx, void *priv) |
24 |
(num_files_ignored > 1 ? "s were" : " was")); |
25 |
qcprintf("\n"); |
26 |
|
27 |
- if (num_files_ok != num_files) |
28 |
+ if (num_files_ok != num_files && !state->qc_update) |
29 |
return EXIT_FAILURE; |
30 |
else |
31 |
return EXIT_SUCCESS; |
32 |
@@ -410,6 +410,7 @@ int qcheck_main(int argc, char **argv) |
33 |
ret = -1; |
34 |
if (vdb != NULL) { |
35 |
if (array_cnt(atoms) != 0) { |
36 |
+ ret = 0; |
37 |
array_for_each(atoms, i, atom) { |
38 |
ret |= tree_foreach_pkg_sorted(vdb, qcheck_cb, &state, atom); |
39 |
} |
40 |
@@ -427,5 +428,5 @@ int qcheck_main(int argc, char **argv) |
41 |
array_for_each(atoms, i, atom) |
42 |
atom_implode(atom); |
43 |
xarrayfree_int(atoms); |
44 |
- return ret; |
45 |
+ return ret != 0; |
46 |
} |
47 |
|
48 |
diff --git a/tests/qcheck/list04.good b/tests/qcheck/list04.good |
49 |
index 604d20c..2f9f512 100644 |
50 |
--- a/tests/qcheck/list04.good |
51 |
+++ b/tests/qcheck/list04.good |
52 |
@@ -8,4 +8,4 @@ Checking a-b/pkg ... |
53 |
AFK: /missing-dir/missing-sym |
54 |
* 4 out of 11 files are good (2 files were ignored) |
55 |
Checking virtual/pkg ... |
56 |
- * 0 out of 0 file are good |
57 |
+ * 0 out of 0 files are good |
58 |
|
59 |
diff --git a/tests/qcheck/list05.good b/tests/qcheck/list05.good |
60 |
index 35a0ff5..688c177 100644 |
61 |
--- a/tests/qcheck/list05.good |
62 |
+++ b/tests/qcheck/list05.good |
63 |
@@ -8,4 +8,4 @@ Checking a-b/pkg ... |
64 |
AFK: /missing-dir/missing-sym |
65 |
* 4 out of 11 files are good (2 files were ignored) |
66 |
Checking virtual/pkg ... |
67 |
- * 0 out of 0 file are good |
68 |
+ * 0 out of 0 files are good |
69 |
|
70 |
diff --git a/tests/qcheck/list06.good b/tests/qcheck/list06.good |
71 |
index fb241db..6129032 100644 |
72 |
--- a/tests/qcheck/list06.good |
73 |
+++ b/tests/qcheck/list06.good |
74 |
@@ -5,4 +5,4 @@ Checking a-b/pkg ... |
75 |
MTIME: /bin/bad-mtime-sym |
76 |
* 4 out of 8 files are good (5 files were ignored) |
77 |
Checking virtual/pkg ... |
78 |
- * 0 out of 0 file are good |
79 |
+ * 0 out of 0 files are good |
80 |
|
81 |
diff --git a/tests/qcheck/list07.good b/tests/qcheck/list07.good |
82 |
index ae80975..847b0b5 100644 |
83 |
--- a/tests/qcheck/list07.good |
84 |
+++ b/tests/qcheck/list07.good |
85 |
@@ -1,4 +1,4 @@ |
86 |
Checking a-b/pkg ... |
87 |
* 4 out of 4 files are good (9 files were ignored) |
88 |
Checking virtual/pkg ... |
89 |
- * 0 out of 0 file are good |
90 |
+ * 0 out of 0 files are good |