diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/api/testdata/rule-conflict/main.cpp | 1 | ||||
-rw-r--r-- | tests/auto/api/testdata/rule-conflict/pch1.h | 0 | ||||
-rw-r--r-- | tests/auto/api/testdata/rule-conflict/pch2.h | 0 | ||||
-rw-r--r-- | tests/auto/api/testdata/rule-conflict/rule-conflict.qbs | 10 | ||||
-rw-r--r-- | tests/auto/api/tst_api.cpp | 9 | ||||
-rw-r--r-- | tests/auto/api/tst_api.h | 1 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/output-artifact-auto-tagging/output-artifact-auto-tagging.qbs | 1 |
7 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/api/testdata/rule-conflict/main.cpp b/tests/auto/api/testdata/rule-conflict/main.cpp new file mode 100644 index 000000000..237c8ce18 --- /dev/null +++ b/tests/auto/api/testdata/rule-conflict/main.cpp @@ -0,0 +1 @@ +int main() {} diff --git a/tests/auto/api/testdata/rule-conflict/pch1.h b/tests/auto/api/testdata/rule-conflict/pch1.h new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/api/testdata/rule-conflict/pch1.h diff --git a/tests/auto/api/testdata/rule-conflict/pch2.h b/tests/auto/api/testdata/rule-conflict/pch2.h new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/api/testdata/rule-conflict/pch2.h diff --git a/tests/auto/api/testdata/rule-conflict/rule-conflict.qbs b/tests/auto/api/testdata/rule-conflict/rule-conflict.qbs new file mode 100644 index 000000000..5b839076e --- /dev/null +++ b/tests/auto/api/testdata/rule-conflict/rule-conflict.qbs @@ -0,0 +1,10 @@ +import qbs + +CppApplication { + files: "main.cpp" + Group { + name: "pch files" + files: ["pch1.h", "pch2.h"] + fileTags: "cpp_pch_src" + } +} diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp index 405e38152..e90237f40 100644 --- a/tests/auto/api/tst_api.cpp +++ b/tests/auto/api/tst_api.cpp @@ -1710,6 +1710,15 @@ void TestApi::resolveProjectDryRun_data() return resolveProject_data(); } +void TestApi::ruleConflict() +{ + const qbs::ErrorInfo errorInfo = doBuildProject("rule-conflict/rule-conflict.qbs"); + QVERIFY(errorInfo.hasError()); + const QString errorString = errorInfo.toString(); + QVERIFY2(errorString.contains("conflict") && errorString.contains("pch1.h") + && errorString.contains("pch2.h"), qPrintable(errorString)); +} + void TestApi::softDependency() { const qbs::ErrorInfo errorInfo = doBuildProject("soft-dependency/project.qbs"); diff --git a/tests/auto/api/tst_api.h b/tests/auto/api/tst_api.h index e2f218934..92571781b 100644 --- a/tests/auto/api/tst_api.h +++ b/tests/auto/api/tst_api.h @@ -116,6 +116,7 @@ private slots: void resolveProject_data(); void resolveProjectDryRun(); void resolveProjectDryRun_data(); + void ruleConflict(); void softDependency(); void sourceFileInBuildDir(); void subProjects(); diff --git a/tests/auto/blackbox/testdata/output-artifact-auto-tagging/output-artifact-auto-tagging.qbs b/tests/auto/blackbox/testdata/output-artifact-auto-tagging/output-artifact-auto-tagging.qbs index e94775f1e..49a732e23 100644 --- a/tests/auto/blackbox/testdata/output-artifact-auto-tagging/output-artifact-auto-tagging.qbs +++ b/tests/auto/blackbox/testdata/output-artifact-auto-tagging/output-artifact-auto-tagging.qbs @@ -8,6 +8,7 @@ CppApplication { fileTags: ["cpp.in"] } Rule { + multiplex: true inputs: ["cpp.in"] outputFileTags: ["cpp"] outputArtifacts: [{ filePath: "main.cpp" }, { filePath: "broken.nomatch" }] |