Commit Graph

6320 Commits

Author SHA1 Message Date
Patrick Ohly 407f213a7f runtests.py: fix command invocation
Splitting commands with a semicolon didn't work as intended. We need
to use the helper function's parameters instead.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly c78bcbb076 D-Bus server: fix server restarting
After moving to different pre-built testing, the wrong
syncevo-dbus-server binary was getting started (/usr/lib instead from
the test directory). We must find the binary via normal PATH lookup
and also deal with symlinks before comparing.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly 8378272412 test: fix D-Bus testing result gathering
Successful tests were not picked up by the result checker if there was
extra output between printing the test name and the " ... ok".

One source of that extra output was the D-Bus server and daemons
started by it (now redirected to a file), the other a glib warning
about an event ID not being found (caused by double-removal of a
timer, which is mostly avoided now).

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly 77a9a450d2 test: allow missing remote branches
The code for checking out source code for testing no longer worked
with newer git when there weren't any remote branches which had to be
reset.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly 1216bdaebc build: don't attempt to install .deb archives while building them
Testing them is done in separate environments and installing them
no longer works in Docker-based build environments (permission
issues).

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly b649bf454c build: remove special libical deps
Newer packages will be built without the ical compatibility hack and
will start to depend on libical3, so we have to remove the packaging
hack.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly ba95bce198 build: use Docker containers instead of chroots
Previously, nightly testing used a home-grown set of scripts arounds
Debian's schroot tool. This became increasingly harder to maintain and
update, in particular because the chroot's themselves were set up
manually. Using Docker files for building container images and then
running in those avoids this. In SyncEvolution, this affects some
places where direct access from the host to the test filesystem was
assumed.

Testing of pre-built binaries also gets changed: instead of pointing
to some directory from a previous build, we always install the output
packages from an apt repo in a clean, minimal container. Runtime
dependencies like "evolution-data-server" must be declared correctly
because they might no longer be installed already.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly e39167a9d8 test/resources.py: Python3, remove Murphy support
Running Murphy for resource allocation is overkill and
complicated (need a shared D-Bus session!). Sharing a local directory
between different test runs and using file locking is simpler. With
flock, locks are associated with a file descriptor, so they will be
returned automatically when the process quits, just like they used to
be with Murphy.

