From fc3d2fbbe53731dc336133b00fb0128506937c16 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Tue, 30 Sep 2014 17:39:57 +0200 Subject: QBluetoothLocalDevice - enable auto test on OS X. The patch enables this test, but has to skip several test like powerOn/Off and setHostMode - which is noop on OS X. Change-Id: I6ef5e76294e61808668e46ad53ceaadfd855c9c3 Reviewed-by: Alex Blasche --- tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro | 4 +--- .../auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro index a31b942d..7322cd70 100644 --- a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro +++ b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro @@ -3,8 +3,6 @@ TARGET=tst_qbluetoothlocaldevice CONFIG += testcase QT = core concurrent bluetooth testlib +osx:QT += widgets DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 - -osx:CONFIG += insignificant_test - diff --git a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp index 30e009dd..65aff3fb 100644 --- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp +++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp @@ -111,6 +111,10 @@ void tst_QBluetoothLocalDevice::initTestCase() void tst_QBluetoothLocalDevice::tst_powerOn() { +#ifdef Q_OS_OSX + QSKIP("Not possible on OS X"); +#endif + QBluetoothLocalDevice localDevice; QSignalSpy hostModeSpy(&localDevice, SIGNAL(hostModeStateChanged(QBluetoothLocalDevice::HostMode))); @@ -132,6 +136,10 @@ void tst_QBluetoothLocalDevice::tst_powerOn() void tst_QBluetoothLocalDevice::tst_powerOff() { +#ifdef Q_OS_OSX + QSKIP("Not possible on OS X"); +#endif + if (!QBluetoothLocalDevice::allDevices().count()) QSKIP("Skipping test due to missing Bluetooth device"); @@ -176,6 +184,10 @@ void tst_QBluetoothLocalDevice::tst_hostModes_data() void tst_QBluetoothLocalDevice::tst_hostModes() { +#ifdef Q_OS_OSX + QSKIP("Not possible on OS X"); +#endif + QFETCH(QBluetoothLocalDevice::HostMode, hostModeExpected); QFETCH(bool, expectSignal); -- cgit v1.2.3