aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-06-21 16:50:31 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-06-22 08:26:14 +0000
commitdfe13cd2180db68877eb9f72f8115d54b9efa644 (patch)
tree4d23acf5968a55e1bf7fe7d039c774f55bb52f88 /tests
parentab962bcf80825f7f9135ff339d66a3db44693225 (diff)
Add XFAIL-ing autotest
Task-number: QBS-1113 Change-Id: I2ad8374806fd7ee3d7aed51409753b0f20a702ff Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/aux-inputs-from-deps/aux-inputs-from-deps.qbs56
-rw-r--r--tests/auto/blackbox/testdata/aux-inputs-from-deps/main.cpp3
-rw-r--r--tests/auto/blackbox/testdata/aux-inputs-from-deps/util.js8
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp9
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
5 files changed, 77 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/aux-inputs-from-deps/aux-inputs-from-deps.qbs b/tests/auto/blackbox/testdata/aux-inputs-from-deps/aux-inputs-from-deps.qbs
new file mode 100644
index 000000000..bbfeafa8f
--- /dev/null
+++ b/tests/auto/blackbox/testdata/aux-inputs-from-deps/aux-inputs-from-deps.qbs
@@ -0,0 +1,56 @@
+import qbs
+import qbs.File
+import qbs.TextFile
+
+import "util.js" as Utils
+
+Project {
+ CppApplication {
+ name: "app"
+ files: ["main.cpp"]
+ Depends { name: "dep" }
+ }
+ Product {
+ name: "dep"
+ type: ["hpp"]
+ Rule {
+ inputs: ["blubb.in"]
+ Artifact {
+ filePath: "dummy.h"
+ fileTags: ["hpp"]
+ }
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.description = "generating header";
+ cmd.sourceCode = function() {
+ Utils.sleep(1000);
+ File.copy(input.filePath, output.filePath);
+ }
+ return [cmd];
+ }
+ }
+ Rule {
+ multiplex: true
+ Artifact {
+ filePath: "dummy.blubb"
+ fileTags: ["blubb.in"]
+ }
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.description = "blubb.in";
+ cmd.sourceCode = function() {
+ Utils.sleep(1000);
+ var f = new TextFile(output.filePath, TextFile.WriteOnly);
+ f.close();
+ }
+ return [cmd];
+ }
+ }
+ Export {
+ Depends { name: "cpp" }
+ cpp.includePaths: [product.buildDirectory]
+ }
+ }
+}
+
+
diff --git a/tests/auto/blackbox/testdata/aux-inputs-from-deps/main.cpp b/tests/auto/blackbox/testdata/aux-inputs-from-deps/main.cpp
new file mode 100644
index 000000000..d16404623
--- /dev/null
+++ b/tests/auto/blackbox/testdata/aux-inputs-from-deps/main.cpp
@@ -0,0 +1,3 @@
+#include <dummy.h>
+
+int main() { }
diff --git a/tests/auto/blackbox/testdata/aux-inputs-from-deps/util.js b/tests/auto/blackbox/testdata/aux-inputs-from-deps/util.js
new file mode 100644
index 000000000..a37a8cbb1
--- /dev/null
+++ b/tests/auto/blackbox/testdata/aux-inputs-from-deps/util.js
@@ -0,0 +1,8 @@
+function sleep(timeInMs)
+{
+ var referenceTime = new Date();
+ var time = null;
+ do {
+ time = new Date();
+ } while (time - referenceTime < timeInMs);
+}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 889a7531e..5f479ad36 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -3869,6 +3869,15 @@ void TestBlackbox::assembly()
QCOMPARE(m_qbsStdout.contains("creating testd.lib"), haveMSVC);
}
+void TestBlackbox::auxiliaryInputsFromDependencies()
+{
+ QDir::setCurrent(testDataDir + "/aux-inputs-from-deps");
+ QbsRunParameters params;
+ params.expectFailure = true;
+ QEXPECT_FAIL(0, "QBS-1113", Abort);
+ QVERIFY(runQbs(params) == 0);
+}
+
void TestBlackbox::nsis()
{
QStringList regKeys;
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 49fdf9d27..83d8420e4 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -43,6 +43,7 @@ private slots:
void alwaysRun_data();
void artifactScanning();
void assembly();
+ void auxiliaryInputsFromDependencies();
void badInterpreter();
void buildDirectories();
void buildEnvChange();