Re: Add .log file ending to tap test log files

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Add .log file ending to tap test log files
Date: 2021-03-04 21:28:57
Message-ID: 20210304212857.GA21785@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Mar-04, Andres Freund wrote:

> Right now it's harder than necessary to capture the log output from tap
> tests because the the regression tests files don't end with a common
> file ending with other types of logs. They're
> # Open the test log file, whose name depends on the test name.
> $test_logfile = basename($0);
> $test_logfile =~ s/\.[^.]+$//;
> $test_logfile = "$log_path/regress_log_$test_logfile";
>
> This was essentially introduced in 1ea06203b82: "Improve logging of TAP tests."

You're misreading this code (I did too): there's no "_logfile" suffix --
$test_logfile is the name of a single variable, it's not $test followed
by _logfile. So the name is "regress_log_001_FOOBAR" with the basename
at the end. But I agree:

> Would anybody object to replacing _logfile with .log? I realize that'd
> potentially would cause some short-term pain on the buildfarm, but I
> think it'd improve things longer term.

Let's add a .log prefix. And also, I would propose a more extensive
renaming, if we're going to do it -- I dislike that the server log files
start with "00x" and the regress ones have the 00x bit in the middle of
the name. So how about we make this
$log_path/$test_logfile.regress.log.

--
Álvaro Herrera 39°49'30"S 73°17'W
"Los dioses no protegen a los insensatos. Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-03-04 21:35:35 Re: Removing support for COPY FROM STDIN in protocol version 2
Previous Message Tom Lane 2021-03-04 21:28:49 Re: [PATCH] postgres-fdw: column option to override foreign types