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

Matthew Treinish mtreinish at kortar.org
Mon Jan 13 03:29:58 UTC 2014


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



More information about the OpenStack-dev mailing list