1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Makefile for testing
  2. TESTPYPI = http://testpypi.python.org/pypi
  3. PYPI = http://pypi.python.org/pypi
  4. .PHONY: dogfood doc-check clean build dist-test dist \
  5. test test3 cov cov3 html reg reg3 profile profile3
  6. dogfood:
  7. ./cdiff.py
  8. git diff | ./cdiff.py -s
  9. doc-check:
  10. ./setup.py --long-description | rst2html.py --strict > output.html
  11. python -m webbrowser -n "file://$(shell pwd)/output.html"
  12. sleep 1
  13. rm -f output.html
  14. test: cov reg
  15. test3: cov3 reg3
  16. cov:
  17. coverage run tests/test_cdiff.py
  18. coverage report --show-missing
  19. cov3:
  20. python3 `which coverage` run tests/test_cdiff.py
  21. python3 `which coverage` report --show-missing
  22. html:
  23. coverage html
  24. python -m webbrowser -n "file://$(shell pwd)/htmlcov/index.html"
  25. reg:
  26. tests/regression.sh
  27. reg3:
  28. PYTHON=python3 tests/regression.sh
  29. profile:
  30. tests/profile.sh profile.tmp
  31. profile3:
  32. tests/profile.sh profile3.tmp
  33. clean:
  34. rm -f MANIFEST profile*.tmp* .coverage
  35. rm -rf build/ cdiff.egg-info/ dist/ __pycache__/ htmlcov/
  36. build:
  37. ./setup.py build sdist
  38. dist-test:
  39. ./setup.py build sdist register upload -r $(TESTPYPI)
  40. rm -f ~/.pypirc
  41. dist:
  42. ./setup.py build sdist register upload -r $(PYPI)
  43. rm -f ~/.pypirc
  44. # vim:set noet ts=8 sw=8: