##// END OF EJS Templates
nix: added custom build to allow turning off the sandbox
marcink -
r4759:53320c4a python3
parent child Browse files
Show More
@@ -1,69 +1,72 b''
1
1
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build generate-pkgs pip-packages
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build generate-pkgs pip-packages build-nix
3
3
4 NODE_PATH=./node_modules
4 NODE_PATH=./node_modules
5 WEBPACK=./node_binaries/webpack
5 WEBPACK=./node_binaries/webpack
6 GRUNT=./node_binaries/grunt
6 GRUNT=./node_binaries/grunt
7 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
7 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
8 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
8 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
9
9
10 clean:
10 clean:
11 make test-clean
11 make test-clean
12 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
12 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
13
13
14 test:
14 test:
15 make test-clean
15 make test-clean
16 make test-only
16 make test-only
17
17
18 test-clean:
18 test-clean:
19 rm -rf coverage.xml htmlcov junit.xml pylint.log result
19 rm -rf coverage.xml htmlcov junit.xml pylint.log result
20 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
20 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
21 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
21 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
22
22
23 test-only:
23 test-only:
24 PYTHONHASHSEED=random \
24 PYTHONHASHSEED=random \
25 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
25 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
26 --cov-report=term-missing --cov-report=html \
26 --cov-report=term-missing --cov-report=html \
27 rhodecode
27 rhodecode
28
28
29 test-only-mysql:
29 test-only-mysql:
30 PYTHONHASHSEED=random \
30 PYTHONHASHSEED=random \
31 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
31 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
32 --cov-report=term-missing --cov-report=html \
32 --cov-report=term-missing --cov-report=html \
33 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
33 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
34 rhodecode
34 rhodecode
35
35
36 test-only-postgres:
36 test-only-postgres:
37 PYTHONHASHSEED=random \
37 PYTHONHASHSEED=random \
38 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
38 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
39 --cov-report=term-missing --cov-report=html \
39 --cov-report=term-missing --cov-report=html \
40 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
40 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
41 rhodecode
41 rhodecode
42
42
43
43
44 docs:
44 docs:
45 (cd docs; nix-build default.nix -o result; make clean html)
45 (cd docs; nix-build default.nix -o result; make clean html)
46
46
47 docs-clean:
47 docs-clean:
48 (cd docs; make clean)
48 (cd docs; make clean)
49
49
50 docs-cleanup:
50 docs-cleanup:
51 (cd docs; make cleanup)
51 (cd docs; make cleanup)
52
52
53 web-build:
53 web-build:
54 NODE_PATH=$(NODE_PATH) $(GRUNT)
54 NODE_PATH=$(NODE_PATH) $(GRUNT)
55
55
56 generate-pkgs:
56 generate-pkgs:
57 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses --no-binary :all:"
57 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses --no-binary :all:"
58
58
59 pip-packages:
59 pip-packages:
60 python ${OUTDATED_PACKAGES}
60 python ${OUTDATED_PACKAGES}
61
61
62 generate-js-pkgs:
62 generate-js-pkgs:
63 rm -rf node_modules && \
63 rm -rf node_modules && \
64 nix-shell pkgs/shell-generate.nix --command "node2nix --input package.json -o pkgs/node-packages.nix -e pkgs/node-env.nix -c pkgs/node-default.nix -d --flatten --nodejs-8" && \
64 nix-shell pkgs/shell-generate.nix --command "node2nix --input package.json -o pkgs/node-packages.nix -e pkgs/node-env.nix -c pkgs/node-default.nix -d --flatten --nodejs-8" && \
65 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
65 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
66
66
67 generate-license-meta:
67 generate-license-meta:
68 nix-build pkgs/license-generate.nix -o result-license && \
68 nix-build pkgs/license-generate.nix -o result-license && \
69 cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json No newline at end of file
69 cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json
70
71 build-nix:
72 nix-build --show-trace --option sandbox false --option max-jobs 4 --option cores 4
General Comments 0
You need to be logged in to leave comments. Login now