<div dir="ltr">Thank you, Matt. Originally I had set it as:<div>  OS_TEST_PATH=./tempest</div><div><br></div><div>When I set it as,</div><div>  OS_TEST_PATH=./tempest/tests</div><div><br></div><div>the unit tests are listed.</div>
<div><div>bhuvan@build tempest]$ OS_TEST_PATH=./tempest/tests tools/with_venv.sh testr list-tests </div><div>running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \</div><div>OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \</div><div>
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \</div><div>${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./tempest/test_discover} --list </div><div>tempest.tests.stress.test_stress.StressFrameworkTest.test_help_function</div>
<div>tempest.tests.stress.test_stressaction.TestStressAction.testStressMaxTestRuns</div><div>tempest.tests.stress.test_stressaction.TestStressAction.testStressTestRun</div><div>tempest.tests.stress.test_stressaction.TestStressAction.testStressTestRunWithException</div>
<div>tempest.tests.test_list_tests.TestTestList.test_no_import_errors</div><div>tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_copy</div><div>tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_delete</div>
<div>tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_get</div><div>tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_head</div><div>tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_patch</div>
<div>tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_post</div><div>tempest.tests.test_rest_client.TestRestClientHTTPMethods.test_put</div><div>tempest.tests.test_rest_client.TestRestClientNotFoundHandling.test_post</div>
<div>tempest.tests.test_wrappers.TestWrappers.test_pretty_tox</div><div>tempest.tests.test_wrappers.TestWrappers.test_pretty_tox_fails</div><div>tempest.tests.test_wrappers.TestWrappers.test_pretty_tox_serial</div><div>tempest.tests.test_wrappers.TestWrappers.test_pretty_tox_serial_fails</div>
</div><div><br></div><div>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?<br>
</div><div><br></div><div>OS_TEST_PATH=./tempest/test_discover tools/with_venv.sh testr list-tests <br></div><div>output pasted here: <a href="http://paste.openstack.org/show/61063/">http://paste.openstack.org/show/61063/</a></div>
<div><br></div><div>BTW, the default value for OS_TEST_PATH is ./tempest/test_discover as in .testr.conf. Filed <a href="https://bugs.launchpad.net/tempest/+bug/1268440">https://bugs.launchpad.net/tempest/+bug/1268440</a> to add a note in documentation.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 13, 2014 at 8:59 AM, Matthew Treinish <span dir="ltr"><<a href="mailto:mtreinish@kortar.org" target="_blank">mtreinish@kortar.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Jan 13, 2014 at 08:49:35AM +0530, Bhuvan Arumugam wrote:<br>
> I'm facing this issue when listing tests using testr. Anyone else facing<br>
> this issue?<br>
><br>
> [bhuvan@build tempest]$ tools/with_venv.sh testr list-tests<br>
> running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \<br>
> OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \<br>
> OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \<br>
> ${PYTHON:-python} -m subunit.run discover -t ./<br>
> ${OS_TEST_PATH:-./tempest/test_discover} --list<br>
> 2014-01-13 03:12:29.253 12557 CRITICAL tempest [-] Duplicate test id<br>
> detected:<br>
> tempest.api.baremetal.test_api_discovery.TestApiDiscovery.test_api_versions[gate,smoke]<br>
> Non-zero exit code (1) from test listing. stdout='', stderr=None<br>
><br>
> No duplicate test id exist though.<br>
> We use this testr command, list-tests, to list all tests. Later tests not<br>
> appropriate for my environment are excluded. FWIW, I'm using<br>
> testtools==0.9.34 and testrepository==0.0.18. The complete list of packages<br>
> (pip freeze) as follows:<br>
> <a href="http://paste.openstack.org/show/61060/" target="_blank">http://paste.openstack.org/show/61060/</a><br>
><br>
> Any help on how to resolve it?<br>
<br>
</div></div>So the issue here is a missing env variable for your command above which<br>
specifies whether you are running the tempest unit tests or the tempest<br>
test suite. If you are looking to list all the tests in the tempest suite<br>
run the command with:<br>
<br>
    OS_TEST_PATH=./tempest/test_discover<br>
<br>
If you are looking to run the test list on the tempest unit tests run your<br>
command with:<br>
<br>
   OS_TEST_PATH=./tempest/tests<br>
<br>
What we need here is definitely an update to the tempest docs and probably<br>
change the defaults in .testr.conf. If you can file a tempest bug on this I can<br>
push out a review to update this tomorrow.<br>
<br>
<br>
-Matt Treinish<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Regards,<br>Bhuvan Arumugam<div><a href="http://www.livecipher.com" target="_blank">www.livecipher.com</a></div></div>
</div>