From 115326769f59e79a7e64d999ee386a98f2bf2bb2 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 16 Feb 2022 19:08:58 +0900 Subject: [PATCH] Integration tests: Allow to run a specific test from tox Previously the path of the integration tests was specified explicitly in tox.ini and we cannot run a specific test from tox. {posargs} existed in the previous command line, but it can be used only to specify extra options and we cannot change the test path, so the whole integration tests are always run. It can be solved by passing the integration test path as the default value of {posargs}. The most possible case where we would like to change the test command is to run a specific set of tests instead of the whole tests, so I believe this solution would work. Change-Id: Ifa478a360a8af8b3d959de7ec632eedef484391d --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 86acfc98be..826ac74721 100644 --- a/tox.ini +++ b/tox.ini @@ -113,7 +113,7 @@ setenv = SELENIUM_HEADLESS=False commands = oslo-config-generator --namespace openstack_dashboard_integration_tests - pytest {toxinidir}/openstack_dashboard/test/integration_tests --ds=openstack_dashboard.test.settings -v --junitxml="{toxinidir}/test_reports/integration_test_results.xml" --html="{toxinidir}/test_reports/integration_test_results.html" --self-contained-html {posargs} + pytest --ds=openstack_dashboard.test.settings -v --junitxml="{toxinidir}/test_reports/integration_test_results.xml" --html="{toxinidir}/test_reports/integration_test_results.html" --self-contained-html {posargs:{toxinidir}/openstack_dashboard/test/integration_tests} [testenv:npm] passenv =