aboutsummaryrefslogtreecommitdiffstats
path: root/qbs.qbs
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-04-24 09:03:43 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-04-24 13:25:47 +0000
commit04fab8951118242c5243113c3452a4c316a35ce9 (patch)
tree278baa06694c30a38d2c576dfb575c7f29a1ec4c /qbs.qbs
parent897f1f4453441b0ae6910740921d22cab0980d45 (diff)
qbs build: Make autotest runner work on Windows.
Change-Id: I1a383165500a7f0ebbb14c75dd1685985857aef1 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qbs.qbs')
-rw-r--r--qbs.qbs23
1 files changed, 22 insertions, 1 deletions
diff --git a/qbs.qbs b/qbs.qbs
index 5264bffbd..23937dae2 100644
--- a/qbs.qbs
+++ b/qbs.qbs
@@ -40,5 +40,26 @@ Project {
}
}
- AutotestRunner { }
+ AutotestRunner {
+ Depends { name: "Qt.core" }
+ environment: {
+ var env = base;
+ if (qbs.hostOS.contains("windows") && qbs.targetOS.contains("windows")) {
+ var path = "";
+ for (var i = 0; i < env.length; ++i) {
+ if (env[i].startsWith("PATH=")) {
+ path = env[i].substring(5);
+ break;
+ }
+ }
+ path = Qt.core.binPath + ";" + path;
+ var arrayElem = "PATH=" + path;
+ if (i < env.length)
+ env[i] = arrayElem;
+ else
+ env.push(arrayElem);
+ }
+ return env;
+ }
+ }
}