Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=726787
|
|
|
|
|
|
This was inadvertently broken by commit
77d39108cc912ab3926357b5dedbe19e0a3f921a. Whoops.
|
|
|
|
Allow the linkable properties of a dummy persona to be edited. This
includes a unit test.
New API:
• Folks.DummyPersona.update_linkable_properties()
https://bugzilla.gnome.org/show_bug.cgi?id=722892
|
|
|
|
|
|
|
|
You can use this functionality to block a person to get linked
with any other person.
https://bugzilla.gnome.org/show_bug.cgi?id=724058
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=724809
|
|
Apparently my build environment *wasn’t* clean when I tested the stuff I
pushed at the weekend, even though I definitely cleaned it a few times.
Aaargh.
https://bugzilla.gnome.org/show_bug.cgi?id=724591
|
|
|
|
The .remove() calls would hit an assert_not_reached() in libgee. Remove
from the MapIterator instead.
|
|
This is not an uncommon occurrence during the unit tests. It doesn’t
deserve a warning.
|
|
Eliminate the last bits of shell scripting from the test suites. Instead
of starting and stopping the Tracker services through tracker-control,
the Tracker services are now started through D-Bus activation, and die
when the mock D-Bus bus is destroyed.
|
|
It was used to redirect verbose logging output to a log file, but automake
1.11 does that automatically now with its parallel test framework (which
folks has enabled).
|
|
Eliminate some more of the shell scripting which plagues our test cases.
This wipes up to 2s off the startup time for the EDS tests (which was
previously hard-coded to spend waiting for the EDS processes to start up;
now the processes are started through D-Bus service activation, so we only
wait as long as necessary).
|
|
This allows asserting that certain personas are added to an aggregator,
or are removed from the aggregator. It will be useful for testing the
behaviour of individual PersonaStores.
|
|
|
|
Since we now require the automake-1.12 parallel test harness, we can
take advantage of the fact that it only outputs tests’ debug spew if
they fail. That means tests can now unconditionally output everything,
which should simplify debugging.
|
|
This is a simple construct-only getter convenience property. It tidies
up IndividualAggregator construction a little, and allows runtime access
to the BackendStore without having to have explicitly constructed it
before the aggregator.
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
For unit testing, it’s nice to not have to wait 5s between polled
updates of the BlueZ persona store. Add a new environment variable,
FOLKS_BLUEZ_TIMEOUT_DIVISOR, which allows the poll frequency to be
divided by the specified amount.
This should speed up the unit tests 100×.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
If an OBEX transfer takes zero time (say, in an ideal world or, perhaps,
in a unit test) the transfer Status property will start out as
‘complete’ and never change. Previously, completed transfers were only
detected on receipt of a property change notification which, in this
situation, never came. Now, the initial value of the Status property is
also checked.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
Or due to the connection being closed.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
Persona IIDs can come from two places:
• the vCard UID attribute (preferred); or
• a checksum of the vCard’s string representation.
Previously, the checksum was calculated over all fields in the vCard,
which interacted very badly with download_photos mode. When downloading
photos, only the PHOTO and UID attributes would be downloaded;
otherwise, all attributes except PHOTO would be downloaded. Obviously,
this meant that it was impossible to calculate the same checksum for a
Persona in download_photos and non-download_photos mode. This meant that
matching the photos up to the existing Personas was impossible. Sad
times.
Now, when in download_photos mode, download all vCard attributes
(including the PHOTO) but calculate the IID checksum over all the
attributes except the PHOTO. This should yield the same checksum as from
non-download_photos mode, unless one of the other vCard properties has
changed between downloads; a new checksum would be produced then, which
is the expected behaviour.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
This completely re-implements parsing of the vCards returned from the
Bluetooth device, with the following aims:
• Improve efficiency.
• Correctly support multi-instance attributes (such as TEL and EMAIL).
• Fix comparison of new and old values to reduce property notification
spew.
Previously, the code was calling E.VCard.get_attribute() for each
attribute it expected, which iterates over the vCard’s entire attribute
list every time. Now, the code iterates over the attribute list once and
checks for the attributes it expects. This also means that unsupported
attributes can be detected. The performance improvement from this should
come from reduced iteration and better cache utilisation, although it
has not been measured. If further performance improvements are needed,
the attribute name strings could be interned and pointer comparisons
used instead of lots of strcmp()s.
The code was also previously using E.VCardAttribute.get_values() to get
the values of TEL, EMAIL and URL attributes, which is incorrect, as
those attributes are single-valued but may exist several times in the
vCard. Consequently, the code previously only parsed the first telephone
number, e-mail address and phone number in the vCard and ignored the
rest. This has now been fixed.
Finally, the code was doing pointer comparisons of elements in the
phone, e-mail and URI sets, and hence was always detecting them as
different (even if strcmp() comparison would have yielded equality).
This was causing excess property notification spew. This has been fixed
by correctly specifying the hash and equality functions to use for the
Sets.
Additionally, the code has been ported to use SmallSet instead of
HashSet. The memory and performance improvements of this change have not
been measured.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
If the Bluetooth device is disconnected by the user between updates of
the contact metadata, the code previously printed a warning when the
next update attempt failed. Instead, just gracefully and silently fail
and schedule the next update.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
Previously the code assumed that Filename was always set, but it’s
actually an optional property. Gracefully handle it not existing.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
This helps free up some reference cycles (particularly in the BlueZ
backend) and hence ensure no memory is leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
It was utterly pointless.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
This adds a test suite for the BlueZ backend, using a python-dbusmock
mock up of the BlueZ and OBEX D-Bus services.
This requires the latest version of python-dbusmock, plus up-to-date
versions of GLib and Vala for binding updates. The use of the second and
third arguments to AM_PROG_VALAC in configure.ac also necessitates use
of automake 1.12 or newer.
Only a few test cases have been added so far, covering vCard parsing and
general set up of PersonaStores. Using python-dbusmock it should be easy
to add more tests covering advanced Bluetooth device
appearance/disappearance situations in future.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
This allows derived test cases to easily use python-dbusmock to mock up
D-Bus services which are used by the code under test. The derived code
simply needs to call:
this.create_dbusmock_service (BusType.SESSION, "org.foo", "foo")
to allow instantiation of the ‘org.foo’ service using the ‘foo’
python-dbusmock template.
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
In addition to an isolated session bus, the tests are now run with an
isolated system bus as well. This is needed for the BlueZ backend, which
uses the org.bluez service on the system bus.
This depends on the GLib.TestDBus changes here:
https://bugzilla.gnome.org/show_bug.cgi?id=712148
https://bugzilla.gnome.org/show_bug.cgi?id=712274
|
|
This mirrors the FOLKS_TEST_DBUS_SYSTEM_BUS flag, and can be used to clarify
which bus is expected to be created. The default behaviour (if
FOLKS_TEST_DBUS_SYSTEM_BUS isn’t specified) is to create a session bus,
however, so setting this flag isn’t at all required.
This is a tweaked version of the patch from
bug: https://bugzilla.gnome.org/show_bug.cgi?id=712148
|
|
Might as well do a complete job when unsetting environment variables
which are associated with D-Bus.
This is a tweaked version of the patch from
bug: https://bugzilla.gnome.org/show_bug.cgi?id=712148
|
|
Don’t always unset all D-Bus environment variables when starting up or
shutting down an isolated bus, as to do so might trample on other
FolksTestDBus instances for other kinds of bus (e.g. session vs. system).
Instead, always unset a few common environment variables (like DISPLAY),
but only unset the DBUS_*_BUS_ADDRESS variable corresponding to the type
of bus being start up or shut down.
This is a tweaked version of the patch from
bug: https://bugzilla.gnome.org/show_bug.cgi?id=712148
|
|
Add a new FOLKS_TEST_DBUS_SYSTEM_BUS flag which can be passed to
folks_test_dbus_new() to create a system bus instead of a session bus. This
handles setting the correct environment variables, and ensures that the
bus’ security policy is completely permissive.
This is a tweaked version of the patch from
bug: https://bugzilla.gnome.org/show_bug.cgi?id=712148
|
|
The functionality should be equivalent at this point.
|
|
This changes the pristine GLib-copied version of the file to something
which compiles locally, and renames it to FolksTestDBus.
|
|
This is due to the suggested deprecation of GTestDBus, and the refusal
of upstream to accept patches which add system bus support. Those
patches are a requirement for folks to use GTestDBus to test its BlueZ
backend.
Ideally, folks could be ported to some other D-Bus mocking framework,
but a lot of work has been invested in the GTestDBus approach, and it’s
currently bit rotting something horrible. I just don’t have time at the
moment to port it all over to something else; so copying the GTestDBus
sources locally and modifying them is the most pragmatic approach.
gtestdbus.[ch] are licensed under LGPLv2.1+ (same as libfolks), and the
copyright is held by:
• Copyright © 2008–2010 Red Hat, Inc.
• Copyright © 2012 Collabora Ltd.
Authors:
• David Zeuthen <davidz@redhat.com>
• Xavier Claessens <xavier.claessens@collabora.co.uk>
|
|
|
|
This is automatically taken during autogen from the vala install. This
file was recently updated and having our own copy prevents the updated
version from being used.
https://bugzilla.gnome.org/show_bug.cgi?id=724339
|
|
As described in the comment added to the test, the core of folks needs a
bit of in-depth work to make the behaviour do what the test expects.
This work needs to be done at some point, but I don’t have time for it
now.
https://bugzilla.gnome.org/show_bug.cgi?id=723540
|