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:47:58 -0400
commitbfa4263e7119685cddb08ed2e2b3462157d4d453 (patch)
tree0c14360adf8c38bd9d290989f9234a170a853715
parenta15a40aaaedfa01f41471f74aa8ac44168603fb9 (diff)
downloadpostgresql-bfa4263e7119685cddb08ed2e2b3462157d4d453.tar.gz
postgresql-bfa4263e7119685cddb08ed2e2b3462157d4d453.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 3b097a91b28..85ad5ac14b8 100644
--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -510,7 +510,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
@@ -522,10 +522,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
}