Switch to running tests in parallel with testr

This commits switches the test runner in the functional tests to use
testr in parallel instead of nosetests. There are a few reasons for
doing this, firstly parallel testing ensures performs the functional
testing in a more realistic environment. Secondly, tempest which these
tests are based on doesn't support using nose, so to prevent any
potential issues we should use the same test runner here. Lastly, in
the future subunit output will be used to perform additionally
analysis on test runs. So if the same methods were to be used on the
functional tests they need to produce subunit streams from the test
runs.

Change-Id: I7daf2be58c44f2555861e47d3444523d75cc4e28
This commit is contained in:
Matthew Treinish 2014-09-11 16:27:52 -04:00
parent bf6e25aadc
commit 157eaf8ffa
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,5 @@
[DEFAULT]
test_command=${PYTHON:-python} -m subunit.run discover -s ./api -t . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -35,4 +35,8 @@ TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}
# Install tempest
pip install -e $TEMPEST_DIR
nosetests -v .
testr init
testr run --parallel --subunit | $TEMPEST_DIR/tools/subunit-trace.py --no-failure-debug -f
retval=$?
testr slowest
exit $retval