From 3e1d5843f3d390f4b6f149d5ca5d9dc9f182f0d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=81o=C5=9B?= Date: Tue, 19 Nov 2024 09:24:26 +0100 Subject: [PATCH] Fix XPASS in tst_QLineEdit on VxWorks On VxWorks, which uses clang as its sole compiler and ARM32 as one of its platforms, check for partial selection of text on simulated mouse move passes in tst_QLineEdit::testQuickSelectionWithMouse test function, in line 5053. This causes "QEXPECT_FAIL" preceding this check to fail the test due to XPASS. According to message in QEXPECT_FAIL, this ifdef is intended not only for platforms based on ARM32, but also for gcc_arm7 target. Since VxWorks for 32 bit ARM uses clang, it might be assumed that this is the same for any other platform that uses clang as a compiler. Unfortunately, due to unknow actual reason for this issue, I can't make such general assumption, so to stay on a safe side, only VxWorks should be excluded from ARM32 platforms using this "QEXPECT_FAIL". Exclude VxWorks from platforms that expect failure in text selection check in tst_QLineEdit::testQuickSelectionWithMouse test function. Task-number: QTBUG-115777 Task-number: QTBUG-131362 Change-Id: Id10f0462e5416935c01a41f173c48c17803531c9 Reviewed-by: Volker Hilsheimer Reviewed-by: Axel Spoerl --- tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index be5a103a599..d3e4340a115 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -5049,7 +5049,7 @@ void tst_QLineEdit::testQuickSelectionWithMouse() QVERIFY(lineEdit.selectedText().endsWith(suffix)); QTest::mouseMove(lineEdit.windowHandle(), center + QPoint(20, 0)); qCDebug(lcTests) << "Selected text:" << lineEdit.selectedText(); -#ifdef Q_PROCESSOR_ARM_32 +#ifdef Q_PROCESSOR_ARM_32 && !defined(Q_OS_VXWORKS) QEXPECT_FAIL("", "Currently fails on gcc-armv7, needs investigation.", Continue); #endif QCOMPARE(lineEdit.selectedText(), partialSelection);