2007-11-11 13:40:12 +03:00
|
|
|
PYTHON = python$(PYTHON_VERSION)
|
|
|
|
#PYTHON_VERSION = 2.4
|
|
|
|
|
|
|
|
TESTDB = psycopg2_test
|
|
|
|
|
|
|
|
all:
|
|
|
|
@:
|
|
|
|
|
|
|
|
check:
|
|
|
|
@echo "* Creating $(TESTDB)"
|
|
|
|
@if psql -l | grep -q " $(TESTDB) "; then \
|
|
|
|
dropdb $(TESTDB) >/dev/null; \
|
|
|
|
fi
|
|
|
|
createdb $(TESTDB)
|
2010-11-02 02:43:38 +03:00
|
|
|
# Note to packagers: this requires the postgres user running the test
|
|
|
|
# to be a superuser. You may change this line to use the superuser only
|
|
|
|
# to install the contrib. Feel free to suggest a better way to set up the
|
|
|
|
# testing environment (as the current is enough for development).
|
|
|
|
psql -f `pg_config --sharedir`/contrib/hstore.sql $(TESTDB)
|
2008-02-27 05:29:55 +03:00
|
|
|
PSYCOPG2_TESTDB=$(TESTDB) $(PYTHON) runtests.py --verbose
|