Commit graph

121 commits

Author SHA1 Message Date
Peter Hutterer
1250407c7c tools: add a libinput list-kernel-devices tool
Same as libinput list-devices, but lists the available event nodes. This
effectively does the same as libinput record without arguments but it's
more obvious in what it is supposed to do and thus easier to point to.

Also, it uses pyudev instead of libevdev so it does not need to run as
root to discover devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-12-08 10:08:44 +10:00
Peter Hutterer
bb6ff0ec00 gitlab CI: add a job to check for whitespace issues
Trailing whitespaces and tab after a space are a no-go.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-25 10:08:20 +10:00
Peter Hutterer
70a79069f1 gitlab CI: pre-install all packages we need
Running "dnf install" during a job can lead to issues when the image is
old - package renames/replacements/etc. may require a dnf upgrade to get
those packages sorted first before our dnf install works.

This hasn't been a problem for us because we had weekly rebuilds of the
images scheduled and were usually on the latest package set but let's do
this properly anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-16 09:00:25 +10:00
Peter Hutterer
56b9cac865 gitlab CI: update freebsd to 13.1
This gets rid of of the following error:
  ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found

Too tired to debug what is really going on, so let's pretend the update
is the best way to fix this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-16 09:00:22 +10:00
Peter Hutterer
44f42dc970 gitlab CI: don't install valgrind, it's already in the template
This has been a noop for quite a while, so we might as well skip it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-15 08:56:53 +10:00
Peter Hutterer
70c57e9644 CI: drop the job count for the valgrind test suite to 2
Too many timing-related failures with 4 or (the default) 8 jobs, clearly
our runners aren't fast enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-09-02 08:41:34 +02:00
Benjamin Tissoires
24956221b9 CI: in b2c, compile on the host, then test in qemu
Looks like we are having clock skew issues on qemu, so given that
we just need qemu in the image, we can compile on the host (reliable)
and then only start the tests in qemu.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-02 08:41:28 +02:00
Benjamin Tissoires
a034a9f66b CI: start a full systemd environment before running the testsuite
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-02 08:39:44 +02:00
Benjamin Tissoires
46df4f588c CI: include systemd-udev in the fedora image
This will allow us to have the udevadm tool and systemd-udevd available
while running inside qemu

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-02 08:39:43 +02:00
Benjamin Tissoires
1ccbeabb0b CI: rely on b2c to start qemu tests
This allows us to not have to create a specific image, and also
should be more reliable because we don't have to boot a full distribution
each time we just start our test suite.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-02 08:39:42 +02:00
Benjamin Tissoires
fb4f4131a1 CI: do not retry the qemu runs
They should be more reliable now, so no need to try them twice

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-01 10:18:18 +10:00
Benjamin Tissoires
bafffb7ecb CI: remove unused test
I am pretty sure this one guard is a leftover from a previous version.
That is because use_for_custom_build_tests is true when
use_for_qemu_tests is, so probably a useless test here.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-01 09:39:12 +10:00
Benjamin Tissoires
553092ea93 CI: make freebsd slightly more in line with others
the combination of want_qemu and skip_container is not very straight
forward.

