summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qserialport/tst_qserialport.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qserialport/tst_qserialport.cpp b/tests/auto/qserialport/tst_qserialport.cpp
index 54118af..c5c9113 100644
--- a/tests/auto/qserialport/tst_qserialport.cpp
+++ b/tests/auto/qserialport/tst_qserialport.cpp
@@ -327,6 +327,10 @@ void tst_QSerialPort::flush()
QSKIP("flush() does not work on Windows");
#endif
+ // the dummy device on other side also has to be open
+ QSerialPort dummySerialPort(m_receiverPortName);
+ QVERIFY(dummySerialPort.open(QIODevice::ReadOnly));
+
QSerialPort serialPort(m_senderPortName);
connect(&serialPort, SIGNAL(bytesWritten(qint64)), this, SLOT(handleBytesWrittenAndExitLoopSlot(qint64)));
QSignalSpy bytesWrittenSpy(&serialPort, SIGNAL(bytesWritten(qint64)));
@@ -358,6 +362,10 @@ void tst_QSerialPort::doubleFlush()
QSKIP("flush() does not work on Windows");
#endif
+ // the dummy device on other side also has to be open
+ QSerialPort dummySerialPort(m_receiverPortName);
+ QVERIFY(dummySerialPort.open(QIODevice::ReadOnly));
+
QSerialPort serialPort(m_senderPortName);
connect(&serialPort, SIGNAL(bytesWritten(qint64)), this, SLOT(handleBytesWrittenAndExitLoopSlot2(qint64)));
QSignalSpy bytesWrittenSpy(&serialPort, SIGNAL(bytesWritten(qint64)));