unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] test: say_color() in one write(2)
Date: Sun, 23 May 2021 10:19:00 +0300	[thread overview]
Message-ID: <m2zgwlsysb.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87tumus8o9.fsf@tethera.net>

On Sat, May 22 2021, David Bremner wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> say_color() used to call (builtin) printf (and tput(1) to stdout)
>> several times, which caused attempts to write messages with color
>> to have partial content (e.g. escape sequences) often intermixed
>> with other tests when parallel tests were run.
>
> I still see things like:
>
> T568-lib-thread: Testing API tests for notmuch_thread_*
>  PASS   PASS   count messages on closed db
>  get indexopts from closed database
>
> Is that expected? Both "PASS" are coloured OK.

Yes, that is (unfortunately) possible, say_color only writes that PASS
(with escape sequences coloring and reseting around it) (and subtest
message if $debug is set). The messages following are written in separate
lines, after say_color() returns (echo's if I remember correctly).

Much more overhaul would be required to get the full line written in
one write(1) -- I did think a few options when doing that change but
nothing seems clear enough at this moment...

Tomi

  reply	other threads:[~2021-05-23  7:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 14:12 [PATCH] test: say_color() in one write(2) Tomi Ollila
2021-05-22 22:30 ` David Bremner
2021-05-23  7:19   ` Tomi Ollila [this message]
2021-05-23 11:13 ` David Bremner

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=m2zgwlsysb.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.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).