diff options
Diffstat (limited to 'tests')
12 files changed, 37 insertions, 4 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro index 6a426208..a7868123 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro +++ b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro @@ -3,5 +3,6 @@ TARGET=tst_qbluetoothdevicediscoveryagent CONFIG += testcase QT = core concurrent bluetooth testlib +osx:QT += widgets DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp index ca22c8ea..dec85fba 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp +++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp @@ -314,7 +314,10 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_startStopDeviceDiscoveries() QVERIFY(errorSpy.isEmpty()); // should only have 1 cancel QVERIFY(finishedSpy.count() == 1); - QVERIFY(cancelSpy.isEmpty()); + + // On OS X, stop is synchronous (signal will be emitted immediately). + if (!immediateSignal) + QVERIFY(cancelSpy.isEmpty()); } void tst_QBluetoothDeviceDiscoveryAgent::finished() diff --git a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro index 8f31fc14..7322cd70 100644 --- a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro +++ b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro @@ -3,5 +3,6 @@ TARGET=tst_qbluetoothlocaldevice CONFIG += testcase QT = core concurrent bluetooth testlib +osx:QT += widgets DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 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); diff --git a/tests/auto/qbluetoothserver/qbluetoothserver.pro b/tests/auto/qbluetoothserver/qbluetoothserver.pro index 4b5e5d46..ad0d1fab 100644 --- a/tests/auto/qbluetoothserver/qbluetoothserver.pro +++ b/tests/auto/qbluetoothserver/qbluetoothserver.pro @@ -3,6 +3,7 @@ TARGET = tst_qbluetoothserver CONFIG += testcase QT = core concurrent bluetooth testlib +osx:QT += widgets OTHER_FILES += \ README.txt diff --git a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp index 740ea05e..084d923c 100644 --- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp +++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp @@ -182,12 +182,16 @@ void tst_QBluetoothServer::tst_receive() bool localDeviceAvailable = localDev.isValid(); if (localDeviceAvailable) { + // setHostMode is noop on OS X. setHostMode(address, hostmode); - if (hostmode == QBluetoothLocalDevice::HostPoweredOff) + if (hostmode == QBluetoothLocalDevice::HostPoweredOff) { +#ifndef Q_OS_OSX QCOMPARE(localDevice.hostMode(), hostmode); - else +#endif + } else { QVERIFY(localDevice.hostMode() != QBluetoothLocalDevice::HostPoweredOff); + } } QBluetoothServer server(QBluetoothServiceInfo::RfcommProtocol); QSignalSpy errorSpy(&server, SIGNAL(error(QBluetoothServer::Error))); diff --git a/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro b/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro index cdf8a78b..8d3d3669 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro +++ b/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro @@ -3,6 +3,8 @@ TARGET = tst_qbluetoothservicediscoveryagent CONFIG += testcase QT = core concurrent bluetooth testlib +osx:QT += widgets + blackberry { LIBS += -lbtapi } diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp index 5e832f2c..68887e38 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp +++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp @@ -380,7 +380,7 @@ void tst_QBluetoothServiceDiscoveryAgent::tst_serviceDiscovery() connect(&discoveryAgent, SIGNAL(error(QBluetoothServiceDiscoveryAgent::Error)), this, SLOT(serviceError(QBluetoothServiceDiscoveryAgent::Error))); - discoveryAgent.start(); + discoveryAgent.start(QBluetoothServiceDiscoveryAgent::FullDiscovery); /* * Either we wait for discovery agent to run its course (e.g. Bluez 4) or diff --git a/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro b/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro index 563df1a9..e55bac3a 100644 --- a/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro +++ b/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro @@ -3,6 +3,8 @@ TARGET = tst_qbluetoothserviceinfo CONFIG += testcase QT = core concurrent bluetooth testlib +osx:QT += widgets + DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 android:!android-no-sdk { diff --git a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro index 34f6e527..3c0f9e44 100644 --- a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro +++ b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro @@ -4,6 +4,7 @@ CONFIG += testcase testcase.timeout = 250 # this test is slow QT = core concurrent network bluetooth testlib +osx:QT += widgets OTHER_FILES += \ README.txt diff --git a/tests/auto/qlowenergycharacteristic/qlowenergycharacteristic.pro b/tests/auto/qlowenergycharacteristic/qlowenergycharacteristic.pro index 33302d60..74fdbf0d 100644 --- a/tests/auto/qlowenergycharacteristic/qlowenergycharacteristic.pro +++ b/tests/auto/qlowenergycharacteristic/qlowenergycharacteristic.pro @@ -7,3 +7,6 @@ DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 blackberry { LIBS += -lbtapi } + +osx:CONFIG += insignificant_test + diff --git a/tests/auto/qlowenergydescriptor/qlowenergydescriptor.pro b/tests/auto/qlowenergydescriptor/qlowenergydescriptor.pro index 60b5a740..dc069ca5 100644 --- a/tests/auto/qlowenergydescriptor/qlowenergydescriptor.pro +++ b/tests/auto/qlowenergydescriptor/qlowenergydescriptor.pro @@ -6,3 +6,6 @@ QT = core bluetooth testlib blackberry { LIBS += -lbtapi } + +osx:CONFIG += insignificant_test + |