Commit graph

430 commits

Author SHA1 Message Date
Mario Limonciello
2ec541edc0 trivial: tests: write out dytc_lapmode atomically 2024-04-02 14:15:53 -05:00
Mario Limonciello
5ada7c7289 Switch out assertions to g_critical() or g_return_val()
CI already run with `env["G_DEBUG"] = "fatal-criticals"` and these
errors would cause the daemon to abort.  In the event something
escapes don't show a crash on a regular user's system.
2024-04-02 13:22:02 -05:00
Marco Trevisan (Treviño)
e10516c348 integration-tests: Use automatic cleanups for stopping daemon and services
We were stopping the daemon manually while this is already something done
by the teardown function.

So let's leave this being automatically handled.
2024-04-02 20:06:14 +02:00
Marco Trevisan (Treviño)
c6e37fbd79 completions: Use kwargs to apply completion args 2024-04-02 00:31:39 +02:00
Marco Trevisan (Treviño)
ceeb9a6629 powerprofilesctl: Do not expose completions generation by default
If someone has python3-shtab installed we expose the completions
generation parameter in help, and that's not nice.

So let's avoid doing this unless during builds.
2024-04-02 00:17:32 +02:00
Marco Trevisan (Treviño)
19a53a5c26 powerprofilesctl: Handle pylint unused-argument 2024-04-02 00:17:32 +02:00
Marco Trevisan (Treviño)
92c49830c2 ci: Use the source python paths for cobertura reports
This allows to get the coverage report in merge requests affecting the
source file of powerprofilesctl
2024-04-02 00:17:32 +02:00
Mario Limonciello
2c5d8f2c2d trivial: don't destroy test bed until last step of tearDown 2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
42f45ee6e1 powerprofilesctl: Proxy more signals to called process 2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
0c80ae1108 powerprofilesctl: Use posix-compliant exit codes on signals
Do not return the python exit code when the launched process exit
because of a signal, but instead expose it as it is.
2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
15c74efc7e powerprofilesctl: Exit with launched process exit code
This is a regression of commit 18a9c6668, due to the fact that the
argparse func return value is simply ignored.

