OSError: [Errno 2] No such file or directory while running python2 setup.py test

Bug #1599828 reported by chandan kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Invalid
Undecided
Unassigned

Bug Description

I was adding test subpackage in python-keystoneclient RDO package while running python setup.py test under %check section, it gives the following trackback:

/usr/bin/python2 setup.py test
DEBUG: running test
DEBUG: Traceback (most recent call last):
DEBUG: File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
DEBUG: "__main__", fname, loader, pkg_name)
DEBUG: File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
DEBUG: exec code in run_globals
DEBUG: File "/usr/lib/python2.7/site-packages/subunit/run.py", line 149, in <module>
DEBUG: main()
DEBUG: File "/usr/lib/python2.7/site-packages/subunit/run.py", line 145, in main
DEBUG: stdout=stdout, exit=False)
DEBUG: File "/usr/lib/python2.7/site-packages/testtools/run.py", line 171, in __init__
DEBUG: self.parseArgs(argv)
DEBUG: File "/usr/lib/python2.7/site-packages/unittest2/main.py", line 113, in parseArgs
DEBUG: self._do_discovery(argv[2:])
DEBUG: File "/usr/lib/python2.7/site-packages/testtools/run.py", line 211, in _do_discovery
DEBUG: super(TestProgram, self)._do_discovery(argv, Loader=Loader)
DEBUG: File "/usr/lib/python2.7/site-packages/unittest2/main.py", line 223, in _do_discovery
DEBUG: self.test = loader.discover(self.start, self.pattern, self.top)
DEBUG: File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 356, in discover
DEBUG: tests = list(self._find_tests(start_dir, pattern))
DEBUG: File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 413, in _find_tests
DEBUG: full_path, pattern, namespace)
DEBUG: File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 469, in _find_test_path
DEBUG: return self.loadTestsFromModule(module, pattern=pattern), False
DEBUG: File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 130, in loadTestsFromModule
DEBUG: tests.append(self.loadTestsFromTestCase(obj))
DEBUG: File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 100, in loadTestsFromTestCase
DEBUG: loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames))
DEBUG: File "/builddir/build/BUILD/python-keystoneclient-3.2.1.dev9/keystoneclient/tests/unit/test_cms.py", line 35, in __init__
DEBUG: stdout=subprocess.PIPE)
DEBUG: File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
DEBUG: errread, errwrite)
DEBUG: File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
DEBUG: raise child_exception
DEBUG: OSError: [Errno 2] No such file or directory
DEBUG: running=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./keystoneclient/tests/unit}
DEBUG: ======================================================================
DEBUG: FAIL: process-returncode
DEBUG: tags: worker-0
DEBUG: ----------------------------------------------------------------------
DEBUG: Binary content:

I think test_cms is not able to find the fixtures path https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/tests/unit/client_fixtures.py#L40. It needs to be fixed.

DEBUG: traceback (test/plain; charset="utf8")

Revision history for this message
Steve Martinelli (stevemar) wrote :

The stack trace shows that it's failing here: https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/tests/unit/test_cms.py#L34-L35

Do you have openssl installed?

Revision history for this message
Steve Martinelli (stevemar) wrote :

Also, why include the tests in the package? AFAIK that isn't common practice

Revision history for this message
Haïkel Guémar (hguemar) wrote :

I fixed the RDO package, effectively it was a missing dependency on openssl binary.

We run unit tests in our packages as a sanity check during build time.

Revision history for this message
Steve Martinelli (stevemar) wrote :

Thanks for the update. I am marking this as invalid as there's nothing we can do, OpenSSL is a necessary developer dependency.

Changed in python-keystoneclient:
status: New → Invalid
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.