mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +00:00
Disable oximeter download tests by default for now.
They're not yet stable enough to be enabled as regression tests in master.
This commit is contained in:
parent
eb5bef5fba
commit
d88084a342
@ -92,7 +92,9 @@ void DeviceConnectionTests::testSerialPortScanning()
|
|||||||
list3 = SerialPortInfo::availablePorts();
|
list3 = SerialPortInfo::availablePorts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define ENABLE 0
|
||||||
|
|
||||||
|
#if ENABLE
|
||||||
static void testDownload(const QString & loaderName)
|
static void testDownload(const QString & loaderName)
|
||||||
{
|
{
|
||||||
SerialOximeter * oxi = qobject_cast<SerialOximeter*>(lookupLoader(loaderName));
|
SerialOximeter * oxi = qobject_cast<SerialOximeter*>(lookupLoader(loaderName));
|
||||||
@ -125,6 +127,7 @@ static void testDownload(const QString & loaderName)
|
|||||||
}
|
}
|
||||||
oxi->trashRecords();
|
oxi->trashRecords();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void DeviceConnectionTests::testOximeterConnection()
|
void DeviceConnectionTests::testOximeterConnection()
|
||||||
{
|
{
|
||||||
@ -135,6 +138,7 @@ void DeviceConnectionTests::testOximeterConnection()
|
|||||||
const char* argv = "test";
|
const char* argv = "test";
|
||||||
QCoreApplication app(argc, (char**) &argv);
|
QCoreApplication app(argc, (char**) &argv);
|
||||||
|
|
||||||
|
#if ENABLE
|
||||||
DeviceConnectionManager & devices = DeviceConnectionManager::getInstance();
|
DeviceConnectionManager & devices = DeviceConnectionManager::getInstance();
|
||||||
/*
|
/*
|
||||||
QString string;
|
QString string;
|
||||||
@ -165,6 +169,10 @@ void DeviceConnectionTests::testOximeterConnection()
|
|||||||
qDebug().noquote() << string;
|
qDebug().noquote() << string;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
QFile out("test.xml");
|
||||||
|
Q_ASSERT(out.open(QFile::ReadWrite));
|
||||||
|
devices.record(&out);
|
||||||
|
|
||||||
QFile file("cms50f37.xml");
|
QFile file("cms50f37.xml");
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
qDebug() << "Recording oximeter connection";
|
qDebug() << "Recording oximeter connection";
|
||||||
@ -181,4 +189,5 @@ void DeviceConnectionTests::testOximeterConnection()
|
|||||||
testDownload(cms50f37_class_name);
|
testDownload(cms50f37_class_name);
|
||||||
devices.replay(nullptr);
|
devices.replay(nullptr);
|
||||||
file.close();
|
file.close();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user