So let's just exit directly with the provided return value in such case.
2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
9bc5643950 src/powerprofilesctl: Fail if a launch unknown argument is before than command 2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
acd17bd066 powerprofilesctl: Throw an unrecognized arguments error on on launch-commands 2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
8574070267 tests/integration-tests: Ensure that the launch arguments are respected 2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
c8d431b663 power-profiles-daemon: Cleanup the profile target activation logic
Just return early on errors
2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
fc9f82321e power-profiles-daemon: Do not try to recover if no CPU driver is set 2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
a17ab78512 ppd-driver-platform-profile: Do not try access to a GError** instance
Use a local error to handle this case and propagate it if needed
2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
2bd9d2b554 ci: Install debug dependencies on test jobs 2024-04-01 21:58:47 +00:00
Marco Trevisan (Treviño)
6cbff999d3 ci: Simplify identification and usage of dnf binary 2024-04-01 21:58:47 +00:00
Mario Limonciello
65c774fa13 trivial: Don't suggest G_MESSAGES_DEBUG=all to debug
This gets glib debugging enabled, but instead --verbose should be
used to get power-profiles-daemon debugging.
2024-04-01 13:24:57 -05:00
Mario Limonciello
5bfefba61d Raise message about failed to run from another daemon running to warning
This is better than silently failing to run and you having no idea why.
2024-04-01 16:28:36 +00:00
Mario Limonciello
7e747e70a9 Raise the message about starting daemon to info 2024-04-01 16:28:36 +00:00
Mario Limonciello
b4627e3e81 Always redirect log handler
The log handler takes care of the verbosity level.  Use the custom
handler even without running daemon in verbose mode or journald.
2024-04-01 16:28:36 +00:00
Marco Trevisan (Treviño)
ca14f5875d ci: Only install gcovr in the jobs requiring it 2024-04-01 18:04:32 +02:00
Marco Trevisan (Treviño)
216256dbb5 ci: Install python3-coverage and use it for saving coverage data 2024-04-01 18:04:32 +02:00
Marco Trevisan (Treviño)
8da511916f tests: Add support for collecting python coverage data
We have a python script for the control tool so let's use that to
monitor the powerprofilesctl coverage
2024-04-01 18:04:32 +02:00
Marco Trevisan (Treviño)
b4d5a045d0 tests/integration-tests: Add a function to get powerprofilesctl path 2024-04-01 15:57:05 +02:00
Mario Limonciello
87fea13806 Pass all unknown arguments to the launch command
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/144
2024-03-26 15:56:16 -05:00
Rahul Sundaram
cb77e0ad34 Update Systemd security settings 2024-03-26 20:32:10 +00:00
Mario Limonciello
bdc60171e5 amd-pstate: Transition between balanced_power and balanced_performance
When the system is on AC and profile is balanced put the EPP value
of balanced_performance.
When the system is on battery and profile is balanced put the EPP value
of balanced_power.
2024-03-02 16:23:47 +00:00
Mario Limonciello
ab0cef6ee2 amdgpu: Use the upower core support from the daemon
No need to track in the action anymore.
2024-03-02 16:23:47 +00:00
Mario Limonciello
71161808db Add support for upower into the daemon
The daemon can notify CPU driver, Platform driver and all actions
of system power state changes.
2024-03-02 16:23:47 +00:00
Mario Limonciello
b5cf270a20 trivial: drop some boilerplate setup code in the unit tests
Use dbusmock's start_system_bus() to start and tear down the system
bus.
2024-02-28 20:34:30 -06:00
Mario Limonciello
493818a7e2 Show both daemon and client versions
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/139
2024-02-26 21:27:28 -06:00
Mario Limonciello
e568306d9c trivial: stop setting top_builddir in test env 2024-02-26 21:27:07 -06:00
Mario Limonciello
000dd5d699 trivial: move completions to their own directory 2024-02-26 21:26:26 -06:00
Marco Trevisan (Treviño)
0c301fe93f ci: Deploy html docs in pages 2024-02-15 21:43:43 +01:00
Marco Trevisan (Treviño)
0a60afd973 ci: Fix indentation 2024-02-15 21:40:07 +01:00
Marco Trevisan (Treviño)
9531da36d5 docs: Update authors and copyright information 2024-02-15 21:40:07 +01:00
Marco Trevisan (Treviño)
457b6ae314 ci: Only install test dependencies on test jobs 2024-02-15 21:40:07 +01:00
Marco Trevisan (Treviño)
0698cc1382 ci: Add docs job and expose built docs in pipelines artifacts
Also do not build docs in normal build, as we do it here already.
2024-02-15 21:40:07 +01:00
Marco Trevisan (Treviño)
b226d91841 ci: Expose all coverage report files 2024-02-15 21:40:07 +01:00
Marco Trevisan (Treviño)
b3df9190e7 tests: Fix failing messages to use f'strings as was intended to
But then as per reformatting, they got lost...
2024-02-15 18:05:32 +01:00
Mario Limonciello
27a8dfc8e7 Show a summary at end of meson setup 2024-02-15 09:26:13 -06:00
Mario Limonciello
e9f26f965f Convert pylint to a meson feature
Enable by default if it's found.
2024-02-15 09:26:13 -06:00
Mario Limonciello
3d509fa6d2 Generate bash-completion and zsh-completion using shtab 2024-02-15 09:26:13 -06:00
Mario Limonciello
9a3b379b11 fix typo in meson_options.txt 2024-02-15 09:26:13 -06:00
Marco Trevisan (Treviño)
d225c197e8 build: Bump dependency on polkit-gobject-1 0.99
It's still old enough to work on old distros, but it's what debian's
automatic dependencies system (based on library exported symbols) tells
us, so we should trust it!
2024-02-15 06:10:18 +01:00
Marco Trevisan (Treviño)
55e17d7bfe ci: Install python3-argparse-manpage and require building manpage 2024-02-15 04:55:04 +01:00
Marco Trevisan (Treviño)
7858623142 powerprofilectl: Generate manpage using argparse-manpage
Add an option to toggle this feature so that it can be either
required or not
2024-02-15 04:55:04 +01:00