aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2024-02-09 11:48:14 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2024-02-13 09:42:27 +0000
commit78a2220fd49d65d27e9eea4247a81266b69bb06b (patch)
tree51348c7d5a3c8bf063f08e279fc521e6f6e9a805 /tests
parent5719939e57f0ccca88c46cf0bae7d0d580e572fc (diff)
Do not run module validators for erroneous products in IDE mode
Otherwise, we will potentially emit unwanted warning messages. Amends 5af4f376f88e7859667de6be0eff8f8af304528d. Change-Id: Icf55cfde089ae9f371c125bdad3eb79768070578 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/api/testdata/restored-warnings/restored-warnings.qbs14
-rw-r--r--tests/auto/api/tst_api.cpp17
2 files changed, 18 insertions, 13 deletions
diff --git a/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs b/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs
index f6a68f27c..9d4abb757 100644
--- a/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs
+++ b/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs
@@ -4,18 +4,22 @@ Project {
CppApplication {
name: "theProduct"
- property bool moreFiles: false
cpp.blubb: true
files: ["file.cpp", "main.cpp"]
- Group {
- condition: moreFiles
- files: ["blubb.cpp"]
- }
}
Product {
name: "theOtherProduct"
property bool dummy: { throw "this one comes from a thread"; }
}
+
+ Product {
+ name: "aThirdProduct"
+ property bool moreFiles: false
+ Group {
+ condition: moreFiles
+ files: ["blubb.txt"]
+ }
+ }
}
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index 7726cee15..3816eca2b 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -2738,7 +2738,7 @@ void TestApi::restoredWarnings()
// Re-resolving with changes: Errors come from the re-resolving, stored ones must be suppressed.
QVariantMap overridenValues;
- overridenValues.insert("products.theProduct.moreFiles", true);
+ overridenValues.insert("products.aThirdProduct.moreFiles", true);
setupParams.setOverriddenValues(overridenValues);
job.reset(qbs::Project().setupProject(setupParams, m_logSink, nullptr));
waitForFinished(job.get());
@@ -2748,13 +2748,14 @@ void TestApi::restoredWarnings()
const auto afterErrors = m_logSink->warnings;
for (const qbs::ErrorInfo &e : afterErrors) {
const QString msg = e.toString();
- QVERIFY2(msg.contains("Superfluous version")
- || msg.contains("Property 'blubb' is not declared")
- || msg.contains("blubb.cpp' does not exist")
- || msg.contains("this one comes from a thread")
- || msg.contains("Product 'theOtherProduct' had errors and was disabled")
- || msg.contains("Product 'theProduct' had errors and was disabled"),
- qPrintable(msg));
+ QVERIFY2(
+ msg.contains("Superfluous version") || msg.contains("Property 'blubb' is not declared")
+ || msg.contains("blubb.txt' does not exist")
+ || msg.contains("this one comes from a thread")
+ || msg.contains("Product 'theOtherProduct' had errors and was disabled")
+ || msg.contains("Product 'theThirdProduct' had errors and was disabled")
+ || msg.contains("Product 'theProduct' had errors and was disabled"),
+ qPrintable(msg));
}
m_logSink->warnings.clear();
}