Skip to content
This repository
Browse code

Various Makefile updates

  • Loading branch information...
commit 7f9ea04286db69ef863b315cda1bc7f72f52c9d6 1 parent 317f64a
Shivaram Lingamneni authored May 02, 2012
7  .gitignore
... ...
@@ -1,10 +1,13 @@
  1
+.coverage
1 2
 MANIFEST
2 3
 coverage.xml
3 4
 nosetests.xml
  5
+junit-report.xml
4 6
 pylint.txt
5 7
 toy.py
6  
-junit-report.xml
7  
-requests.egg-info/
  8
+violations.pyflakes.txt
  9
+cover/
8 10
 docs/_build
  11
+requests.egg-info/
9 12
 *.pyc
10 13
 *.swp
2  .travis.yml
@@ -4,7 +4,7 @@ python:
4 4
   - 2.7
5 5
   - 3.2
6 6
 env: HTTPBIN_URL=http://httpbin.org/
7  
-script: make ci
  7
+script: make travis
8 8
 install:
9 9
   - pip install nose
10 10
   - pip install . --use-mirrors
30  Makefile
... ...
@@ -1,5 +1,13 @@
1 1
 SHELL := /bin/bash
2 2
 
  3
+# these files should pass pyflakes
  4
+PYFLAKES_WHITELIST=$(shell find . -name "*.py" ! -path "./docs/*" ! -path "./tests/*" ! -path "./requests/packages/*" \
  5
+	! -path "./requests/__init__.py" ! -path "./requests/compat.py")
  6
+
  7
+# test_requests_ext.py depends on external services, and async doesn't work under Python 3
  8
+# Travis/Jenkins should be ensuring that all other tests pass on all supported versions
  9
+CI_TESTS=$(shell find tests/ -name "*.py" ! -name "test_requests_ext.py" ! -name "test_requests_async.py")
  10
+
3 11
 init:
4 12
 	python setup.py develop
5 13
 	pip install -r requirements.txt
@@ -13,20 +21,30 @@ lazy:
13 21
 simple:
14 22
 	nosetests tests/test_requests.py
15 23
 
16  
-ci:
17  
-	find tests/ -name "*.py" ! -name "test_requests_ext.py" ! -name "test_requests_async.py" | xargs nosetests --with-xunit --xunit-file=junit-report.xml
  24
+pyflakes:
  25
+	pyflakes ${PYFLAKES_WHITELIST}
  26
+
  27
+citests:
  28
+	nosetests ${CI_TESTS} --with-xunit --xunit-file=junit-report.xml
  29
+
  30
+ci: citests pyflakes
  31
+
  32
+travis: citests
18 33
 
19 34
 server:
20 35
 	gunicorn httpbin:app --bind=0.0.0.0:7077 &
21 36
 
22  
-stats:
23  
-	pyflakes requests | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' > violations.pyflakes.txt
  37
+# compute statistics of various kinds
  38
+lemonade:
  39
+	-pyflakes requests > violations.pyflakes.txt
  40
+	# HTML output will be available in the default location, ./cover/
  41
+	nosetests --with-coverage --cover-html --cover-package=requests ${CI_TESTS} ./tests/test_requests_async.py
24 42
 
25 43
 site:
26 44
 	cd docs; make dirhtml
27 45
 
28  
-pyc:
29  
-	find . -name "*.pyc" -exec rm '{}' ';'
  46
+clean:
  47
+	git clean -Xfd
30 48
 
31 49
 deps:
32 50
 	rm -fr requests/packages/urllib3

0 notes on commit 7f9ea04

Please sign in to comment.
Something went wrong with that request. Please try again.