summaryrefslogtreecommitdiff
path: root/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qserialportinfo/tst_qserialportinfo.cpp')
-rw-r--r--tests/auto/qserialportinfo/tst_qserialportinfo.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/auto/qserialportinfo/tst_qserialportinfo.cpp b/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
index 596deb5..54f1825 100644
--- a/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
+++ b/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
@@ -62,10 +62,23 @@ void tst_QSerialPortInfo::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;