Commit graph

1437 commits

Author SHA1 Message Date
Benjamin Berg
5c4f06a791 RELEASE: Update notes on how to do releases 2022-02-09 17:53:54 +01:00
Bastien Nocera
13157bce08 linux: Update Bluetooth device alias when it changes
Closes: #169
2022-02-07 15:16:50 +00:00
Benjamin Berg
da05dd4b81 meson: Return a disabler if xsltproc is not found
Fixes: #170
2022-02-07 15:59:13 +01:00
Benjamin Berg
fb02a57a2b meson: Clarify why build_by_default is needed for some custom_targets 2022-02-07 15:57:21 +01:00
Bastien Nocera
f596bd0164 build: Fix missing libm link on some platforms
This should fix the PPC64 and ARMv7 builds.
2022-02-07 13:57:27 +01:00
Jan Alexander Steffens (heftig)
1dc74629ff build: Fix version macros
The project version is a string. We need to split it into an array of
version components.
2022-02-05 02:34:28 +00:00
Jan Alexander Steffens (heftig)
8eb8ab1056 build: Fix default udevrulesdir
We need to append 'rules.d' to the udev_dir.
2022-02-05 02:26:50 +00:00
Benjamin Berg
ab9520a7aa Release 0.99.14 2022-02-02 20:12:58 +01:00
Benjamin Berg
dd3d63b274 history: Remove unused and bogus define 2022-01-27 14:50:47 +01:00
Benjamin Berg
d113f62727 history: Delay saving history even on low power
Otherwise we flush out the data much more often than needed. With this
change, we'll also wait up to 5 seconds even on lower power. Loosing 5s
of data shouldn't be too bad, and it may prevent additional disk writes.

But, more importantly, we need to deferre writing the data to a later
main loop iteration. If we did not do this, then we have an
write-amplification scenario where the history is written at least 4
times instead of once.

