summaryrefslogtreecommitdiffstats
path: root/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-20 15:55:55 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-25 10:22:53 +0100
commita325de1910e6627e4d042114d22303cc68fae7a9 (patch)
treecabf88f9e4e42579e6695ecff5e6ab787f3922ab /tests/auto/qserialportinfo/tst_qserialportinfo.cpp
parentd42d5838b9a4c3cbd6b0e67dabce658ba737eba8 (diff)
parentb84fe7eb3d6d977a347bfbb82da724409b2eda69 (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts: .qmake.conf src/serialport/qserialport_unix.cpp src/serialport/qserialport_unix_p.h src/serialport/qserialport_win.cpp src/serialport/qserialport_win_p.h src/serialport/qserialport_wince.cpp src/serialport/qserialport_wince_p.h Change-Id: Ibb917652b132e66fbb90f437bf762c1094911dc0
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 596deb5b..54f18253 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;