diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -.PHONY: clean docs docs-clean docs-cleanup test test-clean test-only web-build +.PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build WEBPACK=./node_modules/webpack/bin/webpack.js GRUNT=grunt @@ -19,7 +19,25 @@ test-clean: find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';' test-only: - PYTHONHASHSEED=random py.test -vv -r xw --cov=rhodecode --cov-report=term-missing --cov-report=html rhodecode + PYTHONHASHSEED=random \ + py.test -x -vv -r xw -p no:sugar --cov=rhodecode \ + --cov-report=term-missing --cov-report=html \ + rhodecode + +test-only-mysql: + PYTHONHASHSEED=random \ + py.test -x -vv -r xw -p no:sugar --cov=rhodecode \ + --cov-report=term-missing --cov-report=html \ + --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test"}}' \ + rhodecode + +test-only-postgres: + PYTHONHASHSEED=random \ + py.test -x -vv -r xw -p no:sugar --cov=rhodecode \ + --cov-report=term-missing --cov-report=html \ + --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \ + rhodecode + docs: (cd docs; nix-build default.nix -o result; make clean html) diff --git a/rhodecode/tests/pylons_plugin.py b/rhodecode/tests/pylons_plugin.py --- a/rhodecode/tests/pylons_plugin.py +++ b/rhodecode/tests/pylons_plugin.py @@ -55,7 +55,7 @@ def pytest_addoption(parser): '--with-pylons', dest='pylons_config', help="Set up a Pylons environment with the specified config file.") group.addoption( - '--pylons-config-override', action='store', type=_parse_json, + '--ini-config-override', action='store', type=_parse_json, default=None, dest='pylons_config_override', help=( "Overrides the .ini file settings. Should be specified in JSON" " format, e.g. '{\"section\": {\"parameter\": \"value\", ...}}'"