From 2a884c612b10b27f4be2cc6dd689bfe448d9361a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 17 Aug 2014 12:30:21 +0200 Subject: fix progress output for (dist-)upgrade calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, we had a start and a done of the calculation printed by higher-level code, but this got intermixed by progress reporting from an external solver or the output of autoremove codeā€¦ The higherlevel code is now only responsible for instantiating a progress object of its choosing (if it wants progress after all) and the rest will be handled by the upgrade code. Either it is used to show the progress of the external solver or the internal solver will give some hints about its overall progress. The later isn't really a proper progress as it will jump forward after each substep, but that is at least a bit better than before without any progress indication. Fixes also the 'strange' non-display of this progress line in -q=1, while all others are shown, which is reflected by all testcase changes. --- test/integration/test-bug-680041-apt-mark-holds-correctly | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/integration/test-bug-680041-apt-mark-holds-correctly') diff --git a/test/integration/test-bug-680041-apt-mark-holds-correctly b/test/integration/test-bug-680041-apt-mark-holds-correctly index 2e5e39c8e..3f40c23dc 100755 --- a/test/integration/test-bug-680041-apt-mark-holds-correctly +++ b/test/integration/test-bug-680041-apt-mark-holds-correctly @@ -19,6 +19,7 @@ runtests() { testequal 'Reading package lists... Building dependency tree... +Calculating upgrade... The following packages will be upgraded: pkgall pkgarch 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. @@ -30,6 +31,7 @@ E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgr testequal 'Reading package lists... Building dependency tree... +Calculating upgrade... The following packages have been kept back: pkgarch The following packages will be upgraded: @@ -43,6 +45,7 @@ E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgr testequal 'Reading package lists... Building dependency tree... +Calculating upgrade... The following packages will be upgraded: pkgall pkgarch 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. @@ -54,6 +57,7 @@ E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgr testequal 'Reading package lists... Building dependency tree... +Calculating upgrade... The following packages have been kept back: pkgall The following packages will be upgraded: -- cgit v1.2.3 From 25b86db159fbc3c043628e285c0c1ef24dec2c6e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 10 Mar 2015 00:59:44 +0100 Subject: test exitcode as well as string equality We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore --- .../test-bug-680041-apt-mark-holds-correctly | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test/integration/test-bug-680041-apt-mark-holds-correctly') diff --git a/test/integration/test-bug-680041-apt-mark-holds-correctly b/test/integration/test-bug-680041-apt-mark-holds-correctly index 3f40c23dc..a6fe76bc2 100755 --- a/test/integration/test-bug-680041-apt-mark-holds-correctly +++ b/test/integration/test-bug-680041-apt-mark-holds-correctly @@ -17,7 +17,7 @@ setupaptarchive runtests() { testempty aptmark showhold - testequal 'Reading package lists... + testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: @@ -26,10 +26,10 @@ The following packages will be upgraded: After this operation, 0 B of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only - testequal 'pkgarch set on hold.' aptmark hold pkgarch - testequal 'pkgarch' aptmark showhold + testsuccessequal 'pkgarch set on hold.' aptmark hold pkgarch + testsuccessequal 'pkgarch' aptmark showhold - testequal 'Reading package lists... + testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: @@ -40,10 +40,10 @@ The following packages will be upgraded: After this operation, 0 B of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only - testequal 'Canceled hold on pkgarch.' aptmark unhold pkgarch + testsuccessequal 'Canceled hold on pkgarch.' aptmark unhold pkgarch testempty aptmark showhold - testequal 'Reading package lists... + testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: @@ -52,10 +52,10 @@ The following packages will be upgraded: After this operation, 0 B of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only - testequal 'pkgall set on hold.' aptmark hold pkgall - testequal 'pkgall' aptmark showhold + testsuccessequal 'pkgall set on hold.' aptmark hold pkgall + testsuccessequal 'pkgall' aptmark showhold - testequal 'Reading package lists... + testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: @@ -66,7 +66,7 @@ The following packages will be upgraded: After this operation, 0 B of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only - testequal 'Canceled hold on pkgall.' aptmark unhold pkgall + testsuccessequal 'Canceled hold on pkgall.' aptmark unhold pkgall testempty aptmark showhold } # single-arch -- cgit v1.2.3