unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, notmuch@notmuchmail.org
Subject: Re: test suite: FIXED messages are misordered with tests
Date: Thu, 21 May 2020 00:16:48 +0300	[thread overview]
Message-ID: <m2r1veqpbz.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <m2y2pmz5bz.fsf@guru.guru-group.fi>

On Thu, May 21 2020, Tomi Ollila wrote:

>
> the message that prints FIXED, does not execute print_test_description
> but the ones that do BROKEN or FAIL does (did not fully check but yes).
>
> And:
>
>     print_test_description ()
>     {
>         test -z "$test_description_printed" || return 0
>         echo
>         echo $this_test: "Testing ${test_description}"
>         test_description_printed=1
>     }


btw: I would rewrite this function as:

     print_test_description ()
     {
         echo
         echo $this_test: "Testing ${test_description}"

         print_test_description () { :; }         
     }

If I wanted to reduce XTRACE noise (even further), even further:

     _print_test_description ()
     {
         echo
         echo $this_test: "Testing ${test_description}"

         print_test_description=
     }
     print_test_description=_print_test_description

(and then use $print_test_description in "calls")

or even

     alias print_test_description='
       echo
       echo echo $this_test: "Testing ${test_description}"
       alias print_test_description='

(just tested this latest works)

Note on aliases: bash namual states:

 For almost every purpose, aliases are superseded by shell functions.

One notable exception is XTRACE noise reduction. In our case best 
candidate would be prerequisite work -- but SMOP..

Tomi

>     if [ -z "$NOTMUCH_TEST_QUIET" ]
>     then
>         print_test_description
>     fi
>
> Tomi

  reply	other threads:[~2020-05-20 21:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 22:03 test suite: FIXED messages are misordered with tests Daniel Kahn Gillmor
2020-05-12 23:14 ` David Bremner
2020-05-19 22:13   ` Daniel Kahn Gillmor
2020-05-20 21:04 ` Tomi Ollila
2020-05-20 21:16   ` Tomi Ollila [this message]
2020-05-21 17:54     ` Daniel Kahn Gillmor
2020-05-21 21:57       ` Tomi Ollila
2020-05-22  0:48         ` Daniel Kahn Gillmor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r1veqpbz.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).