diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2015-09-10 12:02:45 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2015-09-10 09:31:17 +0000 |
commit | 7fbc7cefcada03aa455bda305734663cf2b6a117 (patch) | |
tree | 95018daa5c89341bc32839be151ca3669f2f6062 /tests | |
parent | ae4056a5e70df905a16716da3797ed297642a358 (diff) | |
download | qtserialport-7fbc7cefcada03aa455bda305734663cf2b6a117.tar.gz |
Open the dummy device for tests on any platform
The virtual serial port drivers (such as com0com or tty0tty)
require all pairs of devices were open, otherwise any
I/O will fails. Seems, it is feature of com0com and tty0tty
drivers, and maybe others drivers of virtual devices.
There is only one waitForReadyReadWithTimeout() test which
opens the dummy device only in Windows. So, it is necessary
to open the dummy device on any platform.
Change-Id: I472238704fe200309b5015c2f9740d8e4b6cb41f
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qserialport/tst_qserialport.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/auto/qserialport/tst_qserialport.cpp b/tests/auto/qserialport/tst_qserialport.cpp index 4c4dd2f..d50afe9 100644 --- a/tests/auto/qserialport/tst_qserialport.cpp +++ b/tests/auto/qserialport/tst_qserialport.cpp @@ -557,11 +557,9 @@ void tst_QSerialPort::waitForBytesWritten() void tst_QSerialPort::waitForReadyReadWithTimeout() { -#ifdef Q_OS_WIN // the dummy device on other side also has to be open QSerialPort dummySerialPort(m_senderPortName); QVERIFY(dummySerialPort.open(QIODevice::WriteOnly)); -#endif QSerialPort receiverSerialPort(m_receiverPortName); QVERIFY(receiverSerialPort.open(QIODevice::ReadOnly)); |