Fix assorted portability issues in new pgbench TAP tests.

* Our own version of getopt_long doesn't support abbreviation of
long options.

* It doesn't do automatic rearrangement of non-option arguments to the end,
either.

* Test was way too optimistic about the platform independence of
NaN and Infinity outputs.  I rather imagine we might have to lose
those tests altogether, but for the moment just allow case variation
and fully spelled out Infinity.

Per buildfarm.
This commit is contained in:
Tom Lane 2017-09-08 11:28:02 -04:00
parent ed8a7c6fcf
commit 869aa40a27
2 changed files with 5 additions and 8 deletions

View File

@ -89,10 +89,7 @@ pgbench(
# Again, with all possible options
pgbench(
# unlogged => faster test
'--initialize --scale=1 --unlogged --fillfactor=98 --foreign-keys --quiet'
. ' --tablespace=pg_default --index-tablespace=pg_default',
'--initialize --scale=1 --unlogged-tables --fillfactor=98 --foreign-keys --quiet --tablespace=pg_default --index-tablespace=pg_default',
0,
[qr{^$}i],
[ qr{creating tables},
@ -220,9 +217,9 @@ pgbench(
qr{command=18.: double 18\b},
qr{command=19.: double 19\b},
qr{command=20.: double 20\b},
qr{command=21.: double -?nan\b},
qr{command=22.: double inf\b},
qr{command=23.: double -inf\b},
qr{command=21.: double -?nan}i,
qr{command=22.: double inf}i,
qr{command=23.: double -inf}i,
qr{command=24.: int 9223372036854775807\b}, ],
'pgbench expressions',
{ '001_pgbench_expressions' => q{-- integer functions

View File

@ -25,7 +25,7 @@ my @options = (
# name, options, stderr checks
[ 'bad option',
'-h home -p 5432 -U calvin -d stuff --bad-option',
'-h home -p 5432 -U calvin -d --bad-option',
[ qr{unrecognized option}, qr{--help.*more information} ] ],
[ 'no file',
'-f no-such-file',