./run_tests.sh -N fails strangely without python-mox

Bug #810424 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Thierry Carrez

Bug Description

if you do not have python-mox installed, and try 'run_tests.sh -N', then it will with a strange error.

$ apt-get --purge remove python-mox
$ ./run_tests.sh -N
ERROR

======================================================================
ERROR: <nose.suite.ContextSuite context=nova.tests>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/pymodules/python2.7/nose/util.py", line 478, in try_run
    return func()
  File "/home/ubuntu/lp-810157/nova/tests/__init__.py", line 73, in setup
    cleandb = os.path.join(FLAGS.state_path, FLAGS.sqlite_clean_db)
  File "/home/ubuntu/lp-810157/nova/flags.py", line 144, in __getattr__
    val = gflags.FlagValues.__getattr__(self, name)
  File "/usr/lib/python2.7/dist-packages/gflags.py", line 935, in __getattr__
    raise AttributeError(name)
AttributeError: sqlite_clean_db

other missing dependencies give sensible ImportErorrs.

python-mox is not a runtime dependency, so its not terribly unreasonable that the user would not have it installed. (it is an ubuntu build-dep, though).

Scott Moser (smoser)
description: updated
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Thierry Carrez (ttx)
Changed in nova:
assignee: nobody → Thierry Carrez (ttx)
status: Confirmed → In Progress
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/3667

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

Reviewed: https://review.openstack.org/3667
Committed: http://github.com/openstack/nova/commit/94ac2c4747ae5e87db32a5ed4de82b0a0a1f5f0f
Submitter: Jenkins
Branch: master

commit 94ac2c4747ae5e87db32a5ed4de82b0a0a1f5f0f
Author: Thierry Carrez <email address hidden>
Date: Thu Feb 2 17:26:30 2012 +0100

    Avoid weird test error when mox is missing

    Fail early if you can't import mox, rather than return
    a cryptic and undecipherable error. Fixes bug 810424.

    Change-Id: Ie56d3e7447bbba841fdc882cb1f8f70e234812ef

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.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.