What we actually have, is that freebsd is only qemu based, so there is
no point in really having a `_QEMU` tag for it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-01 09:39:02 +10:00
Benjamin Tissoires
0d602e12a4 CI: remove one occurrence of fedora instead of distro.name
For .{{distro.name}}-build@template, everything is parametrized with the
distro name, so having plain 'fedora' might bite us in the future.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-01 09:38:49 +10:00
Benjamin Tissoires
c8c825289f CI: prettify the include of templates
Makes the resulting file easier to read

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2022-09-01 09:38:46 +10:00
Peter Hutterer
6c2e98e40d gitlab-ci: add commandline options to the meson-build.sh script
The various --skip-build, --skip-test and --skip-setup skip the
respective step, the --run-test argument runs the test even where
MESON_TEST_ARGS is nil.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-08-31 16:01:26 +10:00
Peter Hutterer
30776d670b gitlab-ci: explicitly call "meson setup" to improve readability
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-08-31 15:41:35 +10:00
Peter Hutterer
4177093d49 gitlab-ci: export MESON_TESTTHREADS so meson actually sees it
Unlike NINJA_ARGS this isn't passed into meson, it's picked from the
env.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-08-31 15:37:37 +10:00
Peter Hutterer
45db4ceb49 gitlab ci: drop EOL'd ubuntu 21.10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-08-03 13:43:32 +10:00
Peter Hutterer
68f39925ed gitlab CI: dnf remove gtk4-devel for the no-debug-gui deps job
We've long preferred GTK4 and that's installed on our images, so let's
make sure that gets removed together with GTK3 (which isn't actually
installed anyway).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-06-28 23:09:53 +00:00
Peter Hutterer
2d3eee76ad gitlab CI: drop the manual meson to junit conversion
Meson supports this natively since version 0.55 which is available in
all our tested distributions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-06-14 13:11:14 +10:00
Peter Hutterer
7888ef2787 gitlab CI: bump to F35 and F36, as well as Ubuntu 21.10 and 22.04
F33 and F34 are both EOL. This also fixes the RPM build job to
automatically use the latest Fedora version and adds
wayland-protocols-devel which is now needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-06-11 10:54:15 +00:00
Peter Hutterer
5dd751a3d0 test: install libinput-test-utils as part of install-tests
This tests a bunch of internal utility functions that may work
differently depending on compiler flags, etc. Let's make that test
available so it can be verified on an installed system.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-05-09 05:03:00 +00:00
Peter Hutterer
43a8d769ac tools: add a libinput test tool as entry point for our test suites
We already install libinput-test-suite if the meson option install-tests
is set, see
  commit be7045cdc7
  test: make the test suite runner available as installed binary

To make other tests easily available and more discoverable, add a new
tool "libinput test" with the matching man page. This will also help us
to enforce some of the namespacing a bit better.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-05-09 05:03:00 +00:00
Peter Hutterer
2e7dd3f84e gitlab CI: fail the sanity check stage if the fork is not public
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-02-24 10:21:53 +10:00
Peter Hutterer
e9aba30a78 gitlab CI: update to latest CI templates
This include ci-templates commit 0c312d9c7255f which hopefully fixes our
current headaches with the one non-signed-off commit that somehow
managed to find its way into the repo.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-01-27 09:16:46 +10:00
Peter Hutterer
b925b55634 test: use MESON_TESTTHREADS to determine the number of jobs
meson uses MESON_TESTTHREADS to determine the number of parallel test
jobs. Since our main test suite cannot be run in parallel anyway, use
that same variable in litest to determine how many jobs we should fork
off.

In the CI pipeline, we can use FDO_CI_CONCURRENT to pass that down so we
don't end up running a billion jobs on a test runner.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-08-03 22:14:29 +00:00
José Expósito
44212baaf1 ci: update to GTK 4 when available
Update GTK to version 4 on Fedora, Arch and Alpine Linux.

Not updating Debian and FreeBSD because the package is not available yet
and Ubuntu because it is not available on 20.10.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-08-03 16:52:39 +00:00
José Expósito
a9b334ebb5 debug-gui: pointer locking on Wayland
Use the pointer constraints protocol to lock the pointer on Wayland.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-08-03 16:52:39 +00:00
Peter Hutterer
c21f20cc5a meson.build: disable documentation by default
This does little other than drag in a whole bunch of dependencies. The
libinput documentation is designed to be consumed online, so there's no
need building it on every machine.

We leave the dependencies installed in the images because it's a lot
easier to remove them and test if the build still works than adding them
and dragging in every updated package since we built the image.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-08-03 12:11:09 +10:00
José Expósito
140b4b7853 doc: add common failed pipeline errors
Add a section in the contributing documentation with common pipeline
errors and how to fix them and point to this page when the CI fails.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-07-30 05:21:59 +00:00
Peter Hutterer
355635ad4f gitlab CI: drop dependencies between jobs
None of our jobs rely on the artifacts of a previous job, so let's not
pass those around. Make this part of the default policy and include it
from every job.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-29 15:38:01 +00:00
Peter Hutterer
79707b91c7 gitlab CI: debug the meson_build script
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-28 12:50:11 +10:00
Peter Hutterer
833e49ce01 gitlab CI: use the ci-templates FreeBSD templates
Replace our cross-compilation for FreeBSD with a proper template.
FreeBSD doesn't do normal containers so we need a bunch of if/else to
skip the container builds.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-28 12:50:11 +10:00
Peter Hutterer
21824bc6ff gitlab CI: move the SUITES handling to the template where it matters
Should have been part of 9133693b15.

