##// END OF EJS Templates
tests: allow running tests via make file on different databases
marcink -
r2100:f2bf7ee3 default
parent child Browse files
Show More
@@ -1,5 +1,5 b''
1
1
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only web-build
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build
3
3
4 WEBPACK=./node_modules/webpack/bin/webpack.js
4 WEBPACK=./node_modules/webpack/bin/webpack.js
5 GRUNT=grunt
5 GRUNT=grunt
@@ -19,7 +19,25 b' test-clean:'
19 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
19 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
20
20
21 test-only:
21 test-only:
22 PYTHONHASHSEED=random py.test -vv -r xw --cov=rhodecode --cov-report=term-missing --cov-report=html rhodecode
22 PYTHONHASHSEED=random \
23 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
24 --cov-report=term-missing --cov-report=html \
25 rhodecode
26
27 test-only-mysql:
28 PYTHONHASHSEED=random \
29 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
30 --cov-report=term-missing --cov-report=html \
31 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test"}}' \
32 rhodecode
33
34 test-only-postgres:
35 PYTHONHASHSEED=random \
36 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
37 --cov-report=term-missing --cov-report=html \
38 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
39 rhodecode
40
23
41
24 docs:
42 docs:
25 (cd docs; nix-build default.nix -o result; make clean html)
43 (cd docs; nix-build default.nix -o result; make clean html)
@@ -55,7 +55,7 b' def pytest_addoption(parser):'
55 '--with-pylons', dest='pylons_config',
55 '--with-pylons', dest='pylons_config',
56 help="Set up a Pylons environment with the specified config file.")
56 help="Set up a Pylons environment with the specified config file.")
57 group.addoption(
57 group.addoption(
58 '--pylons-config-override', action='store', type=_parse_json,
58 '--ini-config-override', action='store', type=_parse_json,
59 default=None, dest='pylons_config_override', help=(
59 default=None, dest='pylons_config_override', help=(
60 "Overrides the .ini file settings. Should be specified in JSON"
60 "Overrides the .ini file settings. Should be specified in JSON"
61 " format, e.g. '{\"section\": {\"parameter\": \"value\", ...}}'"
61 " format, e.g. '{\"section\": {\"parameter\": \"value\", ...}}'"
General Comments 0
You need to be logged in to leave comments. Login now