Commit d45cfb4b authored by Tom Lane's avatar Tom Lane

Use cat instead of echo or awk, to avoid portability problems with backslashes.

parent 63e97345
#! /bin/sh #! /bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.28 2002/10/19 01:35:43 momjian Exp $ # $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.29 2002/11/13 16:40:23 tgl Exp $
me=`basename $0` me=`basename $0`
: ${TMPDIR=/tmp} : ${TMPDIR=/tmp}
...@@ -545,16 +545,22 @@ do ...@@ -545,16 +545,22 @@ do
formatted=`echo $1 | awk '{printf "%-20.20s", $1;}'` formatted=`echo $1 | awk '{printf "%-20.20s", $1;}'`
$ECHO_N "test $formatted ... $ECHO_C" $ECHO_N "test $formatted ... $ECHO_C"
# use awk to properly output backslashes (cat <<EOF
(echo "SET autocommit TO 'on';"; awk 'BEGIN {printf "\\set ECHO all\n"}'; cat "$inputdir/sql/$1.sql") | SET autocommit TO 'on';
\\set ECHO all
EOF
cat "$inputdir/sql/$1.sql") | \
$PSQL -d "$dbname" >"$outputdir/results/$1.out" 2>&1 $PSQL -d "$dbname" >"$outputdir/results/$1.out" 2>&1
else else
# Start a parallel group # Start a parallel group
$ECHO_N "parallel group ($# tests): $ECHO_C" $ECHO_N "parallel group ($# tests): $ECHO_C"
for name do for name do
( (
# use awk to properly output backslashes (cat <<EOF
(echo "SET autocommit TO 'on';"; awk 'BEGIN {printf "\\set ECHO all\n"}'; cat "$inputdir/sql/$name.sql") | SET autocommit TO 'on';
\\set ECHO all
EOF
cat "$inputdir/sql/$name.sql") | \
$PSQL -d $dbname >"$outputdir/results/$name.out" 2>&1 $PSQL -d $dbname >"$outputdir/results/$name.out" 2>&1
$ECHO_N " $name$ECHO_C" $ECHO_N " $name$ECHO_C"
) & ) &
......
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