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