[openstack-dev] How to get back the helpful verbose unit test display in Nova

Daniel P. Berrange berrange at redhat.com
Mon Jan 21 13:42:51 UTC 2013


In Folsom if you ran Nova's unit tests you'd get an informative display of
what was being run

$ ./run_tests.sh test_libvirt_vif

LibvirtVifTestCase
    test_bridge_driver                                           OK    0.98
    test_model_kvm                                               OK    0.02
    test_model_novirtio                                          OK    0.02
    test_model_qemu                                              OK    0.02
    test_model_xen                                               OK    0.03
    test_ovs_ethernet_driver                                     OK    0.07
    test_ovs_virtualport_driver                                  OK    0.02
    test_quantum_bridge_ethernet_driver                          OK    0.02
    test_quantum_hybrid_driver                                   OK    0.02

Slowest 3 tests took 1.08 secs:
    0.98    LibvirtVifTestCase.test_bridge_driver
    0.07    LibvirtVifTestCase.test_ovs_ethernet_driver
    0.03    LibvirtVifTestCase.test_model_xen
----------------------------------------------------------------------
Ran 9 tests in 1.227s

OK


In Grizzly with the re-written run_tests.sh script we now get this:


$ ./run_tests.sh test_libvirt_vif
Running `tools/with_venv.sh testr run --parallel   test_libvirt_vif`
running=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ./nova/tests --list 
/home/berrange/src/cloud/nova/.venv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py:8: UserWarning: Module argparse was already imported from /usr/lib64/python2.7/argparse.pyc, but /home/berrange/src/cloud/nova/.venv/lib/python2.7/site-packages is being added to sys.path
  import pkg_resources
running=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ./nova/tests  --load-list /tmp/tmpOYyP07
running=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ./nova/tests  --load-list /tmp/tmpTywG0B
/home/berrange/src/cloud/nova/.venv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py:8: UserWarning: Module argparse was already imported from /usr/lib64/python2.7/argparse.pyc, but /home/berrange/src/cloud/nova/.venv/lib/python2.7/site-packages is being added to sys.path
  import pkg_resources
/home/berrange/src/cloud/nova/.venv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py:8: UserWarning: Module argparse was already imported from /usr/lib64/python2.7/argparse.pyc, but /home/berrange/src/cloud/nova/.venv/lib/python2.7/site-packages is being added to sys.path
  import pkg_resources
2013-01-21 13:38:28.100 18125 WARNING nova.virt.libvirt.firewall [-] Libvirt module could not be loaded. NWFilterFirewall will not work correctly.
2013-01-21 13:38:28.100 18126 WARNING nova.virt.libvirt.firewall [-] Libvirt module could not be loaded. NWFilterFirewall will not work correctly.
Ran 10 tests in 0.512s
PASSED (id=0)


IMHO, this is a horrible step backwards in terms of develper friendliness.

Can we get back the useful display we had before ?

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



More information about the OpenStack-dev mailing list