From 1a721248f3899ccf8c0c7512b91d8458f2394aeb Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Wed, 24 Jul 2019 11:41:39 -0400 Subject: [PATCH] Don't assume expr is available in pgbench tests Windows hosts do not normally come with expr, so instead of using that to test the \setshell command, use echo instead, which is fairly universally available. Backpatch to release 11, where this came in. Problem found by me, patch by Fabien Coelho. --- src/bin/pgbench/t/001_pgbench_with_server.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index 5a2fdb9acb..b82d3f65c4 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -512,7 +512,7 @@ pgbench( qr{processed: 1/1}, qr{shell-echo-output} ], - [qr{command=8.: int 2\b}], + [qr{command=8.: int 1\b}], 'pgbench backslash commands', { '001_pgbench_backslash_commands' => q{-- run set @@ -524,10 +524,10 @@ pgbench( \sleep 0 s \sleep :zero -- setshell and continuation -\setshell two\ - expr \ - 1 + :one -\set n debug(:two) +\setshell another_one\ + echo \ + :one +\set n debug(:another_one) -- shell \shell echo shell-echo-output }