summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Jie Lin <livibetter@gmail.com>2013-08-16 19:58:43 +0800
committerYu-Jie Lin <livibetter@gmail.com>2013-08-16 19:58:43 +0800
commit15f8191c9f7a2dac88c5a6eb2b2886ee72387ff2 (patch)
tree0a0c4dbff6f246499c90eec55453067eb7b18251
parentb8ad4478d0f94ffa8983a7fb5b72778c0d6283d6 (diff)
downloadsmartypants-git-15f8191c9f7a2dac88c5a6eb2b2886ee72387ff2.tar.gz
make test for everything
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 45f87d4..d614b0c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
PACKAGE=smartypants
SCRIPT=smartypants
+PY2_CMD=python2
+PY3_CMD=python3
INSTALL_TEST_DIR=/tmp/$(PACKAGE)_install_test
# if version or naming isn't matched to environment, for example, Python 2.6,
# run the following to override:
@@ -16,9 +18,18 @@ build:
upload:
$(BUILD_CMD) upload
+test: test_pep8 test_pyflakes test_test install_test
+
+test_%:
+ @echo '========================================================================================='
+ $(PY2_CMD) setup.py $(subst test_,,$@)
+ @echo '-----------------------------------------------------------------------------------------'
+ $(PY3_CMD) setup.py $(subst test_,,$@)
+
install_test: $(VENV_PY2_CMD) $(VENV_PY3_CMD)
$(VENV_PY2_CMD) $(VENV_PY3_CMD):
+ @echo '========================================================================================='
rm -rf $(INSTALL_TEST_DIR)
$@ $(INSTALL_TEST_DIR)
./setup.py sdist --dist-dir $(INSTALL_TEST_DIR)