diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-04-24 09:03:43 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-04-24 13:25:47 +0000 |
commit | 04fab8951118242c5243113c3452a4c316a35ce9 (patch) | |
tree | 278baa06694c30a38d2c576dfb575c7f29a1ec4c /qbs.qbs | |
parent | 897f1f4453441b0ae6910740921d22cab0980d45 (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.qbs | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -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; + } + } } |