From: Pieter Praet Date: Fri, 20 Jan 2012 00:24:02 +0000 (+0100) Subject: Re: [PATCH] test: always report missing prereqs, independent of `--verbose' option X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=83f19af7f3e1b4f2b68829d15cc891a7ce02968e;p=notmuch-archives.git Re: [PATCH] test: always report missing prereqs, independent of `--verbose' option --- diff --git a/25/fcea0589b3ff611203cec47182954125aae20a b/25/fcea0589b3ff611203cec47182954125aae20a new file mode 100644 index 000000000..b63f8cae3 --- /dev/null +++ b/25/fcea0589b3ff611203cec47182954125aae20a @@ -0,0 +1,146 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id D887A431FAF + for ; Thu, 19 Jan 2012 16:26:08 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id FkeA7KeEoy9B for ; + Thu, 19 Jan 2012 16:26:08 -0800 (PST) +Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com + [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 019AB431FAE + for ; Thu, 19 Jan 2012 16:26:07 -0800 (PST) +Received: by wibhr12 with SMTP id hr12so19836wib.26 + for ; Thu, 19 Jan 2012 16:26:06 -0800 (PST) +Received: by 10.180.106.165 with SMTP id gv5mr47662598wib.18.1327019166872; + Thu, 19 Jan 2012 16:26:06 -0800 (PST) +Received: from localhost ([109.131.97.13]) + by mx.google.com with ESMTPS id g12sm3250677wiw.10.2012.01.19.16.25.52 + (version=TLSv1/SSLv3 cipher=OTHER); + Thu, 19 Jan 2012 16:26:06 -0800 (PST) +From: Pieter Praet +To: Tomi Ollila , + Dmitry Kurochkin , + Ethan Glasser-Camp +Subject: Re: [PATCH] test: always report missing prereqs, + independent of `--verbose' option +In-Reply-To: +References: <87d3aj8rcl.fsf@gmail.com> + <1326889181-32311-1-git-send-email-pieter@praet.org> + +User-Agent: Notmuch/0.11+99~gab86e73 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-unknown-linux-gnu) +Date: Fri, 20 Jan 2012 01:24:02 +0100 +Message-ID: <87d3afuspp.fsf@praet.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Cc: Notmuch Mail +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 20 Jan 2012 00:26:09 -0000 + +On Wed, 18 Jan 2012 15:53:59 +0200, Tomi Ollila wrote: +> On Wed, 18 Jan 2012 13:19:41 +0100, Pieter Praet wrote: +> > When tests are skipped due to missing prereqs, those prereqs are only +> > displayed when running with the `--verbose' option. This is essential +> > information when troubleshooting, so always send to stdout. +> > +> > --- +> +> Instead of this the test suite could be enchanged so that +> full log of the execution is stored somewhere and path +> to that file is displayed at the end of test. Generally, +> all output could stay available after tests exit so that +> those could be investigated furtner. +> + +Indeed. AFAIK, this used to be possible using the `--tee' option, +but the files it produces appear to be deleted when the tests finish. + +> (I tried to grep 'missing prerequisites' after running test +> but did not find the info. the file opened for >&3 has been +> deleted already?) +> + +Hmmm, odd. + +Are you sure you were using my patch and/or the `--verbose' option? + +Works here, using this highly sophisticated Emacs-hiding wizardry: + + #+begin_src sh + sudo mv /usr/bin/emacs /usr/bin/emacs.bak + make test | grep 'missing prerequisites' + sudo mv /usr/bin/emacs.bak /usr/bin/emacs + #+end_src + +(patent pending... ;) + +> Now I just see huge amounts of missing prerequisites: emacs(1) +> in my output (I presume that doesn't happen due to my +> hack to "hide" emacs). +> + +When using my patch, you mean? + +Most likely because "$test_subtest_missing_external_prereqs_" is only +reset at the beginning of every test series, so if an Emacs-dependent +subtest is skipped, all subsequent skipped subtests will report that +dependency as well, even if they were skipped due to a missing vi :). + +> But well, I'm not against applying this patch -- just that +> the test system starts to get so rotten touching it gives +> shivers... +> + +I wouldn't say it's getting rotten, but yeah, "tread lightly" should +probably be mandatory advice to those aspiring to explore its bowels... + +> Tomi +> +> > +> > test/test-lib.sh | 4 ++-- +> > 1 files changed, 2 insertions(+), 2 deletions(-) +> > +> > diff --git a/test/test-lib.sh b/test/test-lib.sh +> > index d1fbc05..6560628 100644 +> > --- a/test/test-lib.sh +> > +++ b/test/test-lib.sh +> > @@ -673,8 +673,8 @@ test_skip () { +> > +> > test_check_missing_external_prereqs_ () { +> > if test -n "$test_subtest_missing_external_prereqs_"; then +> > - say_color skip >&3 "missing prerequisites:" +> > - echo "$test_subtest_missing_external_prereqs_" >&3 +> > + say_color skip >&1 "missing prerequisites:" +> > + echo "$test_subtest_missing_external_prereqs_" >&1 +> > test_report_skip_ "$@" +> > else +> > false +> > -- +> > 1.7.8.1 + + +Peace + +-- +Pieter