You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 line
616 B

  1. #!/usr/bin/env bash
  2. # This script runs the PostgreSQL tests inside a Docker container. It expects
  3. # the relevant source files to be mounted into /src (done automatically by the
  4. # caller script). It will set up the database, run it, and then use the tox
  5. # configuration to run the tests.
  6. set -e
  7. # Set PGUSER so Synapse's tests know what user to connect to the database with
  8. export PGUSER=postgres
  9. # Start the database
  10. sudo -u postgres /usr/lib/postgresql/10/bin/pg_ctl -w -D /var/lib/postgresql/data start
  11. # Run the tests
  12. cd /src
  13. export TRIAL_FLAGS="-j 4"
  14. tox --workdir=./.tox-pg-container -e py37-postgres "$@"