aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-06-13 18:04:58 -0700
committerJake Petroules <jake.petroules@qt.io>2017-06-14 09:10:04 +0000
commiteb2e67a44ffa445a1bb360d1f75d5a722c0fa08a (patch)
tree5a13f251fce47449aa685e4351f343c7117742c0 /tests
parent5bfef74f12e59bfc699b7c8e93ea05c2625891d5 (diff)
Make sure qcc handles response files properly for linking
Task-number: QBS-1143 Change-Id: I588412c269222419cecc3394f4588a4269eb3a52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/response-files/response-files.qbs35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/response-files/response-files.qbs b/tests/auto/blackbox/testdata/response-files/response-files.qbs
index 7913287e1..2979fcdfd 100644
--- a/tests/auto/blackbox/testdata/response-files/response-files.qbs
+++ b/tests/auto/blackbox/testdata/response-files/response-files.qbs
@@ -34,4 +34,39 @@ Project {
}
}
}
+ Product {
+ name: "lotsofobjects"
+ type: ["dynamiclibrary"]
+ Depends { name: "cpp" }
+ Rule {
+ multiplex: true
+ outputFileTags: ["cpp"]
+ outputArtifacts: {
+ var artifacts = [];
+ for (var i = 0; i < 1000; ++i)
+ artifacts.push({filePath: "source-" + i + ".cpp", fileTags: ["cpp"]});
+ return artifacts;
+ }
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.description = "generating " + outputs["cpp"].length + " dummy source files";
+ cmd.outputFilePaths = outputs["cpp"].map(function (a) {
+ return a.filePath;
+ });
+ cmd.sourceCode = function () {
+ var index = 0;
+ outputFilePaths.map(function (fp) {
+ var tf = new TextFile(fp, TextFile.WriteOnly);
+ try {
+ tf.writeLine("extern int foo" + index + "() { return 0; }");
+ ++index;
+ } finally {
+ tf.close();
+ }
+ });
+ };
+ return [cmd];
+ }
+ }
+ }
}