1
0

test_postgresql.sh 583 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. # This script builds the Docker image to run the PostgreSQL tests, and then runs
  3. # the tests. It uses a dedicated tox environment so that we don't have to
  4. # rebuild it each time.
  5. # Command line arguments to this script are forwarded to "tox" and then to "trial".
  6. set -e
  7. # Build, and tag
  8. docker build docker/ \
  9. --build-arg "UID=$(id -u)" \
  10. --build-arg "GID=$(id -g)" \
  11. -f docker/Dockerfile-pgtests \
  12. -t synapsepgtests
  13. # Run, mounting the current directory into /src
  14. docker run --rm -it -v "$(pwd):/src" -v synapse-pg-test-tox:/tox synapsepgtests "$@"