diff options
author | Ivan Komissarov <ABBAPOH@gmail.com> | 2019-06-08 18:20:03 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2019-06-26 15:25:30 +0000 |
commit | 06f46da6c31de7d5b767da38713b11b1a117b34e (patch) | |
tree | b23b248961c0d71943a3978969cdd1bd19361de1 /tests/auto/blackbox/testdata/path-probe | |
parent | d214864b666d3551fe25a648b82832fcbd241b2e (diff) |
Add PathProbe::candidateFilter property
This property can be used to check if candidate conforms with some
conditions. For example, an architecture of a shared
library candidate should match the current qbs.architecture.
Also, this will allow to implement support for the "text based stub
libraries" (yaml files that point to a real library in a system) on
macOS - instead of checking real file architecture, it should be read
from .tbd file
Change-Id: Ie84a3e70d883dec949440358e2f08213a8501982
Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata/path-probe')
-rw-r--r-- | tests/auto/blackbox/testdata/path-probe/BaseApp.qbs | 2 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs b/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs index 944a95a93..84c00c240 100644 --- a/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs +++ b/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs @@ -37,6 +37,7 @@ CppApplication { property varList inputNameSuffixes property pathList inputSearchPaths property var inputNameFilter + property var inputCandidateFilter property stringList outputFilePaths @@ -46,6 +47,7 @@ CppApplication { names: inputNames nameSuffixes: inputNameSuffixes nameFilter: inputNameFilter + candidateFilter: inputCandidateFilter searchPaths: inputSearchPaths } diff --git a/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs b/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs new file mode 100644 index 000000000..a65256a68 --- /dev/null +++ b/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs @@ -0,0 +1,12 @@ +import qbs.FileInfo + +BaseApp { + inputNames: ["tool.1", "tool.2"] + inputSearchPaths: "bin" + outputFilePaths: ["bin/tool.2"] + inputCandidateFilter: { + return function(f) { + return FileInfo.fileName(f) == "tool.2"; + } + } +} |