testr run doesn't complain when filtering results in no selected tests
Bug #1264274 reported by
Thomas Herve
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Testrepository |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
If I do:
$ testr run mypackage.
I don't get any error from testr run, and also a success error code. It seems to somewhat be by design, because testr lists all the tests available, and then filter with what I pass on the command line. In this case though I pass directly a module name, so it'd be nice if 1) It just tried to import it and 2) it told me that it failed to do so.
To post a comment you must log in.
I agree with Thomas Herve suggestion. I ran the below non existing test case and got the success message, however I didn't get test count(since there was no test run) .
It would be nice if it could inform user about non-existent tests.
I ran two set of tests. With non existing tests I got following message
PASSED (id=5)
With existing tests I got
Ran 8 tests in 7.346s (+2.018s)
PASSED (id=4)
Please find below tests I ran ------- ------- ------- ------- ------- ------- ------- ------- -- api.compute. flavors. test_flavors_ negative1 OS_STDOUT_ CAPTURE= ${OS_STDOUT_ CAPTURE: -1} \ CAPTURE= ${OS_STDERR_ CAPTURE: -1} \ TIMEOUT= ${OS_TEST_ TIMEOUT: -500} \ LOCK_PATH= ${OS_TEST_ LOCK_PATH: -${TMPDIR: -'/tmp' }} \ PATH:-. /tempest/ test_discover} --list
-------
# 1 . testr run tempest.
running=
OS_STDERR_
OS_TEST_
OS_TEST_
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_
-------------
PASSED (id=5)
-----------
Ran the following test , run ran successfully along with number of tests it ran . api.compute. flavors. test_flavors_ negative
# testr run tempest.
running= OS_STDOUT_ CAPTURE= ${OS_STDOUT_ CAPTURE: -1} \ CAPTURE= ${OS_STDERR_ CAPTURE: -1} \ TIMEOUT= ${OS_TEST_ TIMEOUT: -500} \ LOCK_PATH= ${OS_TEST_ LOCK_PATH: -${TMPDIR: -'/tmp' }} \ PATH:-. /tempest/ test_discover} --list OS_STDOUT_ CAPTURE= ${OS_STDOUT_ CAPTURE: -1} \ CAPTURE= ${OS_STDERR_ CAPTURE: -1} \ TIMEOUT= ${OS_TEST_ TIMEOUT: -500} \ LOCK_PATH= ${OS_TEST_ LOCK_PATH: -${TMPDIR: -'/tmp' }} \ PATH:-. /tempest/ test_discover} --load-list /tmp/tmpKZMyg_
OS_STDERR_
OS_TEST_
OS_TEST_
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_
running=
OS_STDERR_
OS_TEST_
OS_TEST_
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_
Ran 8 tests in 7.346s (+2.018s)
PASSED (id=4)