This fixes an issue with calls to meson_build.sh with an otherwise empty
MESON_TEST_ARGS - thanks to the space before $SUITES it would no longer
the zero-string condition in meson_build.sh.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-28 12:48:56 +10:00
Peter Hutterer
94fc9b2200 gitlab CI: update to latest ci-templates
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-28 09:46:20 +10:00
Peter Hutterer
9133693b15 gitlab CI: split the qemu meson build parts out as separate template
This was part of the test-suite-vm template but to make it easily
re-usable split out the parts that are just about building in a qemu
image from the parts that are specific to running the test suites.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-28 09:46:17 +10:00
Peter Hutterer
6516374ded gitlab CI: name the qemu tags per distribution
Having only one qemu tag worked only because we only had one
distribution using qemu. If we have multiple of those we just
duplicate/overwrite the variable so let's not do that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-28 08:59:09 +10:00
Peter Hutterer
6aa24d1054 gitlab CI: add a comment to explain how to actually edit the CI
We tell users not to edit it, but don't tell them how to change it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-06-17 16:10:53 +10:00
Peter Hutterer
873a883906 gitlab CI: use FDO_CI_CONCURRENT in our meson build script
Always prefix the ninja args with the FDO_CI_CONCURRENT values (i.e. how many
jobs the runner tells us).

Note that this variable is currently not passed through to the qemu jobs, so
inside the VM we'll still use the ninja default values.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-25 11:17:45 +00:00
Peter Hutterer
5dc000323d gitlab CI: add a JUnit XML report for scan-build
Use a scan-build wrapper to generate plist files, then parse those into a
JUnit xml format. This makes the errors appear on the main MR page as opposed
to being hidden in the artifacts somewhere.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-12 13:31:42 +10:00
Peter Hutterer
5a6f141bd8 gitlab CI: bump from Fedora 32 to 34
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-12 10:23:33 +10:00
Peter Hutterer
354df8bce9 Change various references to the master branch to main
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-29 01:31:03 +00:00
Peter Hutterer
72f747f255 gitlab CI: switch to Ubuntu 21.04
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-23 01:41:12 +00:00
Peter Hutterer
6a6435ae4b tools: add a tool to print a libinput recording as a table
This makes it easier to visualize changes in various axes or key states that
should not be there, doubly so for long recordings.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-23 13:46:00 +10:00
Peter Hutterer
da5bdd2022 gitlab CI: move the no-libwacom test suite into its own stage
Easier to spot visually in the GUI that way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-15 16:28:44 +10:00
Peter Hutterer
d0d2994254 gitlab CI: add a job to make sure we're running all test suites
Only needs to run when meson.build or the CI script update

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-12 15:24:15 +10:00
Peter Hutterer
d3115f4875 test: drop the custom group names
The group names are forced by check (they are called suite names there) but
for our test suite they provide very little benefit. Much easier to just
use the filename a test is in as group name.

This removes the pure substring match for --filter-group, it's now fnmatch
only. group names are short enough that the typing isn't an issue and we don't
want to run tests twice (e.g. 'pad' is also in 'touchpad').

This patch caused #574 until it got fixed in d838e3a3a4

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-12 15:24:15 +10:00
Peter Hutterer
8ab2581d20 gitlab CI: make the test suite names a list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-12 14:31:48 +10:00
Peter Hutterer
3eb428ef56 gitlab CI: run the scan-build analysis jobs in script
after_script ignores any exit status so we can't actually fail the job here

Fixes #573

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-12 07:35:58 +10:00