]> git.saurik.com Git - apt.git/commitdiff
tests: be able to disable "Fetched …" statistics message
authorDavid Kalnischkies <david@kalnischkies.de>
Thu, 8 May 2014 23:22:50 +0000 (01:22 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Thu, 8 May 2014 23:25:55 +0000 (01:25 +0200)
The line contains everchanging execution statistics which is harmful for
testcases as they need to filter out such lines, but this is hard so we
can just add an option to disable them instead and be done.

Git-Dch: Ignore

apt-private/acqprogress.cc
test/integration/framework
test/integration/test-bug-595691-empty-and-broken-archive-files

index 4bcfd8f0040dd06a75a1ab836920b71d102f51d1..17a12799cf6dbb0430677af5b99fc337af3d5fb5 100644 (file)
@@ -140,6 +140,9 @@ void AcqTextStatus::Stop()
    if (Quiet <= 0)
       cout << '\r' << BlankLine << '\r' << flush;
 
+   if (_config->FindB("quiet::NoStatistic", false) == true)
+      return;
+
    if (FetchedBytes != 0 && _error->PendingError() == false)
       ioprintf(cout,_("Fetched %sB in %s (%sB/s)\n"),
               SizeToStr(FetchedBytes).c_str(),
index ab1274d9cb47567c12acffe69cef0a311209f143..9cdc31e23f3ff456f05f5e1c5465f71274772512 100644 (file)
@@ -226,6 +226,7 @@ setupenvironment() {
        fi
        echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
        echo 'quiet::NoUpdate "true";' >> aptconfig.conf
+       echo 'quiet::NoStatistic "true";' >> aptconfig.conf
        echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https
         echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
        configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
index a05ed5fa6eacc8ba8af3b30ffbdf39dc5fcda7ea..8da0a52d232e31e2c3711065608e951da52ae1e7 100755 (executable)
@@ -13,7 +13,7 @@ setupflataptarchive
 testaptgetupdate() {
        rm -rf rootdir/var/lib/apt
        aptget update 2>> testaptgetupdate.diff >> testaptgetupdate.diff || true
-       sed -i -e '/^Fetched / d' -e '/Ign / d' -e '/Release/ d' -e 's#Get:[0-9]\+ #Get: #' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff
+       sed -i -e '/Ign / d' -e '/Release/ d' -e 's#Get:[0-9]\+ #Get: #' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff
        GIVEN="$1"
        shift
        msgtest "Test for correctness of" "apt-get update with $*"