[LNT] r311502 - Switch away from shell simple variables
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 15:01:30 PDT 2017
Author: cmatthews
Date: Tue Aug 22 15:01:30 2017
New Revision: 311502
URL: http://llvm.org/viewvc/llvm-project?rev=311502&view=rev
Log:
Switch away from shell simple variables
Modified:
lnt/trunk/tests/SharedInputs/postgres_wrapper.sh
Modified: lnt/trunk/tests/SharedInputs/postgres_wrapper.sh
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/SharedInputs/postgres_wrapper.sh?rev=311502&r1=311501&r2=311502&view=diff
==============================================================================
--- lnt/trunk/tests/SharedInputs/postgres_wrapper.sh (original)
+++ lnt/trunk/tests/SharedInputs/postgres_wrapper.sh Tue Aug 22 15:01:30 2017
@@ -18,23 +18,23 @@ fi
mkdir -p "${DBDIR}"
-INITDB_FLAGS+=" --pgdata=$DBDIR/db"
-INITDB_FLAGS+=" --xlogdir=$DBDIR/db"
+INITDB_FLAGS+=" --pgdata=${DBDIR}/db"
+INITDB_FLAGS+=" --xlogdir=${DBDIR}/db"
INITDB_FLAGS+=" --nosync"
INITDB_FLAGS+=" --no-locale"
INITDB_FLAGS+=" --auth=trust"
INITDB_FLAGS+=" --username=pgtest"
-echo "$ initdb $INITDB_FLAGS >& $DBDIR/initdb_log.txt"
-initdb $INITDB_FLAGS >& $DBDIR/initdb_log.txt
+echo "$ initdb $INITDB_FLAGS >& ${DBDIR}/initdb_log.txt"
+initdb ${INITDB_FLAGS} >& ${DBDIR}/initdb_log.txt
POSTGRES_FLAGS+=" -p 9100"
-POSTGRES_FLAGS+=" -D $DBDIR/db"
-POSTGRES_FLAGS+=" -k $DBDIR/db"
+POSTGRES_FLAGS+=" -D ${DBDIR}/db"
+POSTGRES_FLAGS+=" -k ${DBDIR}/db"
POSTGRES_FLAGS+=" -h 127.0.0.1"
POSTGRES_FLAGS+=" -F"
POSTGRES_FLAGS+=" -c logging_collector=off"
-echo "$ postgres $POSTGRES_FLAGS >& $DBDIR/server_log.txt"
-postgres $POSTGRES_FLAGS >& $DBDIR/server_log.txt &
+echo "$ postgres $POSTGRES_FLAGS >& ${DBDIR}/server_log.txt"
+postgres ${POSTGRES_FLAGS} >& ${DBDIR}/server_log.txt &
PG_PID=$!
sleep 1 # Give the server time to start.
@@ -43,8 +43,8 @@ eval "$@"
RC=$?
# Kill server
-kill -15 $PG_PID
+kill -15 ${PG_PID}
[ $? -ne 0 ] && (echo 1>&1 "Could not kill postgres server"; exit 1)
-wait $PG_PID
-exit $RC
+wait ${PG_PID}
rm -rf ${DBDIR}
+exit ${RC}
More information about the llvm-commits
mailing list