Re: Running tests in a development environment



On Thu, Apr 5, 2012 at 14:59, Matthew Booth <mbooth redhat com> wrote:
> I'm currently developing GObject bindings for libguestfs, and have been
> having some problems running tests from my local development environment.
> Specifically I get:
>
> gi._glib.GError: Could not locate guestfs_session_new:
> libguestfs-gobject-1.0.soso: cannot open shared object file: No such file or
> directory
>
> Note the .soso. I have no idea where this duplicated suffix comes from, and
> it obviously doesn't exist.

First I would try to find what is causing that error. PyGObject
doesn't open the typelibs nor the .so themselves, but does it through
gobject-introspection.

In order to find out what is calling dlopen, put a breakpoint there
with gdb and check out the backtrace.

I believe you want to do something similar to what libsecrets does, so
you may want to check out its sources or ask Stef Walters.

Regards,

Tomeu

> If I create it, however, I get:
>
> gi._glib.GError: Could not locate guestfs_session_new:
> /home/mbooth/src/libguestfs/gobject/.libs/libguestfs-gobject-1.0.soso:
> undefined symbol: g_free
>
> Suspecting that I perhaps needed some more environment variables set (we
> currently set LD_LIBRARY_PATH and GI_TYPELIB_PATH), We currently run gjs
> tests just fine with this environment, so it has been sanity-checked. I
> checked out pygobject to see how its tests are run. It turns out they don't
> run for me either. Running make check ends in:
>
> PYTHONPATH=..:../tests:${PYTHONPATH:+:$PYTHONPATH}
> LD_LIBRARY_PATH=./.libs:$LD_LIBRARY_PATH GI_TYPELIB_PATH=.:$GI_TYPELIB_PATH
> XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share TESTS_BUILDDIR=.
> /usr/bin/dbus-launch  /usr/bin/python -Wd -Werror::PendingDeprecationWarning
> -Werror::DeprecationWarning ./runtests.py
> Traceback (most recent call last):
>  File "./runtests.py", line 44, in <module>
>    suite = loader.loadTestsFromNames(names)
>  File "/usr/lib64/python2.7/unittest/loader.py", line 128, in
> loadTestsFromNames
>    suites = [self.loadTestsFromName(name, module) for name in names]
>  File "/usr/lib64/python2.7/unittest/loader.py", line 91, in
> loadTestsFromName
>    module = __import__('.'.join(parts_copy))
>  File "/home/mbooth/src/pygobject/tests/test_pygtkcompat.py", line 9, in
> <module>
>    from gi.repository import Gdk
>  File "../gi/__init__.py", line 23, in <module>
>    from ._gi import _API, Repository
> ImportError: ../gi/_gi.so: undefined symbol: g_callable_info_invoke
>
> I suspect a common cause with my undefined symbol in libguestfs. Any ideas?
>
> Thanks,
>
> Matt
> --
> Matthew Booth, RHCA, RHCSS
> Red Hat Engineering, Virtualisation Team
>
> GPG ID:  D33C3490
> GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
> _______________________________________________
> python-hackers-list mailing list
> python-hackers-list gnome org
> http://mail.gnome.org/mailman/listinfo/python-hackers-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]