aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorRaphael Cotty <raphael.cotty@gmail.com>2022-01-28 11:46:05 +0100
committerraphaelcotty <raphaelcotty@codereview.qt-project.org>2022-01-31 22:26:39 +0000
commitaa2094761aec16001ac0d19bf85483fdc2c78611 (patch)
treee2fcc1a97d4ba0ce6a2d57069d700da8c7ef74ec /tests/auto
parentf726d465ff6365846e5a78f61e2cedd6e9ff6609 (diff)
Use Host and FileInfo service
Replace all the possible use of the qbs module that can be replaced by the Host and FileInfo services. Change-Id: I0d6f820bb2577eacd9081ec2df1eb53adf94d50e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/api/testdata/explicitly-depends-on/explicitly-depends-on.qbs3
-rw-r--r--tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs4
-rw-r--r--tests/auto/api/testdata/process-result/process-result.qbs4
-rw-r--r--tests/auto/api/testdata/timeout-process/timeout.qbs6
-rw-r--r--tests/auto/api/testdata/tool-in-module/use-outside-project/modules/thetool/thetool.qbs3
-rw-r--r--tests/auto/api/testdata/tool-in-module/use-within-project/use-within-project.qbs4
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs5
-rw-r--r--tests/auto/blackbox/testdata-java/java/vehicles.qbs3
-rw-r--r--tests/auto/blackbox/testdata-joblimits/job-limits-init/job-limits-init.qbs4
-rw-r--r--tests/auto/blackbox/testdata-qt/auto-qrc/auto-qrc.qbs4
-rw-r--r--tests/auto/blackbox/testdata-qt/forced-moc/forced-moc.qbs3
-rw-r--r--tests/auto/blackbox/testdata-qt/pkgconfig/pkgconfig.qbs3
-rw-r--r--tests/auto/blackbox/testdata-qt/plugin-meta-data/plugin-meta-data.qbs3
-rw-r--r--tests/auto/blackbox/testdata-qt/qrc/i.qbs3
-rw-r--r--tests/auto/blackbox/testdata-qt/qtscxml/qtscxml.qbs9
-rw-r--r--tests/auto/blackbox/testdata-windows/wix/WiXInstallers.qbs3
-rw-r--r--tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs6
-rw-r--r--tests/auto/blackbox/testdata/autotest-with-dependencies/autotest-with-dependencies.qbs5
-rw-r--r--tests/auto/blackbox/testdata/autotests/autotests.qbs6
-rw-r--r--tests/auto/blackbox/testdata/badInterpreter/badInterpreter.qbs4
-rw-r--r--tests/auto/blackbox/testdata/capnproto/capnproto_absolute_import.qbs4
-rw-r--r--tests/auto/blackbox/testdata/capnproto/capnproto_cpp.qbs4
-rw-r--r--tests/auto/blackbox/testdata/capnproto/capnproto_cpp_pkgconfig.qbs6
-rw-r--r--tests/auto/blackbox/testdata/capnproto/capnproto_relative_import.qbs4
-rw-r--r--tests/auto/blackbox/testdata/capnproto/greeter_cpp.qbs4
-rw-r--r--tests/auto/blackbox/testdata/configure/configure.qbs3
-rw-r--r--tests/auto/blackbox/testdata/dynamic-library-in-module/theapp.qbs4
-rw-r--r--tests/auto/blackbox/testdata/env-merging/env-merging.qbs4
-rw-r--r--tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs3
-rw-r--r--tests/auto/blackbox/testdata/exports-qbs/consumer.qbs4
-rw-r--r--tests/auto/blackbox/testdata/groups-in-modules/groups-in-modules.qbs4
-rw-r--r--tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs4
-rw-r--r--tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs8
-rw-r--r--tests/auto/blackbox/testdata/includeLookup/includeLookup.qbs3
-rw-r--r--tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs3
-rw-r--r--tests/auto/blackbox/testdata/jsextensions-process/process.qbs7
-rw-r--r--tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs4
-rw-r--r--tests/auto/blackbox/testdata/lexyacc/two-grammars/two-grammars.qbs4
-rw-r--r--tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs4
-rw-r--r--tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs4
-rw-r--r--tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs4
-rw-r--r--tests/auto/blackbox/testdata/makefile-generator/app.qbs4
-rw-r--r--tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs4
-rw-r--r--tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs4
-rw-r--r--tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs4
-rw-r--r--tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs4
-rw-r--r--tests/auto/blackbox/testdata/module-providers/module-providers.qbs4
-rw-r--r--tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs4
-rw-r--r--tests/auto/blackbox/testdata/nodejs/hello.qbs4
-rw-r--r--tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs3
-rw-r--r--tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs4
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs4
-rw-r--r--tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs4
-rw-r--r--tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs4
-rw-r--r--tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs4
-rw-r--r--tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs4
-rw-r--r--tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs4
-rw-r--r--tests/auto/blackbox/testdata/protobuf/import.qbs4
-rw-r--r--tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs4
-rw-r--r--tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs3
-rw-r--r--tests/auto/blackbox/testdata/response-files/response-files.qbs3
-rw-r--r--tests/auto/blackbox/testdata/setup-run-environment/setup-run-environment.qbs5
-rw-r--r--tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs3
-rw-r--r--tests/auto/blackbox/testdata/trackAddFile/after/trackAddFile.qbs4
-rw-r--r--tests/auto/blackbox/testdata/trackAddFile/before/trackAddFile.qbs4
-rw-r--r--tests/auto/blackbox/testdata/trackFileTags/after/trackFileTags.qbs4
-rw-r--r--tests/auto/blackbox/testdata/trackFileTags/before/trackFileTags.qbs4
-rw-r--r--tests/auto/blackbox/testdata/vcs/vcstest.qbs4
-rw-r--r--tests/auto/language/testdata/getNativeSetting.qbs6
69 files changed, 201 insertions, 84 deletions
diff --git a/tests/auto/api/testdata/explicitly-depends-on/explicitly-depends-on.qbs b/tests/auto/api/testdata/explicitly-depends-on/explicitly-depends-on.qbs
index 1823384f5..0ebb73413 100644
--- a/tests/auto/api/testdata/explicitly-depends-on/explicitly-depends-on.qbs
+++ b/tests/auto/api/testdata/explicitly-depends-on/explicitly-depends-on.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
import qbs.TextFile
Project {
@@ -12,7 +13,7 @@ Project {
}
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
index f100e4d37..99aafea1c 100644
--- a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
+++ b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
@@ -1,3 +1,5 @@
+import qbs.Host
+
Project {
CppApplication {
type: "application"
@@ -17,7 +19,7 @@ Project {
Depends { name: "infinite-loop" }
Depends {
name: "cpp" // Make sure build environment is set up properly.
- condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc")
}
Rule {
inputsFromDependencies: "application"
diff --git a/tests/auto/api/testdata/process-result/process-result.qbs b/tests/auto/api/testdata/process-result/process-result.qbs
index 069edb4c0..dc9ff2839 100644
--- a/tests/auto/api/testdata/process-result/process-result.qbs
+++ b/tests/auto/api/testdata/process-result/process-result.qbs
@@ -1,3 +1,5 @@
+import qbs.Host
+
Project {
CppApplication {
name: "app"
@@ -6,7 +8,7 @@ Project {
}
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/api/testdata/timeout-process/timeout.qbs b/tests/auto/api/testdata/timeout-process/timeout.qbs
index 994050309..c95b5ae67 100644
--- a/tests/auto/api/testdata/timeout-process/timeout.qbs
+++ b/tests/auto/api/testdata/timeout-process/timeout.qbs
@@ -1,3 +1,5 @@
+import qbs.Host
+
Project {
CppApplication {
type: "application"
@@ -14,7 +16,7 @@ Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
@@ -24,7 +26,7 @@ Project {
Depends { name: "infinite-loop" }
Depends {
name: "cpp" // Make sure build environment is set up properly.
- condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc")
}
Rule {
inputsFromDependencies: "application"
diff --git a/tests/auto/api/testdata/tool-in-module/use-outside-project/modules/thetool/thetool.qbs b/tests/auto/api/testdata/tool-in-module/use-outside-project/modules/thetool/thetool.qbs
index d72ebda17..de9c4e935 100644
--- a/tests/auto/api/testdata/tool-in-module/use-outside-project/modules/thetool/thetool.qbs
+++ b/tests/auto/api/testdata/tool-in-module/use-outside-project/modules/thetool/thetool.qbs
@@ -1,11 +1,12 @@
import qbs.FileInfo
+import qbs.Host
Module {
Depends { name: "cpp" }
Group {
name: "thetool binary"
files: FileInfo.cleanPath(FileInfo.joinPaths(path, "..", "..",
- "thetool" + (qbs.hostOS.contains("windows") ? ".exe" : "")));
+ "thetool" + (Host.os().contains("windows") ? ".exe" : "")));
fileTags: ["thetool.thetool"]
filesAreTargets: true
}
diff --git a/tests/auto/api/testdata/tool-in-module/use-within-project/use-within-project.qbs b/tests/auto/api/testdata/tool-in-module/use-within-project/use-within-project.qbs
index d0f7c35ed..ab4e07170 100644
--- a/tests/auto/api/testdata/tool-in-module/use-within-project/use-within-project.qbs
+++ b/tests/auto/api/testdata/tool-in-module/use-within-project/use-within-project.qbs
@@ -1,3 +1,5 @@
+import qbs.Host
+
Project {
CppApplication {
name: "thetool"
@@ -5,7 +7,7 @@ Project {
files: "main.cpp"
property bool skip: {
- var result = qbs.targetPlatform !== qbs.hostPlatform;
+ var result = qbs.targetPlatform !== Host.platform();
if (result)
console.info("Skip this test");
return result;
diff --git a/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs b/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs
index 6e999adda..7cbb58051 100644
--- a/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs
+++ b/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs
@@ -1,3 +1,4 @@
+import qbs.Host
import qbs.Utilities
Project {
@@ -17,8 +18,8 @@ Project {
filez.push("empty.xcassets/empty.iconset");
else if (Utilities.versionCompare(xcode.version, "5") >= 0)
filez.push("empty.xcassets");
- if ((qbs.hostOSVersionMajor >= 11
- || qbs.hostOSVersionMinor >= 10) // need macOS 10.10 or higher to build SBs
+ if ((Host.osVersionMajor() >= 11
+ || Host.osVersionMinor() >= 10) // need macOS 10.10 or higher to build SBs
&& cpp.minimumMacosVersion !== undefined
&& Utilities.versionCompare(cpp.minimumMacosVersion, "10.10") >= 0)
filez.push("Storyboard.storyboard");
diff --git a/tests/auto/blackbox/testdata-java/java/vehicles.qbs b/tests/auto/blackbox/testdata-java/java/vehicles.qbs
index 633ee5abd..2fc01e102 100644
--- a/tests/auto/blackbox/testdata-java/java/vehicles.qbs
+++ b/tests/auto/blackbox/testdata-java/java/vehicles.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
import qbs.Utilities
Project {
@@ -11,7 +12,7 @@ Project {
}
property bool _testPlatform: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata-joblimits/job-limits-init/job-limits-init.qbs b/tests/auto/blackbox/testdata-joblimits/job-limits-init/job-limits-init.qbs
index 9e387bc7f..3a0075530 100644
--- a/tests/auto/blackbox/testdata-joblimits/job-limits-init/job-limits-init.qbs
+++ b/tests/auto/blackbox/testdata-joblimits/job-limits-init/job-limits-init.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
Product {
property bool _testPlatform: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata-qt/auto-qrc/auto-qrc.qbs b/tests/auto/blackbox/testdata-qt/auto-qrc/auto-qrc.qbs
index 92b290719..bdbf8b2a1 100644
--- a/tests/auto/blackbox/testdata-qt/auto-qrc/auto-qrc.qbs
+++ b/tests/auto/blackbox/testdata-qt/auto-qrc/auto-qrc.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
QtApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata-qt/forced-moc/forced-moc.qbs b/tests/auto/blackbox/testdata-qt/forced-moc/forced-moc.qbs
index aab7ed220..064470a79 100644
--- a/tests/auto/blackbox/testdata-qt/forced-moc/forced-moc.qbs
+++ b/tests/auto/blackbox/testdata-qt/forced-moc/forced-moc.qbs
@@ -1,3 +1,4 @@
+import qbs.Host
import qbs.Utilities
QtApplication {
@@ -6,7 +7,7 @@ QtApplication {
console.info("using qt4");
return false;
}
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata-qt/pkgconfig/pkgconfig.qbs b/tests/auto/blackbox/testdata-qt/pkgconfig/pkgconfig.qbs
index 87ec6dc7d..b2d411154 100644
--- a/tests/auto/blackbox/testdata-qt/pkgconfig/pkgconfig.qbs
+++ b/tests/auto/blackbox/testdata-qt/pkgconfig/pkgconfig.qbs
@@ -1,10 +1,11 @@
+import qbs.Host
import qbs.Probes
Project {
property string name: 'pkgconfig'
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata-qt/plugin-meta-data/plugin-meta-data.qbs b/tests/auto/blackbox/testdata-qt/plugin-meta-data/plugin-meta-data.qbs
index 7e5f98340..a3067f0b0 100644
--- a/tests/auto/blackbox/testdata-qt/plugin-meta-data/plugin-meta-data.qbs
+++ b/tests/auto/blackbox/testdata-qt/plugin-meta-data/plugin-meta-data.qbs
@@ -1,3 +1,4 @@
+import qbs.Host
import qbs.Utilities
Project {
@@ -8,7 +9,7 @@ Project {
console.info("using qt4");
return false;
}
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata-qt/qrc/i.qbs b/tests/auto/blackbox/testdata-qt/qrc/i.qbs
index e98c069b5..45275106d 100644
--- a/tests/auto/blackbox/testdata-qt/qrc/i.qbs
+++ b/tests/auto/blackbox/testdata-qt/qrc/i.qbs
@@ -1,3 +1,4 @@
+import qbs.Host
import qbs.Utilities
Project {
@@ -7,7 +8,7 @@ Project {
console.info("using qt4");
return false;
}
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata-qt/qtscxml/qtscxml.qbs b/tests/auto/blackbox/testdata-qt/qtscxml/qtscxml.qbs
index 90b968ec9..90f7e5b96 100644
--- a/tests/auto/blackbox/testdata-qt/qtscxml/qtscxml.qbs
+++ b/tests/auto/blackbox/testdata-qt/qtscxml/qtscxml.qbs
@@ -1,5 +1,6 @@
import qbs.Environment
import qbs.FileInfo
+import qbs.Host
import qbs.Utilities
Project {
@@ -25,7 +26,7 @@ Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
@@ -41,9 +42,9 @@ Project {
cmd.description = "running " + input.filePath;
var envVars = {};
- if (product.qbs.hostOS.contains("windows")) {
+ if (Host.os().contains("windows")) {
envVars["PATH"] = FileInfo.toWindowsSeparators(input["Qt.core"].binPath);
- } else if (product.qbs.hostOS.contains("macos")) {
+ } else if (Host.os().contains("macos")) {
envVars["DYLD_LIBRARY_PATH"] = input["Qt.core"].libPath;
envVars["DYLD_FRAMEWORK_PATH"] = input["Qt.core"].libPath;
} else {
@@ -51,7 +52,7 @@ Project {
}
for (var varName in envVars) {
var oldValue = Environment.getEnv(varName) || "";
- var newValue = envVars[varName] + product.qbs.pathListSeparator + oldValue;
+ var newValue = envVars[varName] + FileInfo.pathListSeparator() + oldValue;
cmd.environment.push(varName + '=' + newValue);
}
diff --git a/tests/auto/blackbox/testdata-windows/wix/WiXInstallers.qbs b/tests/auto/blackbox/testdata-windows/wix/WiXInstallers.qbs
index 7e1dbf5e3..1316d07d7 100644
--- a/tests/auto/blackbox/testdata-windows/wix/WiXInstallers.qbs
+++ b/tests/auto/blackbox/testdata-windows/wix/WiXInstallers.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
Project {
WindowsInstallerPackage {
@@ -19,7 +20,7 @@ Project {
WindowsSetupPackage {
Depends { name: "QbsSetup" }
- condition: qbs.hostOS.contains("windows") // currently does not work in Wine with WiX 3.9
+ condition: Host.os().contains("windows") // currently does not work in Wine with WiX 3.9
name: "QbsBootstrapper"
targetName: "qbs-setup-" + qbs.architecture
files: ["QbsBootstrapper.wxs"]
diff --git a/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs b/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs
index 8ae4f3ceb..08de04fc7 100644
--- a/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs
+++ b/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
@@ -20,7 +22,7 @@ Project {
AutotestRunner {
Depends {
name: "cpp" // Make sure build environment is set up properly.
- condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc")
}
}
}
diff --git a/tests/auto/blackbox/testdata/autotest-with-dependencies/autotest-with-dependencies.qbs b/tests/auto/blackbox/testdata/autotest-with-dependencies/autotest-with-dependencies.qbs
index b64473526..8f4634368 100644
--- a/tests/auto/blackbox/testdata/autotest-with-dependencies/autotest-with-dependencies.qbs
+++ b/tests/auto/blackbox/testdata/autotest-with-dependencies/autotest-with-dependencies.qbs
@@ -1,9 +1,10 @@
import qbs.FileInfo
+import qbs.Host
Project {
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
@@ -29,7 +30,7 @@ Project {
AutotestRunner {
Depends {
name: "cpp" // Make sure build environment is set up properly.
- condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc")
}
arguments: FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, "bin")
auxiliaryInputs: "test-helper"
diff --git a/tests/auto/blackbox/testdata/autotests/autotests.qbs b/tests/auto/blackbox/testdata/autotests/autotests.qbs
index 4927a8869..dc27d8288 100644
--- a/tests/auto/blackbox/testdata/autotests/autotests.qbs
+++ b/tests/auto/blackbox/testdata/autotests/autotests.qbs
@@ -1,15 +1,17 @@
+import qbs.Host
+
Project {
references: ["test1", "test2", "test3"]
AutotestRunner {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
}
Depends {
name: "cpp" // Make sure build environment is set up properly.
- condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc")
}
}
}
diff --git a/tests/auto/blackbox/testdata/badInterpreter/badInterpreter.qbs b/tests/auto/blackbox/testdata/badInterpreter/badInterpreter.qbs
index 2317e6edf..3c8f64c6c 100644
--- a/tests/auto/blackbox/testdata/badInterpreter/badInterpreter.qbs
+++ b/tests/auto/blackbox/testdata/badInterpreter/badInterpreter.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
Project {
property bool enabled: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/capnproto/capnproto_absolute_import.qbs b/tests/auto/blackbox/testdata/capnproto/capnproto_absolute_import.qbs
index ee0903f73..0d7c8a1bb 100644
--- a/tests/auto/blackbox/testdata/capnproto/capnproto_absolute_import.qbs
+++ b/tests/auto/blackbox/testdata/capnproto/capnproto_absolute_import.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
CppApplication {
Depends { name: "capnproto.cpp"; required: false }
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
if (!capnproto.cpp.present)
diff --git a/tests/auto/blackbox/testdata/capnproto/capnproto_cpp.qbs b/tests/auto/blackbox/testdata/capnproto/capnproto_cpp.qbs
index d7ee1b4c9..c31824bb0 100644
--- a/tests/auto/blackbox/testdata/capnproto/capnproto_cpp.qbs
+++ b/tests/auto/blackbox/testdata/capnproto/capnproto_cpp.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
CppApplication {
Depends { name: "capnproto.cpp"; required: false }
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
if (!capnproto.cpp.present)
diff --git a/tests/auto/blackbox/testdata/capnproto/capnproto_cpp_pkgconfig.qbs b/tests/auto/blackbox/testdata/capnproto/capnproto_cpp_pkgconfig.qbs
index 58c7d568d..90201e440 100644
--- a/tests/auto/blackbox/testdata/capnproto/capnproto_cpp_pkgconfig.qbs
+++ b/tests/auto/blackbox/testdata/capnproto/capnproto_cpp_pkgconfig.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
CppApplication {
Depends { name: "capnproto.cpp"; required: false }
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
if (!capnproto.cpp.present)
@@ -14,4 +16,4 @@ CppApplication {
"foo.capnp"
]
qbsModuleProviders: "qbspkgconfig"
-} \ No newline at end of file
+}
diff --git a/tests/auto/blackbox/testdata/capnproto/capnproto_relative_import.qbs b/tests/auto/blackbox/testdata/capnproto/capnproto_relative_import.qbs
index 7c1991d8f..333a3cdb9 100644
--- a/tests/auto/blackbox/testdata/capnproto/capnproto_relative_import.qbs
+++ b/tests/auto/blackbox/testdata/capnproto/capnproto_relative_import.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
CppApplication {
Depends { name: "capnproto.cpp"; required: false }
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
if (!capnproto.cpp.present)
diff --git a/tests/auto/blackbox/testdata/capnproto/greeter_cpp.qbs b/tests/auto/blackbox/testdata/capnproto/greeter_cpp.qbs
index cf95b968b..7266e9e15 100644
--- a/tests/auto/blackbox/testdata/capnproto/greeter_cpp.qbs
+++ b/tests/auto/blackbox/testdata/capnproto/greeter_cpp.qbs
@@ -1,8 +1,10 @@
+import qbs.Host
+
Project {
CppApplication {
Depends { name: "capnproto.cpp"; required: false }
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
if (!capnproto.cpp.present)
diff --git a/tests/auto/blackbox/testdata/configure/configure.qbs b/tests/auto/blackbox/testdata/configure/configure.qbs
index 62dfa4ce4..be0e65247 100644
--- a/tests/auto/blackbox/testdata/configure/configure.qbs
+++ b/tests/auto/blackbox/testdata/configure/configure.qbs
@@ -1,8 +1,9 @@
import qbs.FileInfo
+import qbs.Host
Project {
property bool enabled: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/dynamic-library-in-module/theapp.qbs b/tests/auto/blackbox/testdata/dynamic-library-in-module/theapp.qbs
index 26b3f2cab..5ea8cef23 100644
--- a/tests/auto/blackbox/testdata/dynamic-library-in-module/theapp.qbs
+++ b/tests/auto/blackbox/testdata/dynamic-library-in-module/theapp.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/env-merging/env-merging.qbs b/tests/auto/blackbox/testdata/env-merging/env-merging.qbs
index b927003eb..eb681f36b 100644
--- a/tests/auto/blackbox/testdata/env-merging/env-merging.qbs
+++ b/tests/auto/blackbox/testdata/env-merging/env-merging.qbs
@@ -1,3 +1,5 @@
+import qbs.Host
+
Project {
CppApplication {
name: "tool"
@@ -6,7 +8,7 @@ Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs
index b855a6149..94632053a 100644
--- a/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs
+++ b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
Project {
Product {
@@ -42,7 +43,7 @@ Project {
Depends { name: "Qt.core"; required: false }
Depends { name: "helper1" }
Depends { name: "helper3" }
- property bool someCondition: qbs.hostOS.contains("windows") // hostOS for easier testing
+ property bool someCondition: Host.os().contains("windows") // hostOS for easier testing
property bool someOtherCondition: someCondition
Properties {
condition: !someOtherCondition
diff --git a/tests/auto/blackbox/testdata/exports-qbs/consumer.qbs b/tests/auto/blackbox/testdata/exports-qbs/consumer.qbs
index 79ac50e0b..073504400 100644
--- a/tests/auto/blackbox/testdata/exports-qbs/consumer.qbs
+++ b/tests/auto/blackbox/testdata/exports-qbs/consumer.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/groups-in-modules/groups-in-modules.qbs b/tests/auto/blackbox/testdata/groups-in-modules/groups-in-modules.qbs
index 0508872db..1d1d2d54e 100644
--- a/tests/auto/blackbox/testdata/groups-in-modules/groups-in-modules.qbs
+++ b/tests/auto/blackbox/testdata/groups-in-modules/groups-in-modules.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs
index 1ecbd0394..6f5360ccb 100644
--- a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs
+++ b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs
@@ -1,8 +1,10 @@
+import qbs.Host
+
CppApplication {
name: "grpc_cpp"
consoleApplication: true
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasDependencies;
diff --git a/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs b/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
index e1e722764..9d050e166 100644
--- a/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
+++ b/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
@@ -1,14 +1,16 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
}
consoleApplication: true
cpp.defines: [
- 'HOST_ARCHITECTURE="' + qbs.hostArchitecture + '"',
- 'HOST_PLATFORM="' + qbs.hostPlatform + '"'
+ 'HOST_ARCHITECTURE="' + Host.architecture() + '"',
+ 'HOST_PLATFORM="' + Host.platform() + '"'
]
files: "main.cpp"
}
diff --git a/tests/auto/blackbox/testdata/includeLookup/includeLookup.qbs b/tests/auto/blackbox/testdata/includeLookup/includeLookup.qbs
index 5b645fad3..903d170d0 100644
--- a/tests/auto/blackbox/testdata/includeLookup/includeLookup.qbs
+++ b/tests/auto/blackbox/testdata/includeLookup/includeLookup.qbs
@@ -1,11 +1,12 @@
import qbs.FileInfo
+import qbs.Host
Project {
property string name: 'includeLookup'
qbsSearchPaths: '.'
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs b/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs
index a1c96bf3d..a445fc35b 100644
--- a/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs
+++ b/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs
@@ -1,12 +1,13 @@
import qbs.File
import qbs.FileInfo
+import qbs.Host
import qbs.TextFile
Project {
name: "p"
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/jsextensions-process/process.qbs b/tests/auto/blackbox/testdata/jsextensions-process/process.qbs
index b634a8056..fa184fa91 100644
--- a/tests/auto/blackbox/testdata/jsextensions-process/process.qbs
+++ b/tests/auto/blackbox/testdata/jsextensions-process/process.qbs
@@ -1,12 +1,13 @@
import qbs.Environment
import qbs.FileInfo
+import qbs.Host
import qbs.Process
import qbs.TextFile
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
@@ -54,7 +55,7 @@ Project {
// closeWriteChannel test
process = new Process();
- if (product.qbs.hostOS.contains("windows"))
+ if (Host.os().contains("windows"))
process.start(product.qbs.windowsShellPath,
["/C", product.qbs.windowsSystemRoot + "\\system32\\sort.exe"]);
else
@@ -75,7 +76,7 @@ Project {
testReadlineFile.close();
process = new Process();
- if (product.qbs.hostOS.contains("windows"))
+ if (Host.os().contains("windows"))
process.exec(product.qbs.windowsShellPath,
["/C", "type", "123.txt"],
true);
diff --git a/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs b/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs
index ec4ede648..243ab09b5 100644
--- a/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs
+++ b/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/lexyacc/two-grammars/two-grammars.qbs b/tests/auto/blackbox/testdata/lexyacc/two-grammars/two-grammars.qbs
index 025b2109e..a126d725d 100644
--- a/tests/auto/blackbox/testdata/lexyacc/two-grammars/two-grammars.qbs
+++ b/tests/auto/blackbox/testdata/lexyacc/two-grammars/two-grammars.qbs
@@ -1,9 +1,11 @@
+import qbs.Host
+
CppApplication {
Depends { name: "lex_yacc" }
consoleApplication: true
cpp.includePaths: ".."
Properties {
- condition: qbs.hostOS.contains("darwin") && qbs.toolchain.contains("clang")
+ condition: Host.os().contains("darwin") && qbs.toolchain.contains("clang")
cpp.cFlags: "-Wno-implicit-function-declaration"
}
files: [
diff --git a/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs b/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs
index 7425cdca5..cae80e651 100644
--- a/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs
+++ b/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
Project {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs b/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs
index 5749480cc..a5705a865 100644
--- a/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs
+++ b/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs
@@ -1,3 +1,5 @@
+import qbs.Host
+
Project {
LoadableModule {
Depends { name: "cpp" }
@@ -16,7 +18,7 @@ Project {
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs b/tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs
index 856642689..b3fa86d32 100644
--- a/tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs
+++ b/tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/makefile-generator/app.qbs b/tests/auto/blackbox/testdata/makefile-generator/app.qbs
index 2f53c4808..367f484cf 100644
--- a/tests/auto/blackbox/testdata/makefile-generator/app.qbs
+++ b/tests/auto/blackbox/testdata/makefile-generator/app.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs
index 8ae787b9a..a94b7a80e 100644
--- a/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs
+++ b/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs
@@ -1,9 +1,11 @@
// just to make sure three-digit minimum versions work on macOS
// this only affects the value of __MAC_OS_X_VERSION_MIN_REQUIRED,
// not the actual LC_VERSION_MIN_MACOSX command which is limited to two
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && qbs.targetOS.contains("macos");
diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs
index 8099d79b9..4dca16df0 100644
--- a/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs
+++ b/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs
@@ -3,9 +3,11 @@ import qbs.Utilities
// a specific version of the operating systems is specified
// when the application is run its output should confirm
// that the given values took effect
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && qbs.targetOS.contains("windows") || qbs.targetOS.contains("macos");
diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs
index c0b70a0b2..36756137e 100644
--- a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs
+++ b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs
@@ -2,9 +2,11 @@ import qbs.Utilities
// no minimum versions are specified, and explicitly set to undefined in
// case the profile has set it
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs
index a27ffcd28..1440925f3 100644
--- a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs
+++ b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs
@@ -1,9 +1,11 @@
import qbs.Utilities
// no minimum versions are specified so the profile defaults will be used
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/module-providers/module-providers.qbs b/tests/auto/blackbox/testdata/module-providers/module-providers.qbs
index 781a3ca03..e83c80bb1 100644
--- a/tests/auto/blackbox/testdata/module-providers/module-providers.qbs
+++ b/tests/auto/blackbox/testdata/module-providers/module-providers.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
Project {
property bool enabled: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs b/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs
index 7f620f310..1ec51c354 100644
--- a/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs
+++ b/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs
@@ -1,9 +1,11 @@
+import qbs.Host
+
Project {
CppApplication {
name: "tool"
consoleApplication: true
property bool _testPlatform: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/nodejs/hello.qbs b/tests/auto/blackbox/testdata/nodejs/hello.qbs
index d7c545922..849a8789f 100644
--- a/tests/auto/blackbox/testdata/nodejs/hello.qbs
+++ b/tests/auto/blackbox/testdata/nodejs/hello.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
NodeJSApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs b/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs
index 3ee443438..37b5b3778 100644
--- a/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs
+++ b/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
Product {
name: "the-product"
@@ -21,7 +22,7 @@ Product {
prepare: {
var binary;
var prefixArgs;
- if (product.qbs.hostOS.contains("windows")) {
+ if (Host.os().contains("windows")) {
binary = product.qbs.windowsShellPath;
prefixArgs = ["/c", "type"];
} else {
diff --git a/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs b/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs
index c619b33ef..30b7f4ace 100644
--- a/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs
+++ b/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs
@@ -1,10 +1,12 @@
+import qbs.Host
+
Project {
CppApplication {
name: "myapp"
files: ["main.cpp"]
Depends {
name: "plugin1" // not to be linked
- cpp.link: qbs.hostOS === undefined
+ cpp.link: Host.os() === undefined
}
Depends { name: "plugin2" } // not to be linked
Depends {
diff --git a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
index 3330b8263..1587940a2 100644
--- a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
+++ b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs b/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs
index af7e6ced6..501675c15 100644
--- a/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs
+++ b/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
StaticLibrary {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasProtobuf;
diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs
index 8e8735b69..cf63eb17f 100644
--- a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs
+++ b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasProtobuf;
diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs
index 61a44fc0f..ccb724ef5 100644
--- a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs
+++ b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasProtobuf;
diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs
index 95b03d7d7..7f0b999aa 100644
--- a/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs
+++ b/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasProtobuf;
diff --git a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs
index 9938fcdd4..967bf2bb8 100644
--- a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs
+++ b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
StaticLibrary {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasProtobuf;
diff --git a/tests/auto/blackbox/testdata/protobuf/import.qbs b/tests/auto/blackbox/testdata/protobuf/import.qbs
index d7ae5e1a2..41669020d 100644
--- a/tests/auto/blackbox/testdata/protobuf/import.qbs
+++ b/tests/auto/blackbox/testdata/protobuf/import.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasProtobuf;
diff --git a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs
index 80a9d9a88..143e9c20f 100644
--- a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs
+++ b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result && hasProtobuf;
diff --git a/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs b/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs
index a6b97bad2..040e12b3a 100644
--- a/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs
+++ b/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs
@@ -1,4 +1,5 @@
import "MyStaticLib.qbs" as MyStaticLib
+import qbs.Host
Project {
property bool removeDuplicates
@@ -6,7 +7,7 @@ Project {
property bool dummy: {
// most BSD systems (including macOS) use LLVM linker now
console.info("is bfd linker: "
- + (qbs.toolchain.contains("gcc") && !qbs.hostOS.contains("bsd")))
+ + (qbs.toolchain.contains("gcc") && !Host.os().contains("bsd")))
}
qbsSearchPaths: "."
diff --git a/tests/auto/blackbox/testdata/response-files/response-files.qbs b/tests/auto/blackbox/testdata/response-files/response-files.qbs
index 168cdf66a..9158a85fa 100644
--- a/tests/auto/blackbox/testdata/response-files/response-files.qbs
+++ b/tests/auto/blackbox/testdata/response-files/response-files.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
import qbs.TextFile
Project {
@@ -9,7 +10,7 @@ Project {
}
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/setup-run-environment/setup-run-environment.qbs b/tests/auto/blackbox/testdata/setup-run-environment/setup-run-environment.qbs
index 5c5100b29..02f5ec7b1 100644
--- a/tests/auto/blackbox/testdata/setup-run-environment/setup-run-environment.qbs
+++ b/tests/auto/blackbox/testdata/setup-run-environment/setup-run-environment.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
Project {
DynamicLibrary { // Product dependency, installed
@@ -64,7 +65,7 @@ Project {
// Testing shows that clang (8.0) does not find dynamic libraries via
// the -L<dir> and -l<libname> mechanism unless the name is "lib<libname>.a".
Properties {
- condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("clang")
+ condition: Host.os().contains("windows") && qbs.toolchain.contains("clang")
cpp.dynamicLibraryPrefix: "lib"
cpp.dynamicLibraryImportSuffix: ".a"
}
@@ -91,7 +92,7 @@ Project {
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs b/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs
index 63789a182..086a9455b 100644
--- a/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs
+++ b/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs
@@ -1,4 +1,5 @@
import qbs.FileInfo
+import qbs.Host
Project {
property bool shouldInstallLibrary: true
@@ -6,7 +7,7 @@ Project {
Application {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/trackAddFile/after/trackAddFile.qbs b/tests/auto/blackbox/testdata/trackAddFile/after/trackAddFile.qbs
index 113f44316..4d454d4ff 100644
--- a/tests/auto/blackbox/testdata/trackAddFile/after/trackAddFile.qbs
+++ b/tests/auto/blackbox/testdata/trackAddFile/after/trackAddFile.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/trackAddFile/before/trackAddFile.qbs b/tests/auto/blackbox/testdata/trackAddFile/before/trackAddFile.qbs
index 74efdf8f7..fd858b247 100644
--- a/tests/auto/blackbox/testdata/trackAddFile/before/trackAddFile.qbs
+++ b/tests/auto/blackbox/testdata/trackAddFile/before/trackAddFile.qbs
@@ -1,7 +1,9 @@
+import qbs.Host
+
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/trackFileTags/after/trackFileTags.qbs b/tests/auto/blackbox/testdata/trackFileTags/after/trackFileTags.qbs
index 1d589978a..1c5b6b56f 100644
--- a/tests/auto/blackbox/testdata/trackFileTags/after/trackFileTags.qbs
+++ b/tests/auto/blackbox/testdata/trackFileTags/after/trackFileTags.qbs
@@ -1,9 +1,11 @@
import qbs.TextFile
+import qbs.Host
+
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/trackFileTags/before/trackFileTags.qbs b/tests/auto/blackbox/testdata/trackFileTags/before/trackFileTags.qbs
index 4c9e77dd8..86771ab8f 100644
--- a/tests/auto/blackbox/testdata/trackFileTags/before/trackFileTags.qbs
+++ b/tests/auto/blackbox/testdata/trackFileTags/before/trackFileTags.qbs
@@ -1,9 +1,11 @@
import qbs.TextFile
+import qbs.Host
+
Project {
Product {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/blackbox/testdata/vcs/vcstest.qbs b/tests/auto/blackbox/testdata/vcs/vcstest.qbs
index dabe889b6..4f861654b 100644
--- a/tests/auto/blackbox/testdata/vcs/vcstest.qbs
+++ b/tests/auto/blackbox/testdata/vcs/vcstest.qbs
@@ -1,6 +1,8 @@
+import qbs.Host
+
CppApplication {
condition: {
- var result = qbs.targetPlatform === qbs.hostPlatform;
+ var result = qbs.targetPlatform === Host.platform();
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
diff --git a/tests/auto/language/testdata/getNativeSetting.qbs b/tests/auto/language/testdata/getNativeSetting.qbs
index 975aefebc..c8126bb10 100644
--- a/tests/auto/language/testdata/getNativeSetting.qbs
+++ b/tests/auto/language/testdata/getNativeSetting.qbs
@@ -1,13 +1,15 @@
import qbs.FileInfo
import qbs.Utilities
+import qbs.Host
+
Project {
Product {
name: "p1"
targetName: {
- if (qbs.hostOS.contains("macos")) {
+ if (Host.os().contains("macos")) {
return Utilities.getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductName");
- } else if (qbs.hostOS.contains("windows")) {
+ } else if (Host.os().contains("windows")) {
var productName = Utilities.getNativeSetting("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion", "ProductName");
if (productName.contains("Windows")) {
return "Windows";