summaryrefslogtreecommitdiff
path: root/tests/auto/qserialport/tst_qserialport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qserialport/tst_qserialport.cpp')
-rw-r--r--tests/auto/qserialport/tst_qserialport.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/auto/qserialport/tst_qserialport.cpp b/tests/auto/qserialport/tst_qserialport.cpp
index 357cef8..b05d7d0 100644
--- a/tests/auto/qserialport/tst_qserialport.cpp
+++ b/tests/auto/qserialport/tst_qserialport.cpp
@@ -164,10 +164,24 @@ void tst_QSerialPort::initTestCase()
m_senderPortName = QString::fromLocal8Bit(qgetenv("QTEST_SERIALPORT_SENDER"));
m_receiverPortName = QString::fromLocal8Bit(qgetenv("QTEST_SERIALPORT_RECEIVER"));
if (m_senderPortName.isEmpty() || m_receiverPortName.isEmpty()) {
+ static const char message[] =
+ "Test doesn't work because the names of serial ports aren't found in env.\n"
+ "Please set environment variables:\n"
+ " QTEST_SERIALPORT_SENDER to name of output serial port\n"
+ " QTEST_SERIALPORT_RECEIVER to name of input serial port\n"
+ "Specify short names of port"
+#if defined(Q_OS_UNIX)
+ ", like: ttyS0\n";
+#elif defined(Q_OS_WIN32)
+ ", like: COM1\n";
+#else
+ "\n";
+#endif
+
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
- QSKIP("Test doesn't work because the names of serial ports aren't found in env.");
+ QSKIP(message);
#else
- QSKIP("Test doesn't work because the names of serial ports aren't set found env.", SkipAll);
+ QSKIP(message, SkipAll);
#endif
} else {
m_availablePortNames << m_senderPortName << m_receiverPortName;