aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2019-07-24 11:41:39 -0400
committerAndrew Dunstan <andrew@dunslane.net>2019-07-24 11:41:39 -0400
commit1a721248f3899ccf8c0c7512b91d8458f2394aeb (patch)
tree73c1c048430cf80086ee1e06446c5b52f5e2f2ca
parentfd7d387e0548fd371c06a91d75bc4632541ccfdd (diff)
downloadpostgresql-1a721248f3899ccf8c0c7512b91d8458f2394aeb.tar.gz
postgresql-1a721248f3899ccf8c0c7512b91d8458f2394aeb.zip
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.
-rw-r--r--src/bin/pgbench/t/001_pgbench_with_server.pl10
1 files 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 5a2fdb9acb9..b82d3f65c4f 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
}