diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2016-10-17 11:43:09 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2016-10-17 11:43:09 +0200 |
commit | 830503d04708ebd6a64dfd260b35cfeea26ba60a (patch) | |
tree | b43c489469f8d452e7ba9d568f0f1d36e85fbe08 /tests | |
parent | b2b9d77f5cdfbb5ed19554e2d424b5be75ef8e73 (diff) | |
parent | 704eb30d27117d88e3edbe5d255ea5b8989509f3 (diff) |
Merge 1.6 into master
Change-Id: Ie98233d955f3695da0b20069fb2317931e353e4e
Diffstat (limited to 'tests')
5 files changed, 46 insertions, 7 deletions
diff --git a/tests/auto/blackbox/testdata/QTBUG-51237/modules/mymodule/mymodule.qbs b/tests/auto/blackbox/testdata/QTBUG-51237/modules/mymodule/mymodule.qbs new file mode 100644 index 000000000..223da0b3c --- /dev/null +++ b/tests/auto/blackbox/testdata/QTBUG-51237/modules/mymodule/mymodule.qbs @@ -0,0 +1,6 @@ +import qbs + +Module { + property stringList theProperty: [] + //property stringList otherProperty: theProperty.concat([]) +} diff --git a/tests/auto/blackbox/testdata/QTBUG-51237/qtbug-51237.qbs b/tests/auto/blackbox/testdata/QTBUG-51237/qtbug-51237.qbs new file mode 100644 index 000000000..e1f8d8ef6 --- /dev/null +++ b/tests/auto/blackbox/testdata/QTBUG-51237/qtbug-51237.qbs @@ -0,0 +1,22 @@ +import qbs + +Product { + type: "custom" + Depends { name: "mymodule" } + Rule { + multiplex: true + Artifact { + filePath: "dummy.custom" + fileTags: ["custom"] + } + prepare: { + var theProperty = product.moduleProperty("mymodule", "theProperty"); + if (!theProperty) + throw "Oh no!"; + var dummy = new JavaScriptCommand(); + dummy.silent = true; + dummy.sourceCode = function() {}; + return [dummy]; + } + } +} diff --git a/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs b/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs index 19586522c..5b372589a 100644 --- a/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs +++ b/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs @@ -3,7 +3,7 @@ import qbs Project { property stringList bundleFileTags: [ "aggregate_infoplist", "pkginfo", "hpp", - "icns", "resourcerules", "xcent", + "icns", "xcent", "compiled_ibdoc", "compiled_assetcatalog", "bundle.symlink.headers", "bundle.symlink.private-headers", "bundle.symlink.resources", "bundle.symlink.executable", diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 8572ecc36..4f41cd6ea 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -450,7 +450,6 @@ void TestBlackbox::bundleStructure() QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Info.plist").isRegularFile()); QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/PkgInfo").isRegularFile()); QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/resource.txt").isRegularFile()); - QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/ResourceRules.plist").isRegularFile()); } if (productName == "B") { @@ -465,7 +464,6 @@ void TestBlackbox::bundleStructure() QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders").isRegularDir()); QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders/dummy_p.h").isRegularFile()); QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/resource.txt").isRegularFile()); - QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/ResourceRules.plist").isRegularFile()); } if (productName == "C") { @@ -480,7 +478,6 @@ void TestBlackbox::bundleStructure() QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders").isRegularDir()); QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders/dummy_p.h").isRegularFile()); QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/resource.txt").isRegularFile()); - QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/ResourceRules.plist").isRegularFile()); } if (productName == "D") { @@ -493,7 +490,6 @@ void TestBlackbox::bundleStructure() QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/PrivateHeaders").isRegularDir()); QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/PrivateHeaders/dummy_p.h").isRegularFile()); QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/resource.txt").isRegularFile()); - QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/ResourceRules.plist").isRegularFile()); } if (productName == "E") { @@ -506,7 +502,6 @@ void TestBlackbox::bundleStructure() QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/PrivateHeaders").isRegularDir()); QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/PrivateHeaders/dummy_p.h").isRegularFile()); QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/resource.txt").isRegularFile()); - QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/ResourceRules.plist").isRegularFile()); } if (productName == "F") { @@ -519,7 +514,6 @@ void TestBlackbox::bundleStructure() QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/PrivateHeaders").isRegularDir()); QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/PrivateHeaders/dummy_p.h").isRegularFile()); QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/resource.txt").isRegularFile()); - QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/ResourceRules.plist").isRegularFile()); } if (productName == "G") { @@ -2181,6 +2175,22 @@ void TestBlackbox::qobjectInObjectiveCpp() QCOMPARE(runQbs(), 0); } +void TestBlackbox::qtBug51237() +{ + const QString profileName = "profile-qtBug51237"; + const QString propertyName = "mymodule.theProperty"; + { + Settings settings((QString())); + Profile profile(profileName, &settings); + profile.setValue(propertyName, QStringList()); + } + QDir::setCurrent(testDataDir + "/QTBUG-51237"); + QbsRunParameters params; + params.arguments << "profile:" + profileName; + params.useProfile = false; + QCOMPARE(runQbs(params), 0); +} + void TestBlackbox::dynamicMultiplexRule() { const QString testDir = testDataDir + "/dynamicMultiplexRule"; diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h index 69ffc5341..182221b78 100644 --- a/tests/auto/blackbox/tst_blackbox.h +++ b/tests/auto/blackbox/tst_blackbox.h @@ -145,6 +145,7 @@ private slots: void qbsVersion(); void qmlDebugging(); void qobjectInObjectiveCpp(); + void qtBug51237(); void radAfterIncompleteBuild(); void radAfterIncompleteBuild_data(); void recursiveRenaming(); |