aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/path-probe
Commit message (Collapse)AuthorAgeFilesLines
* Test for array-like objects with instanceof ArrayRichard Weickelt2021-02-151-1/+1
| | | | | | | | | | Array.isArray() seemed to work for arrays created in scripts as well as for QStringList and QVariantList created in C++ when using QtScript. QJSEngine is more strict (see the comments in QTBUG-45018). One way to work around that problem is to use instanceof Array instead. Change-Id: I0f1c8757a5ab2f82e26eff19a8b5ecf667bb04b1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove cpp dependency from PathProbe blackbox testsRichard Weickelt2020-09-272-4/+1
| | | | | | | | This reduces execution time to 1s (was 10s) and simplifies PathProbe debugging because the cpp module contains probes as well. Change-Id: Iddd4de71143892d6815acbd1efff30f92d70a423 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Merge branch 1.17 into masterRichard Weickelt2020-08-143-0/+12
|\ | | | | | | Change-Id: Ibdf2afb9f05682e0624540af22330abc8580bafb
| * Tune search order of path probesIvan Komissarov2020-08-133-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Within the groups of user-provided and system-provided paths, environment variables need to take precedence over properties, because there is currently no other way to override the search paths of probes from the outside if the probe-using code did not explicitly bind them to Product/Module properties. We search directly user-provided paths before ones from system-provided environment variables to minimize the risk of surprises due to outside influence. [ChangeLog][Behavior Changes] The lookup order in PathProbe changed to [environmentPaths, searchPaths, platformEnvironmentPaths, platformSearchPaths] Change-Id: Ib0c3bc44e5a8efaaaa073f28f1f3a53feb0f78db Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Do not rely on PathProbe returning relative pathsRichard Weickelt2020-08-131-2/+2
|/ | | | | | | | | | | | | | | | | | | | | This testcase uses relative paths both as input properties to PathProbe and as expected results (rhs). The obtained output properties (lhs) are relative paths, too and as such, a simple string comparison is performed to verify the results. While this currently works, it is not correct to do so. PathProbe features input and output properties of pathList type and thus, when reading these properties, returned values should always be absolute file paths. It is a known problem that path properties in probes are not absolutified, which will be fixed when porting to QJSEngine. Thus, we need to absolutify the expected values when evaluating the results. In order to remain compatible with the current implementation, we need to do the absolutification on both sides. Change-Id: I13c7655f509179f3778c736e08fbd1bd264a63c4 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Probes: Remove nameFilter from FrameworkProbeIvan Komissarov2020-07-161-0/+10
| | | | | | | | | | It is not possible to use functions as values for properties with the new JS engine. Remove nameFilter by allowing to have common nameSuffixes for different selectors. Change-Id: I24ae747f4d609c956285e77ee832c6e99304a622 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Improve TestBlackbox::pathProbeIvan Komissarov2020-02-0314-8/+77
| | | | | | | | | | | | | | Add checks for the candidatePaths and the single file API. Also, this includes a behavior change - if multiple selectors are present, the filePath/fileName/path probe properties are not set up - this is because it is not clear how they should be set up in case when the first file in selectors is found, but the second is not (and thus probe.found is false). In case of multiple selectors, user should use probe.allResults but not the single file API. Change-Id: Ib56faf0de93d3ec9fc49f5dbc9d51d4b36831a2d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add PathProbe::candidateFilter propertyIvan Komissarov2019-06-262-0/+14
| | | | | | | | | | | | | | | 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>
* Allow PathProbe to search multiple filesIvan Komissarov2019-06-2520-0/+158
Change-Id: I6ae2dd130cbafb03e51bc6e8e8a3e262d6d45fc6 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>