Commit 0baa33da authored by Andres Freund's avatar Andres Freund

Reference test binary using TESTDIR in 001_libpq_pipeline.pl.

The previous approach didn't really work on windows, due to the PATH separator
being ';' not ':'. Instead of making the PATH change more complicated,
reference the binary using the TESTDIR environment.
Reported-By: default avatarAndres Freund <andres@anarazel.de>
Suggested-By: default avatarAndrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/20210930214040.odkdd42vknvzifm6@alap3.anarazel.de
Backpatch: 14-, where the test was introduced.
parent 20047609
...@@ -14,9 +14,9 @@ $node->init; ...@@ -14,9 +14,9 @@ $node->init;
$node->start; $node->start;
my $numrows = 700; my $numrows = 700;
$ENV{PATH} = "$ENV{TESTDIR}:$ENV{PATH}"; my $libpq_pipeline = "$ENV{TESTDIR}/libpq_pipeline";
my ($out, $err) = run_command([ 'libpq_pipeline', 'tests' ]); my ($out, $err) = run_command([ $libpq_pipeline, 'tests' ]);
die "oops: $err" unless $err eq ''; die "oops: $err" unless $err eq '';
my @tests = split(/\s+/, $out); my @tests = split(/\s+/, $out);
...@@ -39,8 +39,8 @@ for my $testname (@tests) ...@@ -39,8 +39,8 @@ for my $testname (@tests)
# Execute the test # Execute the test
$node->command_ok( $node->command_ok(
[ [
'libpq_pipeline', @extraargs, $libpq_pipeline, @extraargs,
$testname, $node->connstr('postgres') $testname, $node->connstr('postgres')
], ],
"libpq_pipeline $testname"); "libpq_pipeline $testname");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment