diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-07-05 11:09:57 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-07-05 12:51:12 +0000 |
commit | d7fb2f24e251c058bdab17bbd737639d9a1c8efd (patch) | |
tree | 1f63503607e600cd83ed0cf9bfd8c6d5264575ec /share/qbs/imports/qbs/base | |
parent | 1086fb5afeb5194b4cc692f177898b2fe123efc7 (diff) |
AutotestRunner: Run installed test executables from install location
Task-number: QBS-993
Change-Id: Iee1aed8c67b32c2c41cd2e9617406b567d960410
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'share/qbs/imports/qbs/base')
-rw-r--r-- | share/qbs/imports/qbs/base/AutotestRunner.qbs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/share/qbs/imports/qbs/base/AutotestRunner.qbs b/share/qbs/imports/qbs/base/AutotestRunner.qbs index b5b43e3fd..121493de8 100644 --- a/share/qbs/imports/qbs/base/AutotestRunner.qbs +++ b/share/qbs/imports/qbs/base/AutotestRunner.qbs @@ -29,6 +29,8 @@ ****************************************************************************/ import qbs +import qbs.File +import qbs.FileInfo import qbs.ModUtils import qbs.Utilities @@ -52,8 +54,18 @@ Product { alwaysUpdated: false } prepare: { + var commandFilePath; + var installed = input.moduleProperty("qbs", "install"); + if (installed) { + commandFilePath = FileInfo.joinPaths(input.moduleProperty("qbs", "installRoot"), + input.moduleProperty("qbs", "installPrefix"), + input.moduleProperty("qbs", "installDir"), + input.fileName); + } + if (!commandFilePath || !File.exists(commandFilePath)) + commandFilePath = input.filePath; var fullCommandLine = product.wrapper - .concat([input.filePath]) + .concat([commandFilePath]) .concat(product.arguments); var cmd = new Command(fullCommandLine[0], fullCommandLine.slice(1)); cmd.description = "Running test " + input.fileName; |