2016-12-24 04:15:24 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Run the tests in all the databases
|
|
|
|
# The script is designed for a Trusty environment.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
run_test () {
|
|
|
|
version=$1
|
|
|
|
port=$2
|
2016-12-24 06:42:07 +03:00
|
|
|
dbname=psycopg2_test
|
2016-12-24 04:15:24 +03:00
|
|
|
|
|
|
|
printf "\n\nRunning tests against PostgreSQL $version\n\n"
|
|
|
|
export PSYCOPG2_TESTDB=$dbname
|
|
|
|
export PSYCOPG2_TESTDB_PORT=$port
|
|
|
|
export PSYCOPG2_TESTDB_USER=travis
|
2016-12-25 19:49:58 +03:00
|
|
|
export PSYCOPG2_TEST_REPL_DSN=
|
2016-12-26 06:31:18 +03:00
|
|
|
unset PSYCOPG2_TEST_GREEN
|
2016-12-26 05:47:13 +03:00
|
|
|
python -c "from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
2016-12-24 04:15:24 +03:00
|
|
|
|
|
|
|
printf "\n\nRunning tests against PostgreSQL $version (green mode)\n\n"
|
|
|
|
export PSYCOPG2_TEST_GREEN=1
|
2016-12-26 05:47:13 +03:00
|
|
|
python -c "from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
2016-12-24 04:15:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
run_test 9.6 54396
|
|
|
|
run_test 9.5 54395
|
|
|
|
run_test 9.4 54394
|
|
|
|
run_test 9.3 54393
|
|
|
|
run_test 9.2 54392
|