commit: 432dc6f0189116a0b3aece01ac013b1bee3ce778 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Sat Jun 6 05:58:21 2015 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Sat Jun 6 05:58:21 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=432dc6f0
Revert "tests: qcheck: tweak some tests output" This reverts commit 0c7050208c110faac5dd54a452ed60a7a40eae07. Trying to get stable output with multiple packages was getting to be too much of a pain, and sorting the output arbitrarily didn't feel correct either. Bite the bullet and have qcheck sort its walking of the vdb. URL: https://bugs.gentoo.org/549934 Reported-by: Patrick Lauer <patrick <AT> gentoo.org> qcheck.c | 2 +- tests/qcheck/dotest | 11 ++++------- tests/qcheck/list04.good | 4 ++-- tests/qcheck/list05.good | 4 ++-- tests/qcheck/list06.good | 4 ++-- tests/qcheck/list07.good | 4 ++-- 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/qcheck.c b/qcheck.c index 75dbf6d..6ad5f85 100644 --- a/qcheck.c +++ b/qcheck.c @@ -399,7 +399,7 @@ int qcheck_main(int argc, char **argv) if ((argc == optind) && !state.search_all) qcheck_usage(EXIT_FAILURE); - ret = q_vdb_foreach_pkg(qcheck_cb, &state, NULL); + ret = q_vdb_foreach_pkg_sorted(qcheck_cb, &state); xarrayfree(regex_arr); return ret; } diff --git a/tests/qcheck/dotest b/tests/qcheck/dotest index 016fd10..965a5b5 100755 --- a/tests/qcheck/dotest +++ b/tests/qcheck/dotest @@ -28,9 +28,6 @@ test() { tend $? "$*" } -# have to avoid the -a flag and walk one package at a time as qcheck does not -# sort the vdb dirs before processing them. - # simple check test 01 1 "qcheck a-b/pkg" @@ -41,16 +38,16 @@ test 02 1 "qcheck a-b/pkg -s ^/missing-dir/.*" test 03 1 "qcheck -Ba" # hash mismatch ignore check -test 04 1 "qcheck -H cat/pkg && qcheck -H a-b/pkg" +test 04 1 "qcheck -Ha" # mtime mismatch ignore check -test 05 1 "qcheck -T cat/pkg && qcheck -T a-b/pkg" +test 05 1 "qcheck -Ta" # missing ignore check -test 06 1 "qcheck -A cat/pkg && qcheck -A a-b/pkg" +test 06 1 "qcheck -Aa" # hash+mtime+missing mismatch ignore check -test 07 0 "qcheck -AHT cat/pkg && qcheck -AHT a-b/pkg" +test 07 0 "qcheck -AHTa" # verbose check test 08 1 "qcheck -v a-b/pkg" diff --git a/tests/qcheck/list04.good b/tests/qcheck/list04.good index 943e0f5..930f896 100644 --- a/tests/qcheck/list04.good +++ b/tests/qcheck/list04.good @@ -1,5 +1,3 @@ -Checking cat/pkg-1 ... - * 0 out of 0 file are good Checking a-b/pkg-1.0 ... MTIME: /bin/bad-mtime-obj MTIME: /bin/bad-mtime-sym @@ -9,3 +7,5 @@ Checking a-b/pkg-1.0 ... AFK: /missing-dir/missing-file AFK: /missing-dir/missing-sym * 4 out of 11 files are good (2 files were ignored) +Checking cat/pkg-1 ... + * 0 out of 0 file are good diff --git a/tests/qcheck/list05.good b/tests/qcheck/list05.good index b1a8955..d4c4243 100644 --- a/tests/qcheck/list05.good +++ b/tests/qcheck/list05.good @@ -1,5 +1,3 @@ -Checking cat/pkg-1 ... - * 0 out of 0 file are good Checking a-b/pkg-1.0 ... MD5-DIGEST: /bin/bad-md5 SHA1-DIGEST: /bin/bad-sha1 @@ -9,3 +7,5 @@ Checking a-b/pkg-1.0 ... AFK: /missing-dir/missing-file AFK: /missing-dir/missing-sym * 4 out of 11 files are good (2 files were ignored) +Checking cat/pkg-1 ... + * 0 out of 0 file are good diff --git a/tests/qcheck/list06.good b/tests/qcheck/list06.good index 7b770a5..3cd48f7 100644 --- a/tests/qcheck/list06.good +++ b/tests/qcheck/list06.good @@ -1,8 +1,8 @@ -Checking cat/pkg-1 ... - * 0 out of 0 file are good Checking a-b/pkg-1.0 ... MD5-DIGEST: /bin/bad-md5 MTIME: /bin/bad-mtime-obj SHA1-DIGEST: /bin/bad-sha1 MTIME: /bin/bad-mtime-sym * 4 out of 8 files are good (5 files were ignored) +Checking cat/pkg-1 ... + * 0 out of 0 file are good diff --git a/tests/qcheck/list07.good b/tests/qcheck/list07.good index 4a86950..fb59689 100644 --- a/tests/qcheck/list07.good +++ b/tests/qcheck/list07.good @@ -1,4 +1,4 @@ -Checking cat/pkg-1 ... - * 0 out of 0 file are good Checking a-b/pkg-1.0 ... * 4 out of 4 files are good (9 files were ignored) +Checking cat/pkg-1 ... + * 0 out of 0 file are good
