We have tests that are failing in some environments, but it's
difficult to handle them because:
- for some environments we just allow all the tests to fail: DANGEROUS
- when we don't allow failures we have flacky tests: A CI pain
So, to avoid this and ensure that:
- New failing tests are tracked in all platforms
- gitlab integration on tests reports is working
- coverage is reported also for failing tests
Add support for `can_fail` keyword on tests that would mark the test as
part of the `failing` test suite.
Not adding the suite directly when defining the tests as this is
definitely simpler and allows to define conditions more clearly (see next
commits).
Now, add a default test setup that does not run the failing and flaky tests
by default (not to bother distributors with testing well-known issues) and
eventually run all the tests in CI:
- Non-flaky tests cannot fail in all platforms
- Failing and Flaky tests can fail
In both cases we save the test reports so that gitlab integration is
preserved.
Sync with changes from GTK:
- Set a git config to work around security
improvements in recent git.
- Only fetch the two branches we want to compare
for the style check.
- Use the existing git merge-base command to find
their common ancestor.
This is in preparation for porting `GRegex` to libpcre2, which is
happening in !2529. It’s a big port, though, and specially rebuilding
the CI images to add libpcre2 for it is a pain.
Add libpcre2, and then !2529 can drop the old libpcre dependencies when
the port lands.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #1085
This will be useful in general, for manually debugging failures if we
need (without having to rebuild the CI images to do so).
It will also be useful for the `assert-msg-test` test, which is being
reworked in !2767.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #1434
Rather than carrying the copylib around inside GLib, which is a pain to
synchronise and affects our code coverage statistics.
This requires updating the CI images to cache the new subproject,
including updating the `cache-subprojects.sh` script to pull in git
submodules.
It also requires adding `gioenumtypes_dep` to be added to the
dependencies list of `libgio`, since it needs to be build before GVDB as
it’s pulled in by the GIO headers which GVDB includes.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #2603
There’s no point in having it in the root directory when it’s only
really used for CI. It just clutters up the root.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Move the lcovrc file to the root of the project, so that it’s picked up
by Meson when running `ninja coverage` locally.
See https://github.com/mesonbuild/meson/issues/4628
This won’t affect the code coverage run on the CI, since that explicitly
used the lcovrc file already.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
libgamin was last released in 2007 and is dead
[upstream](https://gitlab.gnome.org/Archive/gamin). Distributions may
still ship it (although Fedora no longer does), but we want people to
use inotify on Linux since it’s actively supported.
BSDs use kqueue. Windows uses win32filemonitor.
FAM might still be used on some commercial Unix distributions, but there
are no contributors from those distributions, and certainly no CI for
them to prevent regressions.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2614
Don’t take the opportunity to add support for Android API 31 or update
the version of the Android NDK we’re using to r23b, though, as I
couldn’t quickly get that to work and ran out of time.
Bumping the Fedora version will at least reduce our CI repository disk
usage through sharing the base image.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #2605
This is the oldest still-supported version of Fedora.
It no longer ships gamin.
This should fix the installed-tests, which rely on version 0.19 of
python-dbusmock. Fedora 33 only had 0.18.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This should make it a bit easier to find the coverage report, rather
than digging through the job artifacts.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
`clang-format-11` is now what’s available in our Debian Stable CI image.
This should fix failures in the `style-check-diff` job.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This is what’s available in the new Debian Stable, so we can expect it
to be available pretty much everywhere.
Subsequent commits will clean up old workarounds.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
The package naming is confusing. It turns out we’ve been installing the
wrong libpcre version for ages, but haven’t noticed because the correct
version has previously been installed on the system by default.
It seems that Debian Bullseye doesn’t have the old libpcre installed by
default, so now we have to fix this package name and make sure it’s
installed in the CI images. Building it as a subproject is a pain.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fedora 29 is no longer available, and I need to rebuild these images so
libpcre is pre-downloaded as a subproject.
Update them to Fedora 31, which is what we use in `fedora.Dockerfile`.
This should allow some blobs to be shared in the container repository.
This isn’t the latest Fedora release, but I don’t want to go through the
hassle of updating all the CI images to F33 right now in addition to
updating the subproject caches.
`python-unversioned-command` is needed because the Android NDK calls
`python` without a version number. F29 must have installed this already.
The Android NDK setup appears to be OK with Python 3.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #962
It’s a more inclusive name, has the same tab-completion prefix, and is
the default choice for new repositories created locally by git, and on
GitHub and GitLab.
https://sfconservancy.org/news/2020/jun/23/gitbranchname/
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2348
Update several links to allow the remote to use its configured default
branch name, rather than specifying `master` as the default branch name.
This will help avoid breakage if any of these projects rename their
default branch in the future.
Fix a few of the links where they were hitting redirects or had moved.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #2348
Run `systemd-machine-id-setup` when creating the image, so that
`/etc/machine-id` is created with a valid ID. Since systemd isn’t
started when running the CI image with podman/Docker, it’s not created
otherwise. This causes some tests to fail.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Include the size of the `machine-id` file, but not the value itself as
that is sensitive for non-throwaway machines. What’s most useful for
debugging CI problems is knowing whether, and where, the `machine-id` is
set.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
and so checkout only the HEAD of the branch.
This leads to not being able to find an ancestor since there is only one
new commit. I presume that when it worked, it was because of specific
settings of some users.
Now we fetch (with the same depth as the target branch) the source branch
and use it to compare sha1 and find the common ancestor.
Closes#2292
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
The version of `black` on the CI server wanted these changes. Make them
to keep the `style-check-diff` CI job from constantly failing.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>