Git Browser
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

39 lines
989 B

  1. TARGET?=tests
  2. test_default_python:
  3. @python --version
  4. DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" src/manage.py test -v2
  5. test_py2:
  6. @python --version
  7. DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" python2 src/manage.py test -v2
  8. test_py3:
  9. @python --version
  10. DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" python3 src/manage.py test -v2
  11. test: test_py2 test_py3
  12. compile:
  13. @echo Compiling python code
  14. python -m compileall src/
  15. compile_optimized:
  16. @echo Compiling python code optimized
  17. python -O -m compileall src/
  18. coverage:
  19. @python --version
  20. coverage erase
  21. DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" coverage run --source='src' src/manage.py test -v2
  22. coverage report
  23. sonar:
  24. /usr/local/bin/sonar-scanner/bin/sonar-scanner
  25. clean:
  26. find -name "*.py?" -or -name "coverage.xml" -or -name "testresults.xml" -delete
  27. rm -fr htmlcov dist *.egg-info
  28. travis: compile compile_optimized test_default_python coverage
  29. jenkins: travis sonar