Commit graph

421 commits

Author SHA1 Message Date
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
Marco Trevisan (Treviño)
7cd764c075 build: Expose powerprofilesctl script and load it using files 2024-02-15 04:32:58 +01:00
Marco Trevisan (Treviño)
1ca46967b2 tests: Ensure daemon is ready before launching the test client 2024-02-15 01:30:26 +01:00
Marco Trevisan (Treviño)
fce98c6395 powerprofilesctl: Avoid uneeded raise, this will happen anyways 2024-02-15 01:26:33 +01:00
Marco Trevisan (Treviño)
47a155407f tests: wait more for valgrind-running daemon
In CI we may need to wait for it more than 10 seconds, so second this.
2024-02-15 01:26:29 +01:00
Mario Limonciello
0d3030b610 Bump version to 0.20 2024-02-15 00:36:59 +01:00
Mario Limonciello
9f9f7ca7ac README.md: Add documentation to block driver or action loading 2024-02-15 00:36:59 +01:00
Mario Limonciello
126f7d3a54 README.md: Add documentation for panel power savings 2024-02-15 00:36:59 +01:00
Mario Limonciello
cf243d97db README.md: Clarify that multiple drivers can be loaded 2024-02-15 00:36:59 +01:00
Marco Trevisan (Treviño)
5937b84df7 ci: Bump number of inotify user instances
We had errors due to limited number of values
2024-02-15 00:36:59 +01:00