./run_tests.sh raises error for glance_store in debug mode

Bug #1383117 reported by Ankit Agrawal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
Fix Released
Undecided
Ankit Agrawal

Bug Description

When we try to run glance_store test suit in debug mode it raises error “ImportError: Start directory is not importable” with the following stack trace

$ ./run_tests.sh -d

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/openstack/glance_store/glance_store/.venv/lib/python2.7/site-packages/testtools/run.py", line 535, in <module>
    main(sys.argv, sys.stdout)
  File "/home/openstack/glance_store/glance_store/.venv/lib/python2.7/site-packages/testtools/run.py", line 532, in main
    stdout=stdout)
  File "/home/openstack/glance_store/glance_store/.venv/lib/python2.7/site-packages/testtools/run.py", line 218, in __init__
    self.parseArgs(argv)
  File "/home/openstack/glance_store/glance_store/.venv/lib/python2.7/site-packages/testtools/run.py", line 257, in parseArgs
    self._do_discovery(argv[2:])
  File "/home/openstack/glance_store/glance_store/.venv/lib/python2.7/site-packages/testtools/run.py", line 376, in _do_discovery
    loaded = loader.discover(start_dir, pattern, top_level_dir)
  File "/usr/lib/python2.7/unittest/loader.py", line 204, in discover
    raise ImportError('Start directory is not importable: %r' % start_dir)
ImportError: Start directory is not importable: './glance/tests'

Tags: ntt
Changed in glance:
assignee: nobody → Ankit Agrawal (ankitagrawal)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance_store (master)

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

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (master)

Reviewed: https://review.openstack.org/129539
Committed: https://git.openstack.org/cgit/openstack/glance_store/commit/?id=6d4f6aa220691051e84f6d2f89f4104bfbf40158
Submitter: Jenkins
Branch: master

commit 6d4f6aa220691051e84f6d2f89f4104bfbf40158
Author: ankitagrawal <email address hidden>
Date: Mon Oct 20 00:52:51 2014 -0700

    Updated run_tests.sh to run tests in debug mode

    Start directory was not configured property in run_tests.sh which raises
    error while running entire test suit using debug mode.

    Updated "testrargs" value from "discover ./glance/tests" to
    "discover ./tests" as default starting point to run all tests
    if specific test is not provided.

    Closes-Bug: 1383117
    Change-Id: Ie26d6ec02c92e9ac03dd7c35d313ea377715322f

Changed in glance:
status: In Progress → Fix Committed
Erno Kuvaja (jokke)
affects: glance → glance-store
Louis Taylor (kragniz)
Changed in glance-store:
status: Fix Committed → Fix Released
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.