No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

49 líneas
1.4 KiB

  1. #!/bin/bash
  2. #
  3. # runs dh_virtualenv to build the virtualenv in the build directory,
  4. # and then runs the trial tests against the installed synapse.
  5. set -e
  6. export DH_VIRTUALENV_INSTALL_ROOT=/opt/venvs
  7. SNAKE=/usr/bin/python3
  8. # try to set the CFLAGS so any compiled C extensions are compiled with the most
  9. # generic as possible x64 instructions, so that compiling it on a new Intel chip
  10. # doesn't enable features not available on older ones or AMD.
  11. #
  12. # TODO: add similar things for non-amd64, or figure out a more generic way to
  13. # do this.
  14. case `dpkg-architecture -q DEB_HOST_ARCH` in
  15. amd64)
  16. export CFLAGS=-march=x86-64
  17. ;;
  18. esac
  19. # Use --builtin-venv to use the better `venv` module from CPython 3.4+ rather
  20. # than the 2/3 compatible `virtualenv`.
  21. dh_virtualenv \
  22. --install-suffix "matrix-synapse" \
  23. --builtin-venv \
  24. --setuptools \
  25. --python "$SNAKE" \
  26. --upgrade-pip \
  27. --preinstall="lxml" \
  28. --preinstall="mock" \
  29. --extra-pip-arg="--no-cache-dir" \
  30. --extra-pip-arg="--compile"
  31. # we copy the tests to a temporary directory so that we can put them on the
  32. # PYTHONPATH without putting the uninstalled synapse on the pythonpath.
  33. tmpdir=`mktemp -d`
  34. trap "rm -r $tmpdir" EXIT
  35. cp -r tests "$tmpdir"
  36. cd debian/matrix-synapse-py3
  37. PYTHONPATH="$tmpdir" \
  38. ./opt/venvs/matrix-synapse/bin/python \
  39. -B -m twisted.trial --reporter=text -j2 tests