We don't want these file descriptors to be inherited by child
processes; Python 3 does that by default, so we switch to it. This is
is also a worthwhile goal by itself.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09 16:26:42 +02:00
Patrick Ohly 749a889bf2 test: ignore empty CLIENT_TEST_SOURCES
Running with no sources leads to exception later on and isn't
intended; it makes more sense to treat an empty env var like an unset
one and use the default source list.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-07-24 22:01:33 +02:00
Patrick Ohly 1bf4ce81b1 test: switch from .log to .txt for log files
The current HTTP server for nightly.syncevolution.org reports the
content type for .txt files as plain text, but not for .log
files. Plain text is desirable for easy viewing in a web
browser. While the .log suffix is nicer, getting the HTTP server
reconfigured is hard and might have to be repeated again in the
future, so let's just use .txt.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-07-24 22:01:33 +02:00
Patrick Ohly 83fe101576 autotools, NEWS: SyncEvolution 1.5.3
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:28 -08:00
Patrick Ohly c077579240 gdb-dump-stack: automatic stack dumps
This is meant to be used by automated testing, with gdb acting as
wrapper around a command so that stack traces are created
automatically when something goes wrong.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:28 -08:00
Patrick Ohly b7dbeeac49 sys.supp: more dl suppressions
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:28 -08:00
Patrick Ohly 3afdbaf651 EDS: more generic open retry handling
Recent EDS started to exhibit race conditions when opening a database (for
example, https://bugzilla.gnome.org/show_bug.cgi?id=791306). Opening was
already tried again for a certain known error in some old EDS version. Now it
is tried five times with a delay of one second for all errors.

The advantage is that this does not depend on accurately detecting the race
condition error.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:28 -08:00
Patrick Ohly 8d6d960153 sys.supp: suppress EDS/glib closure issue
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:27 -08:00
Patrick Ohly 2747426b7c oauth2.cpp: fix usage of curl
When libcurl was selected instead of libsoup, compilation failed
because the necessary header file was missing and the direct assignment
of a plain pointer to the shared_ptr failed.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:27 -08:00
Patrick Ohly 1126b65b6a autotools: be more selective about suppressing deprecation warnings
Suppressing the warning for all code hid the deprecation warning
about auto_ptr, which is something that should have been fixed
before.

Now only some code still suppresses the warning (GTK UI, Akonadi)
because there is no time to also update and test that part.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:27 -08:00
Patrick Ohly 0db56499c2 SoupTransportAgent: require libsoup 2.42, no deprecated methods
This allows us to get rid of deprecated function calls. We no longer
need to set a default proxy either, the newer libsoup does that itself
by default
(https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html).

Not mentioned in the porting guide is that the based soup session now
has a 60s timeout by default. We don't want to time out.

We also need to quit the event loop explicitly when timing out. Somehow
that wasn't necessary before.

When using the generic SoupSession, it is no longer guaranteed that canceling
an operation invokes the callbacks before returning. Therefore we have to be
prepared for callbacks occuring after destructing the SoupTransportAgent. This
is achieved by storing all SoupTransportAgent in a boost::shared_ptr and
letting the instance know about that with a weak_ptr, which then can be used
by the callbacks.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:27 -08:00
Patrick Ohly d7a591dc73 timeout.h: move from D-Bus server to syncevo
The helper class is also useful outside of the D-Bus server,
for example in the glib-based SoupTransportAgent.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09 07:53:27 -08:00
Patrick Ohly 88619eb58c C++: replace auto_ptr with unique_ptr
auto_ptr has been deprecated for a while now. unique_ptr can
be taken for granted now, so use that instead.

GDBusMessage requires a custom deleter. Not sure how auto_ptr
handled that before.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:51 +01:00
Patrick Ohly 52a3457037 C++: try to use C++14, rely on C++11
This makes it possible to use C++11 features. Choosing C++14 when available
gives us advance warning when something might break under C++14. Test builds
on a system with only C++11 and another with C++14 are needed to ensure that
both really works.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 7e4bdb5b07 test: honor warning flags
Without them, --enable-warnings=fatal was ignored for the D-Bus test
program, causing deprecation warnings about auto_ptr to be printed
without aborting the build.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 60de1423aa testing: work around Google CalDAV RECURRENCE-ID
Stand-alone events with RECURRENCE-ID get mangled by the server:
it converts the RECURRENCE-ID time to UTC. Reported in:
https://stackoverflow.com/questions/47811670/detached-recurrence-without-parent-event

For now we ignore the error (googlecalendar source) or avoid it (testItems).

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 0abc7d8251 testing: exclude PHOTO data from Google Contacts sync tests
The server started to re-encode the image, thus breaking the strict
comparison that is done for these tests. Normal testing allows such
changes for the Google server by ignoring PHOTO data, but in these
tests we want comparison to be strict, so we have to change the test
data.

The downside is less test coverage.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly b71ed933a8 autotools: let caller suppress automatic lib dependencies
shlibs.local was used in combination with explicit ebook/ecal/ical
dependencies to replace the automatic dependencies. It needs to
be maintained together with those explicit dependencies, so it
makes more sense to use a file provided by the code which
calls make to build releases.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 55c7eba954 autotools: building of binaries optional
When building and installing backends on additional build platforms, linking
the binaries is both unnecessary and sometimes problematic (for example,
helper libraries not available in a version that works).

Therefore configure arguments can be used to disable linking of the binaries.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 0c59f20b91 C++: initialize all members of SyncSourceEvent
While not necessary (attributes are not read for NOP event), it's
still cleaner to also initialize them. Found with cppcheck.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 62387107f9 TDEPIMNotesSource.h: remove unused kn_dcop
It's a local variable in the implementation. Found with cppcheck.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 77335c8d82 icaltz-util.c: avoid undefined signed int shifting
The result of shifting a signed int is undefined. Better operate
on unsigned int of the same size.

Found by clang or cppcheck.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 3a79a8d398 SynthesisDBPlugin.cpp: fix error path
This is a cut-and-paste error from upstream libsynthesis: an error
code was returned in an error case where a boolean should have been
returned.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly f797987710 C++: const and const ref enhancements
Found with clang and/or cppcheck.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly bd6adff9a5 C++: implement missing copy operator
It's good practice to implement the copy operator, even if not needed
at the moment.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 11e5e94ac2 C++: avoid non-standard typeof
Building with recent Clang in C++ mode fails when using the non-standard
typeof operator. We can't rely on the new(ish) decltype yet, so use
the Boost implementation instead.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 4fe4b6dd14 ClientTest.cpp: clean cppcheck warnings
The only actual error was incorrect nesting of ifdef/endif and comments.

The iterator change avoids a false positive where cppcheck's for correct
begin()/end() comparisons fail. It's also a bit shorter and cleaner.

The copy operator is not needed.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 8ce962a3bd runtests.py: suppress m_source cppcheck warning
Recent cppcheck warns about m_source not being initialized, which is a false
positive (it's a reference and gets initialized). Inline suppressions did not
work, so instead disable the entire warning for SyncSource.h.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 705a5c66a8 wrappercheck.sh: detect premature exit while waiting for D-Bus daemon
The "waiting for daemon to connect to D-Bus" loop did not check whether daemon
was still running at all, causing testing to get stuck occasionally when the
daemon failed.

THe loop waiting for output already checked that, but can be simplified.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 3325aebbff GNOME: retry keyring operations
Sometimes GNOME keyring and libsecret fail to set up the right temporary keys
(https://bugzilla.gnome.org/show_bug.cgi?id=778357). This has been fixed
upstream, but still breaks with the distros used by the automated testing
occassionally.

Retrying the operations after disconnecting from the server is an attempt
to recover from this sporadic error.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:50 +01:00
Patrick Ohly 7b7660af60 GNOME: replace gnome-keyring with libsecret (FDO #104219)
The GNOME keyring library has been obsoleted for a long time now,
long enough that the replacement libsecret is available on all
supported distros. Therefore we can switch unconditionally.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:34 +01:00
Patrick Ohly d5ecc1b468 libical: support libical v3 (FDO #104220)
libical v3 removes some deprecated functions (like icaltime_from_timet)
and removes the "is_utc" member from icaltimetype. The replacement
code works with old and new libical and thus needs no ifdefs.

However, that struct is part of the ABI, which impacts the tricks that
syncevolution.org binaries use to get built against libical v2 and then
run with more recent libs like libical v3.

Depending on the platform ABI, it may still be okay, because the calling code
in SyncEvolution reserves and copies enough bytes for the icaltimetype
instances and because that code never directly accesses any member (is_date,
is_daylight, zone) whose offset changes.

Original author: Milan Crha <mcrha@redhat.com>

Slightly modified it so that icaltime_t.zone is not set.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03 10:39:13 +01:00
Tino Mettler 448b37c80b Ready for upload to unstable 2016-11-18 13:49:32 +01:00
Tino Mettler 6de96622b3 1.5.2-1 package 2016-11-18 13:29:33 +01:00
Tino Mettler f96746af9f Improve short descriptions
Some packages shared the same short description.
2016-11-18 13:06:32 +01:00
Tino Mettler 1e1aa05fe6 Use HTTPS for URL to git web view 2016-11-18 13:06:31 +01:00
Tino Mettler 4f314c6271 Revert "Fix FTBFS with libical2"
This reverts commit 5feaaf8692.
2016-11-18 13:06:31 +01:00
Tino Mettler c1f51573c4 New upstream version 2016-11-15 12:33:09 +01:00
Tino Mettler 531075d5dd Merge tag 'patches/1.5.2-1'
Patches for 1.5.2-1
2016-11-15 12:32:52 +01:00
Tino Mettler 2785be0b6f Revert "Add missing casts from shared_ptr to bool to fix FTBFS with GCC 6"
This reverts commit 9286b88515.
2016-11-15 12:32:37 +01:00
Tino Mettler acbedcb9aa Revert "Fix remaining FTBFS with GCC 6 by downgrading the C++ dialect to gnu++98"
This reverts commit b5f5312b1c.
2016-11-15 12:32:35 +01:00
Tino Mettler aabb990482 Fix FTBFS on kfreebsd due to missing SOCK_CLOEXEC
Work around missing SOCK_CLOEXEC on kfreebsd by setting FD_CLOEXEC
afterwards.
2016-11-15 12:30:30 +01:00
Patrick Ohly 7a2c76607d .gitignore: ignore test-driver
autotools started creating that after the recent update to Ubuntu
Trusty as main build platform.
2016-11-08 07:47:05 -08:00