From: Jaft <jaft.r@outlook.com>
To: Jaft via <help-guix@gnu.org>
Subject: Re: Help with DBus Tests Failing for Python Package
Date: Tue, 27 Dec 2022 08:46:42 +0000 (UTC) [thread overview]
Message-ID: <BY5PR07MB702910DD34290AC87423AB9499ED9@BY5PR07MB7029.namprd07.prod.outlook.com> (raw)
In-Reply-To: <BY5PR07MB7029E15B83005F6C47E0AB8999ED9@BY5PR07MB7029.namprd07.prod.outlook.com>
So I tried a different tactic and, noticing the error said the issue was ~dbus-session~ didn't exist, did this, instead:
> (arguments (list #:phases #~(modify-phases %standard-phases
> (add-before 'check 'start-xserver
> (lambda _
> ;; Tests require a running dbus-daemon.
> (system "dbus-daemon &")
> ;; For missing '/etc/machine-id'.
> (setenv "DBUS_FATAL_WARNINGS" "0"))))))
> (inputs (list python python-pygobject))
> (native-inputs (list xorg-server-for-tests))
This works much better and the 232 tests get run; most, even pass…except 4. The output is thus:
> test_get_object_path (tests.test_proxy.DBusProxyTestCase)
> Test get_object_path. ... ok
>
> ======================================================================
> FAIL: test_async_calls (tests.test_unix.DBusUnixExampleTestCase)
> Test DBus async calls with fds.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py", line 420, in test_async_calls
> self._run_test()
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 194, in _run_test
> self.assertEqual(client.exitcode, 0, msg)
> AssertionError: 1 != 0 : _call_hello_async has finished with 1
>
> ======================================================================
> FAIL: test_properties (tests.test_unix.DBusUnixExampleTestCase)
> Test DBus properties with fds.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py", line 457, in test_properties
> self._run_test()
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 194, in _run_test
> self.assertEqual(client.exitcode, 0, msg)
> AssertionError: 1 != 0 : _set_pipes has finished with 1
>
> ======================================================================
> FAIL: test_signals (tests.test_unix.DBusUnixExampleTestCase)
> Test DBus signals with fds.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py", line 481, in test_signals
> self._run_test()
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 194, in _run_test
> self.assertEqual(client.exitcode, 0, msg)
> AssertionError: 1 != 0 : _trigger_signal has finished with 1
>
> ======================================================================
> FAIL: test_sync_calls (tests.test_unix.DBusUnixExampleTestCase)
> Test DBus sync calls with fds.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py", line 398, in test_sync_calls
> self._run_test()
> File "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 194, in _run_test
> self.assertEqual(client.exitcode, 0, msg)
> AssertionError: 1 != 0 : _call_hello_sync has finished with 1
>
> ----------------------------------------------------------------------
> Ran 232 tests in 681.414s
>
> FAILED (failures=4)
> Test failed: <unittest.runner.TextTestResult run=232 errors=0 failures=4>
> error: Test failed: <unittest.runner.TextTestResult run=232 errors=0 failures=4>
> error: in phase 'check': uncaught exception:
> %exception #<&invoke-error program: "python" arguments: ("-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" "test") exit-status: 1 term-signal: #f stop-signal: #f>
It doesn't look like enough to clearly tell /why/ things failed (and looking through the source of the particular failing tests isn't much clearer, for me, unfortunately) but maybe someone's run across a similar experience, before, that might indicate something to try.
On Monday, December 26, 2022 at 10:18:55 PM CST, Jaft <jaft.r@outlook.com> wrote:
> I'm attempting to package the Python package DasBus (https://github.com/rhinstaller/dasbus/) and the tests, when it tries to test by making DBus calls, are failing.
>
> For specificity, the error output is:
>
> > test_additional_arguments (tests.test_dbus.DBusExampleTestCase)
> > Call a DBus method. ... **
> > GLib-GIO:ERROR:../glib-2.70.2/gio/gtestdbus.c:667:start_daemon: assertion failed (error == NULL): Failed to execute child process “dbus-daemon” (No such file or directory) (g-exec-error-quark, 8)
> > Bail out! GLib-GIO:ERROR:../glib-2.70.2/gio/gtestdbus.c:667:start_daemon: assertion failed (error == NULL): Failed to execute child process “dbus-daemon” (No such file or directory) (g-exec-error-quark, 8)
> > error: in phase 'check': uncaught exception:
> > %exception #<&invoke-error program: "python" arguments: ("-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" "test") exit-status: #f term-signal: 6 stop-signal: #f>
>
> I tried using ~xorg-server-for-tests~ and initializing the server before the =check= phase but I'm still running into the same error.
>
> Would anyone know what might be a cause?
>
>
>
> > (define-public python-dasbus
> > (package
> > (name "python-dasbus")
> > (version "1.7")
> > (source (origin
> > (method url-fetch)
> > (uri (pypi-uri "dasbus" version))
> > (sha256 (base32
> > "1xmn6q00v3kif5q8jcq6vi84k6xb97s2ry5rgdgyxs6z3a20v1d8"))))
> > (build-system python-build-system)
> > (arguments (list #:phases #~(modify-phases %standard-phases
> > (add-before 'check 'start-xserver
> > (lambda _
> > (system "Xvfb :1 &")
> > (setenv "DISPLAY" ":1"))))))
> > (inputs (list python python-pygobject))
> > (native-inputs (list xorg-server-for-tests))
> > (home-page "https://github.com/rhinstaller/dasbus")
> > (synopsis "DBus library in Python 3")
> > (description "DBus library in Python 3")
> > (license #f)))
next prev parent reply other threads:[~2022-12-27 8:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <871524398.4432753.1672114559997.ref@mail.yahoo.com>
2022-12-27 4:15 ` Help with DBus Tests Failing for Python Package Jaft
2022-12-27 8:46 ` Jaft [this message]
2022-12-27 11:08 ` Csepp
2022-12-27 17:49 ` Maxim Cournoyer
2022-12-29 9:32 ` Jaft
2022-12-29 14:56 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BY5PR07MB702910DD34290AC87423AB9499ED9@BY5PR07MB7029.namprd07.prod.outlook.com \
--to=jaft.r@outlook.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).