diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-03-10 01:46:10 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-03-20 16:20:27 +0000 |
commit | 791a1651c51b596d2b74338fcc97697bed8b1127 (patch) | |
tree | 405d6ba50d22626d8e2b605666001e29d047f1aa | |
parent | 0855bb3d44675084c92d956e5059dc58e65714a7 (diff) |
Add a wrapper property to AutotestRunner.
This is useful for running tools like Valgrind and the like.
Change-Id: I0b655f95791add09c80329d96c7d25a6122b28c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r-- | doc/reference/items/autotestrunner.qdoc | 6 | ||||
-rw-r--r-- | share/qbs/imports/qbs/base/AutotestRunner.qbs | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/doc/reference/items/autotestrunner.qdoc b/doc/reference/items/autotestrunner.qdoc index 38b945d6a..74f4e42cf 100644 --- a/doc/reference/items/autotestrunner.qdoc +++ b/doc/reference/items/autotestrunner.qdoc @@ -96,6 +96,12 @@ \li By default, only those autotests are considered that are in the same sub-project that the \c AutotestRunner was instantiated in. If you want to run all autotests regardless of their location in the project hierarchy, set this property to \c false. + \row + \li wrapper + \li stringList + \li empty + \li Wrapper binary and its arguments for wrapping autotest calls. + This is useful for tools like Valgrind and alike. \endtable */ diff --git a/share/qbs/imports/qbs/base/AutotestRunner.qbs b/share/qbs/imports/qbs/base/AutotestRunner.qbs index 124ce6cd2..3b3475c55 100644 --- a/share/qbs/imports/qbs/base/AutotestRunner.qbs +++ b/share/qbs/imports/qbs/base/AutotestRunner.qbs @@ -10,6 +10,7 @@ Product { qbs.commonRunEnvironment, qbs.pathListSeparator) property bool limitToSubProject: true + property stringList wrapper: [] Depends { productTypes: "autotest" limitToSubProject: product.limitToSubProject @@ -22,7 +23,10 @@ Product { alwaysUpdated: false } prepare: { - var cmd = new Command(input.filePath, product.arguments); + var fullCommandLine = product.wrapper + .concat([input.filePath]) + .concat(product.arguments); + var cmd = new Command(fullCommandLine[0], fullCommandLine.slice(1)); cmd.description = "Running test " + input.fileName; cmd.environment = product.environment; return cmd; |