commit: 6d6d693b3e0cd3aa6ea19ffe036e5f50c15aa7dd
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 2 15:22:52 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jan 2 15:22:52 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=6d6d693b
qcheck: fix tests
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
qcheck.c | 5 +++--
tests/qcheck/list04.good | 2 +-
tests/qcheck/list05.good | 2 +-
tests/qcheck/list06.good | 2 +-
tests/qcheck/list07.good | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/qcheck.c b/qcheck.c
index e8db1b8..1217a8a 100644
--- a/qcheck.c
+++ b/qcheck.c
@@ -346,7 +346,7 @@ qcheck_cb(tree_pkg_ctx *pkg_ctx, void *priv)
(num_files_ignored > 1 ? "s were" : " was"));
qcprintf("\n");
- if (num_files_ok != num_files)
+ if (num_files_ok != num_files && !state->qc_update)
return EXIT_FAILURE;
else
return EXIT_SUCCESS;
@@ -410,6 +410,7 @@ int qcheck_main(int argc, char **argv)
ret = -1;
if (vdb != NULL) {
if (array_cnt(atoms) != 0) {
+ ret = 0;
array_for_each(atoms, i, atom) {
ret |= tree_foreach_pkg_sorted(vdb, qcheck_cb,
&state, atom);
}
@@ -427,5 +428,5 @@ int qcheck_main(int argc, char **argv)
array_for_each(atoms, i, atom)
atom_implode(atom);
xarrayfree_int(atoms);
- return ret;
+ return ret != 0;
}
diff --git a/tests/qcheck/list04.good b/tests/qcheck/list04.good
index 604d20c..2f9f512 100644
--- a/tests/qcheck/list04.good
+++ b/tests/qcheck/list04.good
@@ -8,4 +8,4 @@ Checking a-b/pkg ...
AFK: /missing-dir/missing-sym
* 4 out of 11 files are good (2 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good
diff --git a/tests/qcheck/list05.good b/tests/qcheck/list05.good
index 35a0ff5..688c177 100644
--- a/tests/qcheck/list05.good
+++ b/tests/qcheck/list05.good
@@ -8,4 +8,4 @@ Checking a-b/pkg ...
AFK: /missing-dir/missing-sym
* 4 out of 11 files are good (2 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good
diff --git a/tests/qcheck/list06.good b/tests/qcheck/list06.good
index fb241db..6129032 100644
--- a/tests/qcheck/list06.good
+++ b/tests/qcheck/list06.good
@@ -5,4 +5,4 @@ Checking a-b/pkg ...
MTIME: /bin/bad-mtime-sym
* 4 out of 8 files are good (5 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good
diff --git a/tests/qcheck/list07.good b/tests/qcheck/list07.good
index ae80975..847b0b5 100644
--- a/tests/qcheck/list07.good
+++ b/tests/qcheck/list07.good
@@ -1,4 +1,4 @@
Checking a-b/pkg ...
* 4 out of 4 files are good (9 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good