Hi,
I 'm packaging this software for Fedora at: https://bugzilla.redhat.com/show_bug.cgi?id=1021733
Now I met problem when testing it:
---------------------------
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.NGiSNR
+ umask 022
+ cd /home/rpmaker/rpmbuild/BUILD
+ cd SecretStorage-1.0.0
+ pushd tests
~/rpmbuild/BUILD/SecretStorage-1.0.0/tests ~/rpmbuild/BUILD/SecretStorage-1.0.0
+ PYTHONPATH=/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages
+ nosetests-2.7
..EEEE..E
======================================================================
ERROR: test_create_empty_item (test_collection.CollectionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rpmaker/rpmbuild/BUILD/SecretStorage-1.0.0/tests/test_collection.py", line 28, in test_create_empty_item
item = self.collection.create_item('', {}, b'')
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 120, in create_item
self.ensure_not_locked()
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 55, in ensure_not_locked
raise LockedException('Collection is locked!')
LockedException: Collection is locked!
======================================================================
ERROR: test_label (test_collection.CollectionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rpmaker/rpmbuild/BUILD/SecretStorage-1.0.0/tests/test_collection.py", line 33, in test_label
self.collection.set_label('Hello!')
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 109, in set_label
self.ensure_not_locked()
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 55, in ensure_not_locked
raise LockedException('Collection is locked!')
LockedException: Collection is locked!
======================================================================
ERROR: test suite for <class 'test_compat_functions.CompatFunctionsTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/suite.py", line 208, in run
self.setUp()
File "/usr/lib/python2.7/site-packages/nose/suite.py", line 291, in setUp
self.setupContext(ancestor)
File "/usr/lib/python2.7/site-packages/nose/suite.py", line 314, in setupContext
try_run(context, names)
File "/usr/lib/python2.7/site-packages/nose/util.py", line 469, in try_run
return func()
File "/home/rpmaker/rpmbuild/BUILD/SecretStorage-1.0.0/tests/test_compat_functions.py", line 23, in setUpClass
ATTRIBUTES, PASSWORD)
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/__init__.py", line 96, in create_item
collection.unlock()
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 70, in unlock
return exec_prompt_glib(self.bus, prompt)[0]
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/util.py", line 85, in exec_prompt_glib
exec_prompt(bus, prompt, callback)
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/util.py", line 73, in exec_prompt
prompt_iface.connect_to_signal('Completed', new_callback)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 544, in connect_to_signal
dbus_interface, **keywords)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 369, in connect_to_signal
**keywords)
File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 148, in add_signal_receiver
path, **keywords)
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 400, in add_signal_receiver
self._require_main_loop()
RuntimeError: To make asynchronous calls, receive signals or export objects, D-Bus connections must be attached to a main loop by passing mainloop=... to the constructor or calling dbus.set_default_main_loop(...)
======================================================================
ERROR: test_double_deleting (test_exceptions.ExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rpmaker/rpmbuild/BUILD/SecretStorage-1.0.0/tests/test_exceptions.py", line 22, in test_double_deleting
{'application': 'secretstorage-test'}, b'pa$$word')
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 120, in create_item
self.ensure_not_locked()
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 55, in ensure_not_locked
raise LockedException('Collection is locked!')
LockedException: Collection is locked!
======================================================================
ERROR: test suite for <class 'test_item.ItemTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/suite.py", line 208, in run
self.setUp()
File "/usr/lib/python2.7/site-packages/nose/suite.py", line 291, in setUp
self.setupContext(ancestor)
File "/usr/lib/python2.7/site-packages/nose/suite.py", line 314, in setupContext
try_run(context, names)
File "/usr/lib/python2.7/site-packages/nose/util.py", line 469, in try_run
return func()
File "/home/rpmaker/rpmbuild/BUILD/SecretStorage-1.0.0/tests/test_item.py", line 24, in setUpClass
b'pa$$word')
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 120, in create_item
self.ensure_not_locked()
File "/home/rpmaker/rpmbuild/BUILDROOT/python-SecretStorage-1.0.0-1.fc21.i386/usr/lib/python2.7/site-packages/secretstorage/collection.py", line 55, in ensure_not_locked
raise LockedException('Collection is locked!')
LockedException: Collection is locked!
----------------------------------------------------------------------
Ran 7 tests in 0.893s
FAILED (errors=5)
error: Bad exit status from /var/tmp/rpm-tmp.NGiSNR (%check)
----------------------------------------------------------------------
Also my computer's keyring unlock window bumped out and asked my password. Since root user is not allowed to build RPM, I need your help now.
Thanks.
Thanks for packaging it for Fedora!
The current trunk in lp:secretstorage (I'm going to release 1.1 in the next couple of weeks) contains a secretservice_ mock.py file which allows you to export USE_SS_MOCK=1 and then the tests will pass even if there is no SecretService daemon running.
However, when you want to test it against a real-life implementation (i.e. GNOME Keyring), you should make sure it is running and the keyring is unlocked.