From 1fd73b753ebb47365edbb97581d59ce15ad5af42 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 16 Feb 2022 19:47:59 +0900 Subject: [PATCH] test: Allow to run a specific test Previously heat-dashboard unit/integration tests always run the whole set of tests and there is no way to run a specific test. {posargs} mechanism of tox would help us. Change-Id: Ia37a2586a9207180c5f3ed85141b2916468f18b8 --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 04ad98a6..8c02341f 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/up -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - python manage.py test heat_dashboard.test --settings=heat_dashboard.test.settings --exclude-tag integration + python manage.py test {posargs:heat_dashboard.test} --settings=heat_dashboard.test.settings --exclude-tag integration [testenv:integration] # Run integration tests only @@ -29,7 +29,7 @@ setenv = INTEGRATION_TESTS=1 SELENIUM_HEADLESS=1 HORIZON_INTEGRATION_TESTS_CONFIG_FILE=heat_dashboard/test/integration/horizon.conf -commands = python manage.py test heat_dashboard.test.integration --settings=heat_dashboard.test.settings --tag integration +commands = python manage.py test {posargs:heat_dashboard.test.integration} --settings=heat_dashboard.test.settings --tag integration [testenv:pep8] commands = flake8 {posargs} @@ -40,7 +40,7 @@ commands = {posargs} [testenv:cover] commands = coverage erase - coverage run --source=heat_dashboard {toxinidir}/manage.py test heat_dashboard.test.tests --settings=heat_dashboard.test.settings {posargs} + coverage run --source=heat_dashboard {toxinidir}/manage.py test {posargs:heat_dashboard.test.tests} --settings=heat_dashboard.test.settings coverage xml coverage html