summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add "Serial" to UPower Bluetooth devicesBastien Nocera2022-09-051-0/+2
| | | | | The serial for Bluetooth devices is the Bluetooth address, make sure to export it.
* lib: Implement default-adapter-state property using bluezBastien Nocera2022-08-311-3/+3
| | | | | | | | | | | | Use new adapter property in bluez to implement the default-adapter-state. It should work better, as it doesn't rely only on internal BluetoothClient state in a single process, and can get information when bluetoothd is powering up the adapter. Note that this property still works in the absence of a new enough bluetoothd, without the transitional states. Closes: #121
* lib: Export a more precise adapter power stateBastien Nocera2022-08-231-0/+8
| | | | | | | | | Unfortunately, powering on/off Bluetooth adapters has become longer, and less reliable over time, so front-ends need more information to be able to figure out what it happening. As a first pass, export whether the adapter is in the process of being turned on, or turned off, based on our own request.
* tests: Avoid race in test_connectable_devicesBastien Nocera2022-08-091-0/+1
| | | | | | | Traceback (most recent call last): File "/builds/GNOME/gnome-bluetooth/_build/../tests/integration-test.py", line 429, in test_connectable_devices self.assertEqual(list_store.get_n_items(), 3) AssertionError: 0 != 3
* tests: Test whether MIDI device is connectableBastien Nocera2022-03-101-1/+10
|
* tests: Add test for device removal coalescing/quietingBastien Nocera2022-02-241-0/+34
|
* tests: Wait longer than one loop iteration for device removalBastien Nocera2022-02-241-6/+3
| | | | As we will defer device removal slightly.
* tests: Fix wait_for_condition() AGAIN 😩Bastien Nocera2022-02-231-2/+2
| | | | Fixes: 49799919f1078d1bb1d8bddede552e9f1806c321
* tests: Fix wait_for_condition() againBastien Nocera2022-02-231-4/+3
| | | | | | UnboundLocalError: local variable 'timeout' referenced before assignment Fixes: 9fb72c027f9119e6992771e4ce1f0a33c80d3e7c
* tests: Wait for condition in test_connected_input_devices()Bastien Nocera2022-02-231-5/+5
| | | | Rather than wait for mainloop.
* tests: Always start UPower mockBastien Nocera2022-02-231-8/+8
|
* tests: Check for overly long waits in battery testBastien Nocera2022-02-231-0/+25
| | | | | Check whether we've started the test more than ~28 seconds ago to avoid having the whole test time out at the meson level.
* tests: Fix wait_for_condition()Bastien Nocera2022-02-231-2/+9
| | | | | Correctly loop for "timeout" seconds instead of returning after the first iteration of the mainloop.
* tests: Remove GTK dependencyBastien Nocera2022-02-231-3/+0
| | | | | It's unused since we split the gnome-bluetooth libraries in UI and non-UI portions.
* tests: Implement UpClient use-after-free testBastien Nocera2022-02-161-0/+70
|
* tests: Implement battery test in CBastien Nocera2022-02-163-18/+79
| | | | That will make it easier to have control over the object references.
* tests: Add license headerBastien Nocera2022-02-161-0/+6
|
* build: Fix meson deprecation warningsBastien Nocera2022-02-081-2/+2
| | | | | | NOTICE: Future-deprecated features used: * 0.55.0: {'ExternalProgram.path'} * 0.56.0: {'meson.source_root', 'meson.build_root'}
* build: Fix meson warning about run_command()Bastien Nocera2022-02-081-1/+1
| | | | | | | WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300
* tests: Add battery testBastien Nocera2022-02-071-0/+75
|
* tests: Add test for connectable propertyBastien Nocera2022-01-291-0/+27
|
* tests: Make tests fasterBastien Nocera2022-01-201-2/+2
| | | | By using smaller timeouts when waiting for events on the mainloop.
* tests: Show skipped test when dbusmock isn't availableBastien Nocera2022-01-202-0/+9
| | | | This would have made the CI fail a couple of commits earlier...
* tests: Split the integration test into individual testsBastien Nocera2022-01-202-7/+62
| | | | | unittest_inspector.py lists the tests in the integration-test.py script, which are then added as individual tests.
* tests: Only load GnomeBluetoothPriv when running testsBastien Nocera2022-01-201-9/+13
| | | | Not when loading the script
* tests: Rename integration test scriptBastien Nocera2022-01-202-1/+1
| | | | Add the python suffix.
* lib: Add API to check whether input devices are connectedBastien Nocera2022-01-201-0/+48
| | | | | | | | This will figure out whether there are any connected input devices, so that gnome-shell (or gnome-control-center) can show a confirmation dialogue before really turning things off. Closes: #101
* lib: Split UI and non-UI librariesBastien Nocera2022-01-191-2/+2
| | | | | | Both UI and non-UI libraries export a pkg-config file. Only the non-UI library exports a Gir as it's the only one that gets to be used from a non-native program (gnome-shell).
* lib: Remove adapter power-upBastien Nocera2022-01-181-0/+3
| | | | | Remove the adapter power-up when a new default adapter is added. This should avoid unwanted power-up on the adapter.
* tests: Check that non-default adapter is made non-discoverableBastien Nocera2022-01-061-0/+16
|
* lib: Use highest numbered adapter as the default oneBastien Nocera2022-01-061-1/+1
| | | | | | | | | This makes sure that whether, say, hci1 is plugged in before starting the programme using gnome-bluetooth, or after it's been started, the default adapter will still be hci1. The old behaviour could have caused discrepancies in what gnome-shell (long-running) and gnome-control-center saw as the default adapter.
* tests: Fix old default adapter reinsertion testBastien Nocera2022-01-051-0/+2
| | | | | We weren't waiting for a mainloop update, so the newly added adapter never got processed.
* tests: Make test easier to understandBastien Nocera2022-01-051-8/+8
| | | | | Compare descriptive names rather than Bluetooth addresses to make the tests easier to understand.
* build: Bump API version to 3.0Bastien Nocera2022-01-041-1/+1
| | | | To match the software's version number too.
* lib: Add test for default-adapter-poweredBastien Nocera2021-12-161-0/+35
|
* tests: Test that we unregister the pairing agent correctlyBastien Nocera2021-12-151-0/+18
|
* tests: Fix bluetooth-utils test buildBastien Nocera2021-12-061-1/+1
| | | | | gnome-bluetooth-enum-types.h could be missing at this point, make sure it's built before we compile the test program.
* tests: Adapt includes to our usageBastien Nocera2021-12-061-1/+1
| | | | We have a GDBusProxy object, so require GIO.
* tests: Add tests for bluetooth-utils functionsBastien Nocera2021-12-021-0/+59
|
* tests: Add first test for bluetooth-utilsBastien Nocera2021-12-022-0/+27
|
* tests: Add test for _connect_service() APIBastien Nocera2021-12-021-0/+24
|
* tests: Add test for _set_trusted() APIBastien Nocera2021-12-021-0/+24
|
* tests: Verify values after wait_for_condition()Bastien Nocera2021-12-021-0/+2
| | | | | | | Since we made it possible for wait_for_condition() to return before the condition was actually reached, to avoid build system test timeout, make sure to double-check the conditions we're waiting for were actually achieved.
* tests: Print test name before running it out-of-processBastien Nocera2021-12-021-0/+1
|
* tests: Add a timeout in wait_for_condition()Bastien Nocera2021-12-011-2/+7
|
* tests: Use "props" property to access GObject propertiesBastien Nocera2021-11-301-27/+27
|
* tests: Port pairing test to GListModel APIBastien Nocera2021-11-301-10/+7
|
* tests: Remove GtkTreeModel specific sections of testsBastien Nocera2021-11-301-40/+0
|
* tests: Return correct exitcode for skipped testsBastien Nocera2021-11-301-2/+2
| | | | See https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors
* tests: Verify the default-adapter-setup-mode property worksBastien Nocera2021-11-301-0/+24
|