浏览代码

Add target for coverage html report

Matthew Wang 11 年前
父节点
当前提交
0e6c439fb3
共有 2 个文件被更改,包括 8 次插入3 次删除
  1. 1
    0
      .gitignore
  2. 7
    3
      Makefile

+ 1
- 0
.gitignore 查看文件

2
 *~
2
 *~
3
 *.tmp
3
 *.tmp
4
 /.coverage
4
 /.coverage
5
+/htmlcov/
5
 /MANIFEST
6
 /MANIFEST
6
 /build/
7
 /build/
7
 /cdiff.egg-info/
8
 /cdiff.egg-info/

+ 7
- 3
Makefile 查看文件

4
 PYPI = https://pypi.python.org/pypi
4
 PYPI = https://pypi.python.org/pypi
5
 
5
 
6
 .PHONY: dogfood clean build dist-test dist \
6
 .PHONY: dogfood clean build dist-test dist \
7
-	test test3 cov cov3 reg reg3 profile profile3
7
+	test test3 cov cov3 html reg reg3 profile profile3
8
 
8
 
9
 dogfood:
9
 dogfood:
10
 	./cdiff.py
10
 	./cdiff.py
16
 
16
 
17
 cov:
17
 cov:
18
 	coverage run tests/test_cdiff.py
18
 	coverage run tests/test_cdiff.py
19
-	coverage report --include cdiff.py --show-missing
19
+	coverage report --show-missing
20
 
20
 
21
 cov3:
21
 cov3:
22
 	python3 `which coverage` run tests/test_cdiff.py
22
 	python3 `which coverage` run tests/test_cdiff.py
23
-	python3 `which coverage` report --include cdiff.py --show-missing
23
+	python3 `which coverage` report --show-missing
24
+
25
+html:
26
+	coverage html
27
+	python -m webbrowser -n "file://$(shell pwd)/htmlcov/index.html"
24
 
28
 
25
 reg:
29
 reg:
26
 	tests/regression.sh
30
 	tests/regression.sh