Re: Reporting script runtimes in pg_regress - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: Reporting script runtimes in pg_regress
Date
Msg-id 20190221093702.GA5238@msg.df7cb.de
Whole thread Raw
In response to Re: Reporting script runtimes in pg_regress  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Reporting script runtimes in pg_regress  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Re: Tom Lane 2019-02-18 <28360.1550506699@sss.pgh.pa.us>
> >>> We should also strive to align "FAILED" properly.
> 
> >> Yeah, not strictly required, but someone might want to play around with
> >> it a bit.
> 
> > FWIW I don't think we localize pg_regress output currently, so that
> > argument seems moot ... But I think we can get away with constant four
> > spaces for now.
> 
> I pushed Peter's suggestion for %8.0f; let's live with that for a little
> and see if it's still annoying.

The ryu changes make postgresql-unit fail quite loudly:

$ cat regression.out
test extension                    ... ok      359 ms
test tables                       ... FAILED      164 ms
test unit                         ... FAILED      867 ms
test binary                       ... ok       20 ms
test unicode                      ... ok       18 ms
test prefix                       ... FAILED       43 ms
test units                        ... FAILED      207 ms
test time                         ... FAILED       99 ms
test temperature                  ... FAILED       22 ms
...

The misalignment annoyed me enough (especially the false alignment
between "ms" on the first row and "164" on the next row) to look into
it. Aligned it looks like this:

test extension                    ... ok          399 ms
test tables                       ... FAILED      190 ms
test unit                         ... FAILED      569 ms
test binary                       ... ok           14 ms
test unicode                      ... ok           15 ms
test prefix                       ... FAILED       44 ms
test units                        ... FAILED      208 ms
test time                         ... FAILED       99 ms
test temperature                  ... FAILED       21 ms
...

It doesn't break translations because it prints the extra spaces
separately.

In run_single_test() (which this output is from), it simply aligns the
output with FAILED. In run_schedule(), there is the 3rd output string
"failed (ignored)" which is considerably longer. I aligned the output
with that, but also made the timestamp field shorter so it's not too
much to the right.

Christoph

Attachment

pgsql-hackers by date:

Previous
From: Nariman Ibadullaev
Date:
Subject: Solaris 10 (sparc) and unixODBC problem
Next
From: Gilles Darold
Date:
Subject: Re: [patch] Add schema total size to psql \dn+