Cannot run nova tests in uninstalled source tree

Bug #1124213 reported by Alexej Ababilov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Alexej Ababilov

Bug Description

nova.tests.test_service fail:

$ nosetests nova.tests.test_service
...
======================================================================
ERROR: nova.tests.test_service.ServiceFlagsTestCase.test_service_enabled_on_create_based_on_flag
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:'nova'

Traceback (most recent call last):
  File "/tmp/yahoo/nova/nova/tests/test_service.py", line 89, in test_service_enabled_on_create_based_on_flag
    app.start()
  File "/tmp/yahoo/nova/nova/service.py", line 425, in start
    verstr = version.version_string_with_package()
  File "/tmp/yahoo/nova/nova/version.py", line 87, in version_string_with_package
    return version_info.version_string()
  File "/tmp/yahoo/nova/nova/openstack/common/version.py", line 63, in version_string
    for part in self.release_string().split('.'):
AttributeError: 'NoneType' object has no attribute 'split'
...

This can be fixed with https://github.com/openstack/oslo-incubator/commit/a4b6c313199dbc59e3adfc371d76d2b96df7697c:

Allow running test in uninstalled source tree.
It was pointed out that we missed the use-case that running tests
in a fresh tree checkout should work - and we missed that by
reaching too far into the setup module interface. Shame on us.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/21883

Changed in nova:
assignee: nobody → Alessio Ababilov (aababilov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/21883
Committed: http://github.com/openstack/nova/commit/17daedc6cc482111e20e0ec1f884b851a08e953b
Submitter: Jenkins
Branch: master

commit 17daedc6cc482111e20e0ec1f884b851a08e953b
Author: Alessio Ababilov <email address hidden>
Date: Wed Feb 13 16:34:34 2013 +0200

    Synchronize code from oslo

    Use commit eaab5fae2502198e9fa57d0d90a7204a2bd83b16:
    Merge "sort options to make --help output prettier"
    (Wed Feb 13 12:52:14 2013 +0000).

    Changes:
      9669767 Fix PEP8 error in oslo-rootwrap
      e3e5e0e Fixes "is not", "not in" syntax usage
      d156150 Implements import_group
      0ce65aa sort options to make --help output prettier
      580c259 Make tox run doctests
      d8c4e0c Change Exception MissingArgs's string
      6d102bc Provide i18n to those messages without _()
      cf705c5 Make project pyflakes clean
      9e5912f Fix pep8 E125 errors
      4a1ec21 Support testing args for LocalhostMatchMaker
      9fd6437 Exchanges should return directed topics
      a4b6c31 Allow running test in uninstalled source tree
      1461135 timeutils: considers that now is soon
      a956f7a Import timeutils.is_soon from keystoneclient
      a4b6c31 Allow running test in uninstalled source tree
      076e9e5 Add support for directly stringifying VersionInfo

    Change-Id: I427508f0882a528d040c89290ff9ca68a1e91bcd
    Fixes: bug #1124213

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.