diff options
author | The Qt Project <gerrit-noreply@qt-project.org> | 2019-08-28 11:38:35 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2019-08-28 11:38:35 +0000 |
commit | 037ed366c6f3cd57a3d8a40f1ce0a0050e0855ec (patch) | |
tree | 011346189c8615bad6612ae3e1d29f218a9fed55 /tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs | |
parent | 52f4eccf83d8c0f4519216fede7e8311fd275f70 (diff) | |
parent | 7dd870f21601301aca67548e96866204cec3e852 (diff) |
Merge "Merge 1.14 into master"
Diffstat (limited to 'tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs')
-rw-r--r-- | tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs b/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs new file mode 100644 index 000000000..3ee443438 --- /dev/null +++ b/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs @@ -0,0 +1,38 @@ +import qbs.FileInfo + +Product { + name: "the-product" + type: "output" + Group { + files: "input.bin" + fileTags: "binary" + } + Group { + files: "input.txt" + fileTags: "text" + } + + Rule { + inputs: ["text", "binary"] + Artifact { + filePath: "output." + FileInfo.completeSuffix(input.filePath) + fileTags: "output" + } + prepare: { + var binary; + var prefixArgs; + if (product.qbs.hostOS.contains("windows")) { + binary = product.qbs.windowsShellPath; + prefixArgs = ["/c", "type"]; + } else { + binary = "cat"; + prefixArgs = []; + } + var inputPath = FileInfo.toNativeSeparators(input.filePath); + var cmd = new Command(binary, prefixArgs.concat([inputPath, inputPath])); + cmd.stdoutFilePath = output.filePath; + cmd.highlight = "filegen"; + return cmd; + } + } +} |