aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-11-05 14:44:23 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-11-06 10:43:53 +0100
commit4a9e5c5e89e403b492f08c5a4a1f5334a8b21ad3 (patch)
tree5b4be85eea76d13c1e15db8c049894ac097c97ed /tests
parent2280779f700ae371aa35544b820d69e70d2da1e3 (diff)
libinfix build: adjust qmldir entries
Fixes: QTBUG-88209 Change-Id: Iae298355ce0b85945ea6c5c39805794f5f997845 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qmlimportscanner/CMakeLists.txt7
-rw-r--r--tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp12
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlimportscanner/CMakeLists.txt b/tests/auto/qml/qmlimportscanner/CMakeLists.txt
index 66231beccb..ec69f00516 100644
--- a/tests/auto/qml/qmlimportscanner/CMakeLists.txt
+++ b/tests/auto/qml/qmlimportscanner/CMakeLists.txt
@@ -33,3 +33,10 @@ qt_internal_extend_target(tst_qmlimportscanner CONDITION NOT ANDROID AND NOT IOS
DEFINES
QT_QMLTEST_DATADIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/data\\\"
)
+
+# special case begin
+qt_internal_extend_target(tst_qmlimportscanner CONDITION DEFINED QT_LIBINFIX
+ DEFINES
+ LIBINFIX=${QT_LIBINFIX}
+)
+# special case end
diff --git a/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp b/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
index 2a6899080d..cfcec61f82 100644
--- a/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
+++ b/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
@@ -151,6 +151,16 @@ void TestQmlimportscanner::runQmlimportscanner(const QString &mode, const QStrin
// Path is omitted because it's an absolute path, dependent on host system.
object["path"] = QJsonValue::Undefined;
+#ifdef LIBINFIX
+#define XSTR(a) STR(a)
+#define STR(A) #A
+ if (object.contains("plugin")) {
+ auto plugin = object["plugin"].toString();
+ const auto pos = plugin.lastIndexOf(XSTR(LIBINFIX));
+ if (pos != -1)
+ object["plugin"] = plugin.left(pos);
+ }
+#endif
bool found = false;
for (auto it = expectedArray.begin(), end = expectedArray.end(); it != end; ++it) {
@@ -160,7 +170,7 @@ void TestQmlimportscanner::runQmlimportscanner(const QString &mode, const QStrin
break;
}
}
- QVERIFY(found);
+ QVERIFY2(found, qPrintable(QDebug::toString(object)));
}
QVERIFY(expectedArray.isEmpty());
}