Closes: #150
2022-01-27 14:48:51 +01:00
Benjamin Berg
94af9d6f3d linux: Make test compatible with older dbusmock versions
The changes from 37b6d4b039 ("linux: Fix Bluetooth tests for
python-dbusmock changes") require a not-yet-released dbusmock version.
Simply catch the error and fall back to adding the properties in order
to be compatible with both old and new dbusmock versions of the bluez
service.
2022-01-27 13:11:45 +01:00
Benjamin Berg
50bdbe7e65 history: Fix time compression of data points
The algorithm tries to use floating point timestamps. However, the
precision of floating point is too low for unix time, causing rounding
issues. This can cause extra points to be inserted (or too few) under
some conditions, creating a scenario where the test-suite fails
randomly.

Do this properly by using 64bit integers for the time. The 64bit integer
should have enough head-room even for very long histories.

Closes: #167
2022-01-25 10:36:20 +00:00
Bastien Nocera
07ad5a9b4c lib: Simplify loop using g_auto 2022-01-24 18:27:43 +01:00
Bastien Nocera
5e8b96ea24 lib: Prepare headers for internal g_auto* usage 2022-01-24 18:27:43 +01:00
Bastien Nocera
0d08f8feea lib: Remove unnecessary cast 2022-01-24 18:20:16 +01:00
Thomas Weißschuh
1b1f8f375c linux: explicitly recognize USB power supplies
Prevents a spurious warning:
"did not recognise USB path /sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001, please report"

This does not actually change any functionality, as the heuristic for
the attribute "online" in up_device_supply_coldplug() would have
matches id, too.

Fixes #148
2022-01-24 14:09:24 +00:00
John Sheu
545e54713a up-daemon: fix inhibitor lock leak
The inhibitor lock should also be released when a critical action
timeout is cancelled, to avoid leaking the lock.
2022-01-24 14:03:46 +00:00
Bastien Nocera
1fdc0824b6 lib: Implement up_client_get_devices_async() 2022-01-23 23:26:33 +01:00
Bastien Nocera
95618dfad4 linux: Remove libtool support from test suite 2022-01-23 23:04:26 +01:00
Bastien Nocera
74aefb0fd7 lib: Add internal helper for up_client_get_devices2()
Making sure to pass GCancellable and GError arguments.
2022-01-23 23:04:26 +01:00
Bastien Nocera
8f893964a2 tests: Add test for up_client_async*() functions 2022-01-21 22:35:28 +01:00
Bastien Nocera
c5282324d8 lib: Add up_client_new_async()
Closes: #121
2022-01-21 22:35:24 +01:00
Bastien Nocera
04521b9870 linux: Fix warning when using fake UPS
When the battery level is refreshed on a fake UPS:
(upowerd:320760): UPower-Linux-WARNING **: 12:59:26.205: incomplete read (0<8)
2022-01-18 14:22:29 +01:00
Bastien Nocera
870a3a0c5b linux: Only try to open a device if it's not a fake UPS 2022-01-18 14:22:29 +01:00
Bastien Nocera
6996261d28 linux: Remember if a UPS is a fake UPS 2022-01-18 14:22:29 +01:00
Bastien Nocera
37b6d4b039 linux: Fix Bluetooth tests for python-dbusmock changes 2022-01-18 14:19:40 +01:00
Bastien Nocera
0847d0c674 linux: Make sure ChargeCycles is unknown in more cases
In the case where the kernel returns "0" as the cycle_count, we need to
assume this also means that the number of cycles is unknown.
2021-11-02 12:15:28 +01:00
Bastien Nocera
96ef650fa5 ci: Pass build parameters to check-abi 2021-09-17 12:31:43 +02:00
Bastien Nocera
27709f6af4 tests: Add ChargeCycles test 2021-09-13 12:55:36 +02:00
Bastien Nocera
d4c4528dcc linux: Export charge cycles for batteries that support it
Closes: #152
2021-09-13 12:55:36 +02:00
Bastien Nocera
20aceb0e8c lib: Add API to access ChargeCyles D-Bus property 2021-09-13 12:55:36 +02:00
Bastien Nocera
1e53985dfa dbus: Add ChargeCycles property 2021-09-13 12:51:16 +02:00
Bastien Nocera
244e858a86 build: Fix libplist 1.x builds
When libplist-2.0 isn't available, fallback to requiring libplist 1.x
to build the iDevice support.
2021-09-13 12:32:14 +02:00
Ian Douglas Scott
98be7dd216 build: Fix compiling with idevice disabled 2021-09-10 21:46:44 -07:00
Bastien Nocera
d0d6b633a0 linux: Remove unused variable
src/linux/up-device-supply.c: In function ‘up_device_supply_refresh_line_power’:
src/linux/up-device-supply.c:89:22: warning: unused variable ‘native_path’ [-Wunused-variable]
   89 |         const gchar *native_path;
      |                      ^~~~~~~~~~~
2021-09-07 17:20:48 +02:00
Bastien Nocera
0fd6b11085 all: Remove HAVE_CONFIG_H conditional
We always have a config.h now, and don't rely on autotools setting this
cflags for us to know it.
2021-09-07 17:20:48 +02:00
Bastien Nocera
5f4d16ad4d build: Fix idevice support always being off 2021-09-07 17:20:48 +02:00
Bastien Nocera
3079262bc3 build: Remove unused variable assignment 2021-09-07 17:20:48 +02:00
Bastien Nocera
340c76eee5 ci: Enable all the features explicitly 2021-09-07 17:16:42 +02:00
Bastien Nocera
1696edf466 ci: Fix Linux integration tests all being skipped
The Linux integration tests were skipped since we started installing
python-dbusmock by hand, which meant that package dependencies like
python3-gobject were never installed, and the whole test would be
skipped.

Fixes: 3acbedca26
2021-09-07 17:16:42 +02:00
Bastien Nocera
cadbaab1b2 linux: Bump tests timeout
We need a higher than default timeout as the
test_critical_action_is_taken_repeatedly test takes at least 2 suspend
cycles and those take at least UP_DAEMON_ACTION_DELAY (20 seconds).
2021-09-07 17:16:42 +02:00
Bastien Nocera
bdd2711c2b linux: Postpone importing libraries for tests
They're not needed and might not be available when we're trying to list
the included tests.
2021-09-07 17:16:42 +02:00
Bastien Nocera
b68fe26fc9 build: Require GIR to be created to run tests 2021-09-07 17:15:52 +02:00
Bastien Nocera
9035db94fc build: Add missing GLib log domains
The daemon sources and libupower-glib were built without their historic
log domains which meant some debug messages did not appear when running
upowerd in verbose mode.

This fixes the test_no_poll_batteries test.
2021-09-07 17:15:52 +02:00
Bastien Nocera
69a7cc39db ci: Fail CI on skipped tests
Parse the junit results and check whether there are any skipped tests.
2021-09-07 14:49:25 +02:00
Bastien Nocera
9e9e7dc857 ci: Always export the test logs
In case we want to read them even if successful (or skipped).
2021-09-07 14:24:12 +02:00
Bastien Nocera
02da4a2053 ci: Fix path to test log
It changed when we switched to meson.
2021-09-07 14:24:12 +02:00
Bastien Nocera
68584d33f4 linux: Split the integration test into individual tests
unittest_inspector.py lists the tests in the integration-test.py script,
which are then added as individual tests.
2021-09-07 11:42:24 +02:00
Bastien Nocera
20cb2e9610 linux: Rename integration test script
Add the python suffix.
2021-09-07 11:42:17 +02:00
pacien
c4cf2e579c etc: Document Time* unit 2021-09-07 09:27:20 +00:00