CircleCI 2.0 requires a new config file location, otherwise it won't run. And
since 1.0 is sunset now, this means our CI wasn't getting executed.
The actual format of the config is the same, we were already using 2.0
features.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The G700 and G700s both use the receiver's product id, so they both end up
having the same DeviceMatch. One of those two never gets loaded but which one
is implementation-defined and may change accidentally.
Let's drop the G700s entry because the G700 is closer to a lowest comon
denominator. Once we have kernel support for the actual product id, we can
re-instante them.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
While the DBus API is still in flux, things can break at any time.
Keeping piper and libratbag in version-step works terribly, doubly so where
piper is flatpaked but ratbagd comes from some repo somewhere. We can't check
at build-time, we can't run ratbagd --version at runtime.
so let's add a version field for now and drop it if we ever get to stable.
Meanwhile, ratbagd.py will throw an exception if the expected version doesn't
match exactly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Force the tests to load a test device with JSON that matches their
expectations instead of having a magic device pre-setup where the tests have
to know what the values are.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
sd-bus encodes underscores as _5f which looks like memory corruption. Let's
skip them, they don't add value anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
When building with --buildtype=plain, the build fails with the following
error:
cc1: error: ‘-Wformat-security’ ignored without ‘-Wformat’ [-Werror=format-security]
-Werror=format-security was recently added in 43def1b3a5 by #745
The sequence triggered by the ratbagctl.test suite is:
- DBus call Commit()
- ratbagd schedules the callback as idle func
- DBus call ResetTestDevice()
- ratbagd cleans up the test device
- callback is called on next idle
- boom! the device is already freed
To avoid this, we need to take a ref of the device while it's being scheduled
for the commit handling. But that blocks the object paths for new test devices
because the test device name is encoded in those paths (like "hidraw" for real
devices) and it doesn't change. So let's add a count to the test device name
to make sure the new device doesn't re-use the old device's paths.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Otherwise where the directory is used within meson.build, the prefix would be
missing. No real effect since we don't use it anywhere but let's be safe.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Don't rely on some other tool to install the policy file, let's just do this
in ratbagd.devel directly so it's immediately executable.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Which is the same env that ratbagd uses as well. And we don't have variable
values in RATBAGCTL_DEVEL anymore, so no point in having two different
variables here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This makes it possible to run the script against a manually started
ratbagd.devel - with a lot less effort.
And since we're don't need to be root to do this, let's move that check too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This makes it a lot easier to start ratbagd.devel in gdb, then run
ratbagctl.devel against it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We already have a separate name for the devel bus anyway, the git sha doesn't
give us a huge amount of benefits but makes manual debugging a major PITA.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
When there's a bug that's triggered by the test suite it's hard to figure out
what exactly crashes. So allow starting ratbagd.devel manually and run the
test suite against that process so we can gdb it.
The steps required for this are a bit insane, so the instructions are listed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Because our profile struct can never have an NULL name, let's assume the
empty string equals NULL.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>