Permalink
Browse files

rewrite tests script as Makefile

  • Loading branch information...
1 parent 88e3139 commit d17a4d5b6390c7fd4213c359b6f05611c4d57c27 @domenkozar committed Jan 2, 2013
View
1 bobtemplates/ielectric/pyramid/.gitignore
@@ -9,3 +9,4 @@
/eggs/
/parts/
/var/
+/build/
View
6 bobtemplates/ielectric/pyramid/.travis.yml.bob
@@ -2,13 +2,13 @@ language: python
python:
- 2.6
- 2.7
- - pypy
{{% if python3 %}}
- - 3.1
- 3.2
+ - 3.3
{{% endif %}}
+ - pypy
install:
- python bootstrap.py
- bin/buildout
script:
- - ./run_tests.sh
+ - make test -k
View
9 bobtemplates/ielectric/pyramid/Makefile.bob
@@ -0,0 +1,9 @@
+test: nosetests flake8
+
+nosetests:
+ @echo "==== Running nosetests ===="
+ @nosetests
+
+flake8:
+ @echo "==== Running Flake8 ===="
+ @flake8 {{{package.dottedname}}} *.py
View
3 bobtemplates/ielectric/pyramid/docs/conf.py.bob
@@ -21,7 +21,8 @@ from datetime import datetime
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
- 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
+ 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
+ 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
View
21 bobtemplates/ielectric/pyramid/run_tests.sh.bob
@@ -1,21 +0,0 @@
-#!/bin/bash
-# TODO: stash changes before doing tests: http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
-
-function handle_exit {
- if [ $? -ne 0 ]; then
- EXITCODE=1
- fi
-}
-
-EXITCODE=0
-
-echo '====== Running tests ========='
-bin/nosetests; handle_exit
-
-echo '====== Running flake8 =========='
-bin/flake8 {{{ package.name }}}; handle_exit
-bin/flake8 *.py; handle_exit
-
-if [ $EXITCODE -ne 0 ]; then
- exit 1
-fi
View
1 bobtemplates/ielectric/python_package/.gitignore
@@ -5,3 +5,4 @@
/lib/
/dist/
/include/
+/build/
View
2 bobtemplates/ielectric/python_package/.travis.yml.bob
@@ -11,4 +11,4 @@ install:
- python setup.py develop
- easy_install {{{package.name}}}[test]
script:
- - ./run_tests.sh
+ - make test -k
View
9 bobtemplates/ielectric/python_package/Makefile.bob
@@ -0,0 +1,9 @@
+test: nosetests flake8
+
+nosetests:
+ @echo "==== Running nosetests ===="
+ @nosetests
+
+flake8:
+ @echo "==== Running Flake8 ===="
+ @flake8 {{{package.dottedname}}} *.py
View
2 bobtemplates/ielectric/python_package/README.rst.bob
@@ -26,4 +26,4 @@ RUNNING TESTS
=============
::
- $ nosetests
+ $ make test
View
21 bobtemplates/ielectric/python_package/run_tests.sh.bob
@@ -1,21 +0,0 @@
-#!/bin/bash
-# TODO: stash changes before doing tests: http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
-
-function handle_exit {
- if [ $? -ne 0 ]; then
- EXITCODE=1
- fi
-}
-
-EXITCODE=0
-
-echo '====== Running tests ========='
-bin/nosetests; handle_exit
-
-echo '====== Running flake8 =========='
-bin/flake8 {{{ package.dottedname }}}; handle_exit
-bin/flake8 *.py; handle_exit
-
-if [ $EXITCODE -ne 0 ]; then
- exit 1
-fi

0 comments on commit d17a4d5

Please sign in to comment.