making pg_regress less noisy by removing boilerplate - Mailing list pgsql-hackers

From Andres Freund
Subject making pg_regress less noisy by removing boilerplate
Date
Msg-id 20220221164736.rq3ornzjdkmwk2wo@alap3.anarazel.de
Whole thread Raw
Responses Re: making pg_regress less noisy by removing boilerplate
List pgsql-hackers
Hi,

When running check-world, a good chunk of the output is just pg_regress
boilerplate. It doesn't matter when running tests individually or for tests
with a lot of individual tests like the main regression tests. But for lots of
the rest it is noisy. These days there are many more regression tests than
there used to be when the output was designed...


  ============== creating temporary instance            ==============
  ============== initializing database system           ==============
  ============== starting postmaster                    ==============
  running on port 51696 with PID 1156405
  ============== creating database "contrib_regression" ==============
  CREATE DATABASE
  ALTER DATABASE
  ============== installing hstore                      ==============
  CREATE EXTENSION
  ============== running regression test queries        ==============
  test python3/hstore_plpython      ... ok           50 ms
  ============== shutting down postmaster               ==============
  ============== removing temporary instance            ==============

  =====================
   All 1 tests passed.
  =====================

  ============== creating temporary instance            ==============
  [...]


It seems we could

- combine "creating temporary instance", "initializing database system" and
  "starting postmaster"
- combine "creating database" and "installing *" sections
- combine "shutting down postmaster" and "removing temporary instance"
- put CREATE DATABASE, ALTER DATABASE, CREATE EXTENSION into a single line

without loosing much information, but reducing the vertical space used a lot?

It might even be worth further collapsing "starting postmaster" and "creating
database" etc into one.


There's also Daniel's patch of adding a tap compatible output mode [1]. I
still like that idea a lot - being able to parse test successes / failures in
a uniform way across tests would be great. The meson testrunner for example
would benefit from that.  But if I understood that patch, it'd also benefit
from the reduction in unnecessary headers, albeit not as crucially.

Greetings,

Andres Freund

[1] https://postgr.es/m/62A6B9F0-C3D3-45CD-8E8B-90A8E5B08DFA%40yesql.se



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_upgrade verbosity when redirecting output to log file
Next
From: Chapman Flack
Date:
Subject: Re: Reducing power consumption on idle servers