Merge lp:~statik/summit/gimmetests into lp:summit

Proposed by Elliot Murphy
Status: Merged
Approved by: Michael Hall
Approved revision: 66
Merged at revision: 70
Proposed branch: lp:~statik/summit/gimmetests
Merge into: lp:summit
Diff against target: 61 lines (+49/-0)
2 files modified
INSTALL (+4/-0)
Makefile (+45/-0)
To merge this branch: bzr merge lp:~statik/summit/gimmetests
Reviewer Review Type Date Requested Status
Summit Hackers Pending
Review via email: mp+55942@code.launchpad.net

Description of the change

This adds a Makefile at the root of the tree for convenience, and some targets for running lint and reporting code coverage information (ZERO TESTS CURRENTLY!)

Next will be wiring in some test framework.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'INSTALL'
--- INSTALL 2011-03-15 19:28:59 +0000
+++ INSTALL 2011-04-01 14:35:54 +0000
@@ -14,3 +14,7 @@
14 - ./manage.py syncdb14 - ./manage.py syncdb
15 - ./manage.py migrate15 - ./manage.py migrate
16 - ./manage.py runserver16 - ./manage.py runserver
17
18To develop summit, you should also have code linting, coverage, and testrunner tools installed:
19 - sudo apt-get install python-setuptools python-coverage python-django-nose python-freshen
20 - sudo pip install flake8
1721
=== added file 'Makefile'
--- Makefile 1970-01-01 00:00:00 +0000
+++ Makefile 2011-04-01 14:35:54 +0000
@@ -0,0 +1,45 @@
1export ROOTDIR ?= $(shell bzr root)
2export DBDIR ?= $(ROOTDIR)/tmp/db
3COVERAGE=$(shell which python-coverage)
4
5check: lint
6 @echo FIXME
7# @nosetests --config=.nosecfg
8
9lint:
10 @find summit -name \*.py -exec flake8 {} \;
11
12info:
13 @bzr info
14 @echo
15 @echo Bzr revno:
16 @bzr revno
17 @echo "Lines of application code"
18 @find summit -name \*py | grep -v test_ | xargs cat | wc -l
19 @echo
20 @echo "Lines of test code:"
21 @find summit -name \*py | grep test_ | xargs cat | wc -l
22 @echo
23 @$(COVERAGE) report --omit="test_*"
24
25clean:
26 find summit -name \*pyc -exec rm {} \;
27 rm -rf cover
28 rm -rf dist
29 rm -rf MANIFEST
30
31dist:
32 python setup.py sdist
33 cd dist; tar tvf *.tar.gz
34
35$(DBDIR):
36 mkdir -p $(DBDIR)
37
38start-db: $(DBDIR)
39 @echo FIXME
40
41stop-db: $(DBDIR)
42 @echo FIXME
43
44.PHONY: dist autotest clean info lint check start-db stop-db
45.NOTPARALLEL:

Subscribers

People subscribed via source and target branches