PATH manipulation in 001_libpq_pipeline.pl fails on windows

Started by Andres Freundover 4 years ago5 messages
#1Andres Freund
andres@anarazel.de

Hi,

For me 001_libpq_pipeline.pl doesn't reliably work on windows, because it
tries to add something to PATH, using unix syntax (vs ; used on windows).

$ENV{PATH} = "$ENV{TESTDIR}:$ENV{PATH}";

If the first two elements in PATH are something needed, this can cause the
test to fail... I'm surprised this doesn't cause problems on the buildfarm - a
plain
perl src\tools\msvc\vcregress.pl taptest src\test\modules\libpq_pipeline\
fails for me.

Greetings,

Andres Freund

#2Andrew Dunstan
andrew@dunslane.net
In reply to: Andres Freund (#1)
Re: PATH manipulation in 001_libpq_pipeline.pl fails on windows

On 9/30/21 5:40 PM, Andres Freund wrote:

Hi,

For me 001_libpq_pipeline.pl doesn't reliably work on windows, because it
tries to add something to PATH, using unix syntax (vs ; used on windows).

$ENV{PATH} = "$ENV{TESTDIR}:$ENV{PATH}";

If the first two elements in PATH are something needed, this can cause the
test to fail... I'm surprised this doesn't cause problems on the buildfarm - a
plain
perl src\tools\msvc\vcregress.pl taptest src\test\modules\libpq_pipeline\
fails for me.

Not sure. That's certainly an error.

But why are we mangling the PATH at all? Wouldn't it be better just to
call command_ok with "$ENV{TESTDIR}/libpg_pipeline" ?

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

#3Andres Freund
andres@anarazel.de
In reply to: Andrew Dunstan (#2)
Re: PATH manipulation in 001_libpq_pipeline.pl fails on windows

Hi,

On 2021-10-01 14:07:42 -0400, Andrew Dunstan wrote:

But why are we mangling the PATH at all? Wouldn't it be better just to
call command_ok with "$ENV{TESTDIR}/libpg_pipeline" ?

Yea, it probably would. Alvaro, I assume you don't mind if I change that?

Greetings,

Andres Freund

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Andres Freund (#3)
Re: PATH manipulation in 001_libpq_pipeline.pl fails on windows

On 2021-Oct-01, Andres Freund wrote:

Hi,

On 2021-10-01 14:07:42 -0400, Andrew Dunstan wrote:

But why are we mangling the PATH at all? Wouldn't it be better just to
call command_ok with "$ENV{TESTDIR}/libpg_pipeline" ?

Yea, it probably would. Alvaro, I assume you don't mind if I change that?

Hi, no, please go ahead.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"En las profundidades de nuestro inconsciente hay una obsesiva necesidad
de un universo lógico y coherente. Pero el universo real se halla siempre
un paso más allá de la lógica" (Irulan)

#5Andres Freund
andres@anarazel.de
In reply to: Alvaro Herrera (#4)
Re: PATH manipulation in 001_libpq_pipeline.pl fails on windows

On 2021-10-01 17:37:11 -0300, Alvaro Herrera wrote:

On 2021-Oct-01, Andres Freund wrote:

On 2021-10-01 14:07:42 -0400, Andrew Dunstan wrote:

But why are we mangling the PATH at all? Wouldn't it be better just to
call command_ok with "$ENV{TESTDIR}/libpg_pipeline" ?

Yea, it probably would. Alvaro, I assume you don't mind if I change that?

Hi, no, please go ahead.

Done.