Show More
@@ -1,88 +1,93 b'' | |||
|
1 | 1 | |
|
2 | 2 | # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py |
|
3 | 3 | OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES} |
|
4 | 4 | |
|
5 | 5 | .PHONY: clean |
|
6 | 6 | ## Cleanup compiled and cache py files |
|
7 | 7 | clean: |
|
8 | 8 | make test-clean |
|
9 | 9 | find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';' |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | .PHONY: test |
|
13 | ## Run tests | |
|
13 | ## run test-clean and tests | |
|
14 | 14 | test: |
|
15 | 15 | make test-clean |
|
16 | 16 | make test-only |
|
17 | 17 | |
|
18 | 18 | |
|
19 | .PHONY:test-clean | |
|
20 | ## run test-clean and tests | |
|
21 | test-clean: | |
|
22 | rm -rf coverage.xml htmlcov junit.xml pylint.log result | |
|
23 | find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';' | |
|
24 | find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';' | |
|
25 | ||
|
26 | ||
|
19 | 27 | .PHONY: test-only |
|
20 | 28 | ## Run tests only without cleanup |
|
21 | 29 | test-only: |
|
22 | 30 | PYTHONHASHSEED=random \ |
|
23 | 31 | py.test -x -vv -r xw -p no:sugar \ |
|
24 | 32 | --cov-report=term-missing --cov-report=html --cov=vcsserver vcsserver |
|
25 | 33 | |
|
26 | 34 | |
|
27 | .PHONY: test-clean | |
|
28 | ## Cleanup test run artifacts | |
|
29 | test-clean: | |
|
30 | rm -rf coverage.xml htmlcov junit.xml pylint.log result | |
|
31 | find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';' | |
|
32 | find . -type d -name ".pytest_cache" -prune -exec rm -rf '{}' ';' | |
|
33 | find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';' | |
|
34 | 35 | |
|
35 | 36 | .PHONY: pip-packages |
|
36 | 37 | ## Show outdated packages |
|
37 | 38 | pip-packages: |
|
38 | 39 | python ${OUTDATED_PACKAGES} |
|
39 | 40 | |
|
40 | 41 | |
|
41 | 42 | .PHONY: sdist |
|
42 | 43 | ## Build sdist |
|
43 | 44 | sdist: |
|
44 | 45 | python setup.py sdist |
|
45 | 46 | |
|
47 | .PHONY: dev-env | |
|
48 | ## Build sdist | |
|
49 | dev-env: | |
|
50 | pip install -r requirements.txt -r requirements_pinned.txt -r requirements_debug.txt -r requirements_test.txt | |
|
51 | pip install -e . | |
|
46 | 52 | |
|
47 | 53 | # Default command on calling make |
|
48 | 54 | .DEFAULT_GOAL := show-help |
|
49 | 55 | |
|
50 | 56 | .PHONY: show-help |
|
51 | 57 | show-help: |
|
52 | 58 | @echo "$$(tput bold)Available rules:$$(tput sgr0)" |
|
53 | 59 | @echo |
|
54 | 60 | @sed -n -e "/^## / { \ |
|
55 | 61 | h; \ |
|
56 | 62 | s/.*//; \ |
|
57 | 63 | :doc" \ |
|
58 | 64 | -e "H; \ |
|
59 | 65 | n; \ |
|
60 | 66 | s/^## //; \ |
|
61 | 67 | t doc" \ |
|
62 | 68 | -e "s/:.*//; \ |
|
63 | 69 | G; \ |
|
64 | 70 | s/\\n## /---/; \ |
|
65 | 71 | s/\\n/ /g; \ |
|
66 | 72 | p; \ |
|
67 | 73 | }" ${MAKEFILE_LIST} \ |
|
68 | 74 | | LC_ALL='C' sort --ignore-case \ |
|
69 | 75 | | awk -F '---' \ |
|
70 | 76 | -v ncol=$$(tput cols) \ |
|
71 | 77 | -v indent=19 \ |
|
72 | 78 | -v col_on="$$(tput setaf 6)" \ |
|
73 | 79 | -v col_off="$$(tput sgr0)" \ |
|
74 | 80 | '{ \ |
|
75 | 81 | printf "%s%*s%s ", col_on, -indent, $$1, col_off; \ |
|
76 | 82 | n = split($$2, words, " "); \ |
|
77 | 83 | line_length = ncol - indent; \ |
|
78 | 84 | for (i = 1; i <= n; i++) { \ |
|
79 | 85 | line_length -= length(words[i]) + 1; \ |
|
80 | 86 | if (line_length <= 0) { \ |
|
81 | 87 | line_length = ncol - indent - length(words[i]) - 1; \ |
|
82 | 88 | printf "\n%*s ", -indent, " "; \ |
|
83 | 89 | } \ |
|
84 | 90 | printf "%s ", words[i]; \ |
|
85 | 91 | } \ |
|
86 | 92 | printf "\n"; \ |
|
87 |
}' |
|
|
88 | | more $(shell test $(shell uname) == Darwin && echo '--no-init --raw-control-chars') | |
|
93 | }' |
General Comments 0
You need to be logged in to leave comments.
Login now