[openstack-dev] [tempest] testr duplicate test id detected

Bhuvan Arumugam bhuvan at apache.org
Mon Jan 13 04:14:31 UTC 2014


Thank you, Matt. Originally I had set it as:
  OS_TEST_PATH=./tempest

When I set it as,
  OS_TEST_PATH=./tempest/tests

the unit tests are listed.
bhuvan at build tempest]$ OS_TEST_PATH=./tempest/tests tools/with_venv.sh
testr list-tests
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
${PYTHON:-python} -m subunit.run discover -t ./
${OS_TEST_PATH:-./tempest/test_discover} --list
tempest.tests.stress.test_stress.StressFrameworkTest.test_help_function
tempest.tests.stress.test_stressaction.TestStressAction.testStressMaxTestRuns
tempest.tests.stress.test_stressaction.TestStressAction.testStressTestRun
tempest.tests.stress.test_stressaction.TestStressAction.testStressTestRunWithException
tempest.tests.test_list_tests.TestTestList.test_no_import_errors
tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_copy
tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_delete
tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_get
tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_head
tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_patch
tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_post
tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_put
tempest.tests.test_rest_client.TestRestClientNotFoundHandling.test_post
tempest.tests.test_wrappers.TestWrappers.test_pretty_tox
tempest.tests.test_wrappers.TestWrappers.test_pretty_tox_fails
tempest.tests.test_wrappers.TestWrappers.test_pretty_tox_serial
tempest.tests.test_wrappers.TestWrappers.test_pretty_tox_serial_fails

It behave differently when I list tempest tests. All tests are listed in
single line with unicode characters. The command exit with non-zero exit
code, with import errors. Any idea on whats going on?

OS_TEST_PATH=./tempest/test_discover tools/with_venv.sh testr list-tests
output pasted here: http://paste.openstack.org/show/61063/

BTW, the default value for OS_TEST_PATH is ./tempest/test_discover as in
.testr.conf. Filed https://bugs.launchpad.net/tempest/+bug/1268440 to add a
note in documentation.


On Mon, Jan 13, 2014 at 8:59 AM, Matthew Treinish <mtreinish at kortar.org>wrote:

> On Mon, Jan 13, 2014 at 08:49:35AM +0530, Bhuvan Arumugam wrote:
> > I'm facing this issue when listing tests using testr. Anyone else facing
> > this issue?
> >
> > [bhuvan at build tempest]$ tools/with_venv.sh testr list-tests
> > running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
> > OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
> > OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
> > ${PYTHON:-python} -m subunit.run discover -t ./
> > ${OS_TEST_PATH:-./tempest/test_discover} --list
> > 2014-01-13 03:12:29.253 12557 CRITICAL tempest [-] Duplicate test id
> > detected:
> >
> tempest.api.baremetal.test_api_discovery.TestApiDiscovery.test_api_versions[gate,smoke]
> > Non-zero exit code (1) from test listing. stdout='', stderr=None
> >
> > No duplicate test id exist though.
> > We use this testr command, list-tests, to list all tests. Later tests not
> > appropriate for my environment are excluded. FWIW, I'm using
> > testtools==0.9.34 and testrepository==0.0.18. The complete list of
> packages
> > (pip freeze) as follows:
> > http://paste.openstack.org/show/61060/
> >
> > Any help on how to resolve it?
>
> So the issue here is a missing env variable for your command above which
> specifies whether you are running the tempest unit tests or the tempest
> test suite. If you are looking to list all the tests in the tempest suite
> run the command with:
>
>     OS_TEST_PATH=./tempest/test_discover
>
> If you are looking to run the test list on the tempest unit tests run your
> command with:
>
>    OS_TEST_PATH=./tempest/tests
>
> What we need here is definitely an update to the tempest docs and probably
> change the defaults in .testr.conf. If you can file a tempest bug on this
> I can
> push out a review to update this tomorrow.
>
>
> -Matt Treinish
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Regards,
Bhuvan Arumugam
www.livecipher.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140113/63781cb2/attachment.html>


More information about the OpenStack-dev mailing list