Skip to content
  • Philip Withnall's avatar
    bluez: Port Bluetooth tests to use BlueZ 5 · f49438b6
    Philip Withnall authored and Sjoerd Simons's avatar Sjoerd Simons committed
    This is effectively a complete rewrite of the tests. Some of the common
    functionality has been split out to apertis_tests_lib. The external
    interfaces and behaviour of the tests should have remained unchanged.
    
    The tests needed to change considerably in structure because of the
    difference between how BlueZ 4 and BlueZ 5 handle device objects. BlueZ
    4 only creates a device object if an adapter is paired with that device.
    BlueZ 5 creates it as soon as a device is discovered.
    
    Apart from that, the main differences between the two APIs are in the
    shift to standard D-Bus interfaces (Properties and ObjectManager) in
    BlueZ 5.
    
    While rewriting the tests, a lot of multi-second sleep() calls have been
    removed in favour of waiting for the relevant completion signals from
    the D-Bus API. This means some potentially unbounded waits if the
    Bluetooth daemon misbehaves or ends up in a state the unit test does not
    expect. But otherwise it means faster test execution and no failure...
    f49438b6