[ovirt-devel] [VDSM] Test fails only under make check

Nir Soffer nsoffer at redhat.com
Fri Jul 1 16:28:15 UTC 2016


On Fri, Jul 1, 2016 at 6:35 PM, Adam Litke <alitke at redhat.com> wrote:
> I have written a new test [1] and when running 'make check' I get a
> nasty ImportError (see below).  When running the same test using
> run_tests_local.sh directly it works fine.  Any ideas what might be
> going on?
>
> [1] https://gerrit.ovirt.org/#/c/60060/1/tests/storage_hsm_test.py
>
> ======================================================================
> ERROR: Failure: ImportError (No module named 'Queue')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/lib/python3.4/site-packages/nose/failure.py", line 39, in
> runTest
>    raise self.exc_val.with_traceback(self.tb)
>  File "/usr/lib/python3.4/site-packages/nose/loader.py", line 418, in
> loadTestsFromName
>    addr.filename, addr.module)
>  File "/usr/lib/python3.4/site-packages/nose/importer.py", line 47,
> in importFromPath
>    return self.importFromDir(dir_path, fqname)
>  File "/usr/lib/python3.4/site-packages/nose/importer.py", line 94,
> in importFromDir
>    mod = load_module(part_fqname, fh, filename, desc)
>  File "/usr/lib64/python3.4/imp.py", line 235, in load_module
>    return load_source(name, filename, file)
>  File "/usr/lib64/python3.4/imp.py", line 171, in load_source
>    module = methods.load()
>  File "<frozen importlib._bootstrap>", line 1220, in load
>  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
>  File "<frozen importlib._bootstrap>", line 1129, in _exec
>  File "<frozen importlib._bootstrap>", line 1471, in exec_module
>  File "<frozen importlib._bootstrap>", line 321, in
> _call_with_frames_removed
>  File "/home/alitke/src/vdsm/tests/storage_hsm_test.py", line 26, in
> <module>
>    from storagetestlib import fake_file_env
>  File "/home/alitke/src/vdsm/tests/storagetestlib.py", line 24, in
> <module>
>    from storagefakelib import FakeLVM
>  File "/home/alitke/src/vdsm/tests/storagefakelib.py", line 32, in
> <module>
>    from storage import lvm as real_lvm
>  File "/home/alitke/src/vdsm/vdsm/storage/lvm.py", line 41, in
> <module>
>    from vdsm.storage import devicemapper
>  File "/home/alitke/src/vdsm/lib/vdsm/storage/devicemapper.py", line
> 30, in <module>
>    from vdsm.storage import misc
>  File "/home/alitke/src/vdsm/lib/vdsm/storage/misc.py", line 36, in
> <module>
>    import Queue
> ImportError: No module named 'Queue'

The code you run is not compatible with python 3, and you did not
add the test module to the python 3 blacklist in tests/Makefile.am.

Nir



More information about the Devel mailing list