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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>