Skip to content

Commit

Permalink
Added a load/unload cycle to the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvarrazzo committed Nov 27, 2011
1 parent 037eab4 commit fc617f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dbtest/_test_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ ${PGXN} install --nosudo ${LEVEL} ${EXTENSION} || exit
echo "CHECK"
${PGXN} check ${TEST_DSN} ${LEVEL} ${EXTENSION}

echo "LOAD/UNLOAD"
dropdb -h ${PG_HOST} -p ${PG_PORT} ${TEST_DB}
createdb -h ${PG_HOST} -p ${PG_PORT} ${TEST_DB}
${PGXN} load ${TEST_DSN} ${LEVEL} ${EXTENSION} || exit
${PGXN} unload ${TEST_DSN} ${LEVEL} ${EXTENSION}

echo "UNINSTALL"
dropdb -p ${PG_PORT} ${TEST_DB}
dropdb -h ${PG_HOST} -p ${PG_PORT} ${TEST_DB}
${PGXN} uninstall --nosudo ${LEVEL} ${EXTENSION} || exit

2 changes: 1 addition & 1 deletion dbtest/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export PG_ROOT=`pwd`/postgresql-${PG_VERSION}/root/
export PG_PORT=15432
export PG_HOST=localhost
export TEST_DB=contrib_regression
export TEST_DSN="-h ${PG_HOST} -p ${PG_PORT}"
export TEST_DSN="-d ${TEST_DB} -h ${PG_HOST} -p ${PG_PORT}"
export PYTHONPATH=`pwd`/..:$PYTHONPATH
export PATH=`pwd`/../bin:${PG_ROOT}/bin/:${PATH}
export PGXN=`which pgxn`

0 comments on commit fc617f0

Please sign in to comment.