diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-05-23 11:38:18 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-05-23 11:53:58 +0200 |
commit | 900e85100ea49e8a30e03aed32da584a54a47812 (patch) | |
tree | 48e4ab7ab90ceca3607f8a1212d622949371c573 | |
parent | df11b67977eb25128b36a336219c9c7e0205a3da (diff) |
Add XFAIL test case for QBS-281.
Task-number: QBS-281
Change-Id: Ia9f3c50ace67ef7ee65242f8c83475bcdc289cf2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
5 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs b/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs new file mode 100644 index 000000000..686a80bd8 --- /dev/null +++ b/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs @@ -0,0 +1,6 @@ +import qbs + +SharedLibrary { + name: "helperLib" + files: "helperlib.cpp" +}
\ No newline at end of file diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/helperlib.cpp b/tests/auto/blackbox/testdata/overrideProjectProperties/helperlib.cpp new file mode 100644 index 000000000..d76364d35 --- /dev/null +++ b/tests/auto/blackbox/testdata/overrideProjectProperties/helperlib.cpp @@ -0,0 +1 @@ +void helperFunc() {} diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/main2.cpp b/tests/auto/blackbox/testdata/overrideProjectProperties/main2.cpp new file mode 100644 index 000000000..3103278d0 --- /dev/null +++ b/tests/auto/blackbox/testdata/overrideProjectProperties/main2.cpp @@ -0,0 +1,7 @@ +void helperFunc(); + +int main() +{ + helperFunc(); + return 0; +} diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs b/tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs new file mode 100644 index 000000000..c1b4482f1 --- /dev/null +++ b/tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs @@ -0,0 +1,14 @@ +import qbs 1.0 + +Project { + property bool linkSuccessfully: false + references: linkSuccessfully ? ["helper_lib.qbs"] : [] + CppApplication { + type: "application" + Depends { + condition: project.linkSuccessfully + name: "helperLib" + } + files: "main2.cpp" + } +} diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index c88bd7294..8db455ec7 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -773,6 +773,19 @@ void TestBlackbox::overrideProjectProperties() << QLatin1String("project.nameSuffix:ForYou") << QLatin1String("MyAppForYou.mainFile:main.cpp"))), 0); QVERIFY(QFile::exists(buildDir + HostOsInfo::appendExecutableSuffix("/MyAppForYou"))); + + QVERIFY(QFile::remove(buildGraphPath)); + QbsRunParameters params; + params.arguments << QLatin1String("-f") << QLatin1String("project_using_helper_lib.qbs"); + params.expectFailure = true; + QVERIFY(runQbs(params) != 0); + + QEXPECT_FAIL("", "QBS-281", Abort); + params.arguments = QStringList() << QLatin1String("-f") + << QLatin1String("project_using_helper_lib.qbs") + << QLatin1String("project.linkSuccessfully:true"); + params.expectFailure = true; // Change to false when failure is no longer expected. + QCOMPARE(runQbs(params), 0); } void TestBlackbox::productProperties() |