summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-11-30 13:37:30 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-11-30 16:12:43 +0000
commita5cc49f2c62cfd4094c6a8bccd7741ca9ee7e072 (patch)
tree5a36b7352758dfe19df63e9a6d8fe866f61379fe /tests
parent5cd5e8e958a91592a00f5b2fac54d71eb6903330 (diff)
downloadqbs-a5cc49f2c62cfd4094c6a8bccd7741ca9ee7e072.tar.gz
Clean up the scope of configure scripts
- Remove unneeded elements from the special scope. - Do not use the special scope for evaluating the condition. - Only set up the special scope if we actually run the configure script. Change-Id: I5e288fe839213a5226dae3be768c537c2919a15b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs3
-rw-r--r--tests/auto/blackbox/testdata/configure/modules/definition/module.qbs3
-rw-r--r--tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs5
-rw-r--r--tests/auto/blackbox/testdata/probe-change-tracking/probe-change-tracking.qbs2
4 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs b/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs
index acf9d0890..c2445eafd 100644
--- a/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs
+++ b/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs
@@ -3,8 +3,9 @@ import qbs
CppApplication {
Probe {
id: dummy
+ property stringList toolchain: qbs.toolchain
configure: {
- if (qbs.toolchain.contains("msvc"))
+ if (toolchain.contains("msvc"))
console.info("msvc");
}
}
diff --git a/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs b/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs
index 60f442149..9f403d7fe 100644
--- a/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs
+++ b/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs
@@ -6,11 +6,12 @@ Module {
Depends { name: 'cpp' }
Probe {
id: node
+ property stringList targetOS: qbs.targetOS
property string result
configure: {
var cmd;
var args;
- if (qbs.targetOS.contains("windows")) {
+ if (targetOS.contains("windows")) {
cmd = qbs.windowsShellPath;
args = ["/c", "date", "/t"];
} else {
diff --git a/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs b/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs
index 52a6857d2..eb7c56738 100644
--- a/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs
+++ b/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs
@@ -9,12 +9,13 @@ Project
{
id: projectBuilder
property stringList refs: []
+ property string sourceDir: sourceDirectory
configure:
{
- var tempDir = FileInfo.joinPaths(sourceDirectory, "temp");
+ var tempDir = FileInfo.joinPaths(sourceDir, "temp");
File.makePath(tempDir);
- var srcDir = FileInfo.joinPaths(sourceDirectory, "src");
+ var srcDir = FileInfo.joinPaths(sourceDir, "src");
var projectDirs = File.directoryEntries(srcDir, File.Dirs | File.NoDotAndDotDot);
var list = [];
for (it in projectDirs) {
diff --git a/tests/auto/blackbox/testdata/probe-change-tracking/probe-change-tracking.qbs b/tests/auto/blackbox/testdata/probe-change-tracking/probe-change-tracking.qbs
index 30065d490..ff37985a4 100644
--- a/tests/auto/blackbox/testdata/probe-change-tracking/probe-change-tracking.qbs
+++ b/tests/auto/blackbox/testdata/probe-change-tracking/probe-change-tracking.qbs
@@ -31,6 +31,8 @@ Project {
Probe {
id: productProbe
condition: product.runProbe
+ property int v1: product.v1
+ property int v2: product.v2
configure: {
console.info("running productProbe: " + (v1 + v2));
}