diff options
Diffstat (limited to 'tests/auto/blackbox/testdata')
153 files changed, 606 insertions, 652 deletions
diff --git a/tests/auto/blackbox/testdata/assembly/assembly.qbs b/tests/auto/blackbox/testdata/assembly/assembly.qbs index f7bd4ecad..9d5584af5 100644 --- a/tests/auto/blackbox/testdata/assembly/assembly.qbs +++ b/tests/auto/blackbox/testdata/assembly/assembly.qbs @@ -30,9 +30,9 @@ Project { name : "testa" files : [ "testa.s" ] Depends { name: "cpp" } - condition: qbs.toolchain.contains("gcc") + condition: qbs.toolchain.includes("gcc") Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } @@ -40,9 +40,9 @@ Project { name : "testb" files : [ "testb.S" ] Depends { name: "cpp" } - condition: qbs.toolchain.contains("gcc") + condition: qbs.toolchain.includes("gcc") Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } @@ -50,9 +50,9 @@ Project { name : "testc" files : [ "testc.sx" ] Depends { name: "cpp" } - condition: qbs.toolchain.contains("gcc") + condition: qbs.toolchain.includes("gcc") Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } @@ -63,10 +63,10 @@ Project { files: ["testd_" + qbs.architecture + ".asm"] } Depends { name: "cpp" } - condition: qbs.toolchain.contains("msvc") + condition: qbs.toolchain.includes("msvc") && (qbs.architecture === "x86" || qbs.architecture === "x86_64") Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } diff --git a/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs b/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs index 08de04fc7..b6094ed22 100644 --- a/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs +++ b/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs @@ -14,7 +14,7 @@ Project { cpp.cxxLanguageVersion: "c++11" cpp.minimumOsxVersion: "10.8" // For <chrono> Properties { - condition: qbs.toolchain.contains("gcc") + condition: qbs.toolchain.includes("gcc") cpp.driverFlags: "-pthread" } files: "test-main.cpp" @@ -22,7 +22,7 @@ Project { AutotestRunner { Depends { name: "cpp" // Make sure build environment is set up properly. - condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc") + condition: Host.os().includes("windows") && qbs.toolchain.includes("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 8f4634368..bea74796a 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 @@ -30,7 +30,7 @@ Project { AutotestRunner { Depends { name: "cpp" // Make sure build environment is set up properly. - condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc") + condition: Host.os().includes("windows") && qbs.toolchain.includes("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 dc27d8288..cfb7fc560 100644 --- a/tests/auto/blackbox/testdata/autotests/autotests.qbs +++ b/tests/auto/blackbox/testdata/autotests/autotests.qbs @@ -11,7 +11,7 @@ Project { } Depends { name: "cpp" // Make sure build environment is set up properly. - condition: Host.os().contains("windows") && qbs.toolchain.contains("gcc") + condition: Host.os().includes("windows") && qbs.toolchain.includes("gcc") } } } diff --git a/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs b/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs index 6c0bcc73e..54005e76a 100644 --- a/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs +++ b/tests/auto/blackbox/testdata/buildenv-change/buildenv-change.qbs @@ -3,7 +3,7 @@ CppApplication { id: dummy property stringList toolchain: qbs.toolchain configure: { - if (toolchain.contains("msvc")) + if (toolchain.includes("msvc")) console.info("msvc"); } } diff --git a/tests/auto/blackbox/testdata/change-tracking-and-multiplexing/change-tracking-and-multiplexing.qbs b/tests/auto/blackbox/testdata/change-tracking-and-multiplexing/change-tracking-and-multiplexing.qbs index d1215355c..096778cd3 100644 --- a/tests/auto/blackbox/testdata/change-tracking-and-multiplexing/change-tracking-and-multiplexing.qbs +++ b/tests/auto/blackbox/testdata/change-tracking-and-multiplexing/change-tracking-and-multiplexing.qbs @@ -1,8 +1,8 @@ StaticLibrary { name: "l" - Depends { condition: qbs.targetOS.contains("darwin"); name: "bundle" } - Properties { condition: qbs.targetOS.contains("darwin"); bundle.isBundle: false } + Depends { condition: qbs.targetOS.includes("darwin"); name: "bundle" } + Properties { condition: qbs.targetOS.includes("darwin"); bundle.isBundle: false } multiplexByQbsProperties: ["buildVariants"] qbs.buildVariants: ["debug", "release"] diff --git a/tests/auto/blackbox/testdata/choose-module-instance/other-searchpath/modules/limerick/generic.qbs b/tests/auto/blackbox/testdata/choose-module-instance/other-searchpath/modules/limerick/generic.qbs index 2ebaaac11..bd8e901c7 100644 --- a/tests/auto/blackbox/testdata/choose-module-instance/other-searchpath/modules/limerick/generic.qbs +++ b/tests/auto/blackbox/testdata/choose-module-instance/other-searchpath/modules/limerick/generic.qbs @@ -1,3 +1,3 @@ Module { - condition: !qbs.targetOS.contains("Beatles") + condition: !qbs.targetOS.includes("Beatles") } diff --git a/tests/auto/blackbox/testdata/clean/clean.qbs b/tests/auto/blackbox/testdata/clean/clean.qbs index ce3a8eb12..10eca2d41 100644 --- a/tests/auto/blackbox/testdata/clean/clean.qbs +++ b/tests/auto/blackbox/testdata/clean/clean.qbs @@ -5,7 +5,7 @@ Project { name: "dep" files: "dep.cpp" Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } diff --git a/tests/auto/blackbox/testdata/cli/dotnettest.qbs b/tests/auto/blackbox/testdata/cli/dotnettest.qbs index 9a10b8068..5685be8c4 100644 --- a/tests/auto/blackbox/testdata/cli/dotnettest.qbs +++ b/tests/auto/blackbox/testdata/cli/dotnettest.qbs @@ -1,7 +1,7 @@ Project { Application { Depends { name: "cli" } - Depends { name: "HelloWorldModule"; condition: !qbs.toolchain.contains("mono") } + Depends { name: "HelloWorldModule"; condition: !qbs.toolchain.includes("mono") } Depends { name: "NetLib" } type: "application" @@ -16,7 +16,7 @@ Project { // Mono's VB compiler doesn't support modules yet, and if we try with C#, it crashes anyways NetModule { - condition: !qbs.toolchain.contains("mono") + condition: !qbs.toolchain.includes("mono") Depends { name: "cli" } name: "HelloWorldModule" @@ -37,7 +37,7 @@ Project { // fill-in for missing NetModule Group { - condition: qbs.toolchain.contains("mono") + condition: qbs.toolchain.includes("mono") files: ["Module.cs"] } diff --git a/tests/auto/blackbox/testdata/command-file/command-file.qbs b/tests/auto/blackbox/testdata/command-file/command-file.qbs index 8e25221c5..87dd0e054 100644 --- a/tests/auto/blackbox/testdata/command-file/command-file.qbs +++ b/tests/auto/blackbox/testdata/command-file/command-file.qbs @@ -4,7 +4,7 @@ Project { destinationDirectory: project.buildDirectory Depends { name: "cpp" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } files: ["lib.cpp"] @@ -14,6 +14,6 @@ Project { cpp.libraryPaths: project.buildDirectory files: ["main.cpp"] cpp.staticLibraries: ['@' + sourceDirectory + '/' - + (qbs.toolchain.contains("msvc") ? "list.msvc" : "list.gcc")] + + (qbs.toolchain.includes("msvc") ? "list.msvc" : "list.gcc")] } } diff --git a/tests/auto/blackbox/testdata/compilerDefinesByLanguage/CppDefinesApp.qbs b/tests/auto/blackbox/testdata/compilerDefinesByLanguage/CppDefinesApp.qbs index b205ef2a7..f2da212f6 100644 --- a/tests/auto/blackbox/testdata/compilerDefinesByLanguage/CppDefinesApp.qbs +++ b/tests/auto/blackbox/testdata/compilerDefinesByLanguage/CppDefinesApp.qbs @@ -1,7 +1,7 @@ CppApplication { files: ["app.c"] - property bool enableObjectiveC: qbs.targetOS.contains("darwin") + property bool enableObjectiveC: qbs.targetOS.includes("darwin") Group { name: "C/C++" diff --git a/tests/auto/blackbox/testdata/concurrent-executor/concurrent-executor.qbs b/tests/auto/blackbox/testdata/concurrent-executor/concurrent-executor.qbs deleted file mode 100644 index 802aa1450..000000000 --- a/tests/auto/blackbox/testdata/concurrent-executor/concurrent-executor.qbs +++ /dev/null @@ -1,67 +0,0 @@ -import qbs.File -import qbs.TextFile -import "util.js" as Utils - -Product { - type: ["final1", "final2"] - Group { - files: ["dummy1.input"] - fileTags: ["input1"] - } - Group { - files: ["dummy2.input"] - fileTags: ["input2"] - } - Rule { - inputs: ["input1"] - Artifact { - filePath: project.buildDirectory + "/dummy1.final" - fileTags: ["final1"] - } - prepare: { - var cmds = []; - for (var i = 0; i < 10; ++i) { - var cmd = new JavaScriptCommand(); - cmd.silent = true; - cmd.createFile = i == 9; - cmd.sourceCode = function() { - if (createFile) { - console.info("Creating file"); - var file = new TextFile(output.filePath, TextFile.WriteOnly); - file.close(); - } - }; - cmds.push(cmd); - } - return cmds; - } - } - Rule { - inputs: ["input2"] - Artifact { - filePath: "dummy.intermediate" - fileTags: ["intermediate"] - } - prepare: { - var cmd = new JavaScriptCommand(); - cmd.silent = true; - cmd.sourceCode = function() { }; - return [cmd]; - } - } - Rule { - inputs: ["intermediate"] - outputFileTags: "final2" - prepare: { - do - Utils.sleep(6000); - while (!File.exists(project.buildDirectory + "/dummy1.final")); - var cmd = new JavaScriptCommand(); - cmd.silent = true; - cmd.sourceCode = function() { }; - return [cmd]; - } - } -} - - diff --git a/tests/auto/blackbox/testdata/concurrent-executor/util.js b/tests/auto/blackbox/testdata/concurrent-executor/util.js deleted file mode 100644 index a37a8cbb1..000000000 --- a/tests/auto/blackbox/testdata/concurrent-executor/util.js +++ /dev/null @@ -1,8 +0,0 @@ -function sleep(timeInMs) -{ - var referenceTime = new Date(); - var time = null; - do { - time = new Date(); - } while (time - referenceTime < timeInMs); -} diff --git a/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs b/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs index 1d647faa2..6a1dbe67d 100644 --- a/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs +++ b/tests/auto/blackbox/testdata/configure/modules/definition/module.qbs @@ -12,7 +12,7 @@ Module { var cmd; var args; var p = path; - if (targetOS.contains("windows")) { + if (targetOS.includes("windows")) { cmd = windowsShellPath; args = ["/c", "date", "/t"]; } else { diff --git a/tests/auto/blackbox/testdata/conflicting-property-values/conflicting-property-values.qbs b/tests/auto/blackbox/testdata/conflicting-property-values/conflicting-property-values.qbs new file mode 100644 index 000000000..23b6ee5a3 --- /dev/null +++ b/tests/auto/blackbox/testdata/conflicting-property-values/conflicting-property-values.qbs @@ -0,0 +1,41 @@ +Project { + Product { + name: "low" + Export { property string prop: "low"; property string prop2: "low" } + } + Product { + name: "higher1" + Export { Depends { name: "low" } low.prop: "higher1" } + } + Product { + name: "higher2" + Export { Depends { name: "low" } low.prop: "higher2" } + } + Product { + name: "highest1" + Export { + Depends { name: "low" } + Depends { name: "higher1" } + Depends { name: "higher2" } + low.prop: "highest1" + low.prop2: "highest" + } + } + Product { + name: "highest2" + Export { + Depends { name: "low" } + Depends { name: "higher1" } + Depends { name: "higher2" } + low.prop: "highest2" + low.prop2: "highest" + } + } + Product { + name: "toplevel" + Depends { name: "highest1" } + Depends { name: "highest2" } + low.prop: name + property bool dummy: { console.info("final prop value: " + low.prop); } + } +} diff --git a/tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs b/tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs index 0bfdaceba..36e805516 100644 --- a/tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs +++ b/tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs @@ -8,7 +8,7 @@ CppApplication { property bool dummy: { console.info("is x86: " + (qbs.architecture === "x86")); console.info("is x64: " + (qbs.architecture === "x86_64")); - console.info("is gcc: " + qbs.toolchain.contains("gcc")); - console.info("is msvc: " + qbs.toolchain.contains("msvc")); + console.info("is gcc: " + qbs.toolchain.includes("gcc")); + console.info("is msvc: " + qbs.toolchain.includes("msvc")); } } diff --git a/tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs b/tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs index 322ded85c..24c37951c 100644 --- a/tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs +++ b/tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs @@ -13,10 +13,10 @@ CppApplication { var isEvenNewerMsvc; var isOlderMsvc; var isGcc; - if (toolchain.contains("clang-cl")) { + if (toolchain.includes("clang-cl")) { isEvenNewerMsvc = true; isNewerMsvc = true; - } else if (toolchain.contains("msvc")) { + } else if (toolchain.includes("msvc")) { if (compilerVersion >= "19.12.25831") isEvenNewerMsvc = true; if (compilerVersion >= "18.00.30723") diff --git a/tests/auto/blackbox/testdata/date-property/date-property.qbs b/tests/auto/blackbox/testdata/date-property/date-property.qbs new file mode 100644 index 000000000..ffd584802 --- /dev/null +++ b/tests/auto/blackbox/testdata/date-property/date-property.qbs @@ -0,0 +1,18 @@ +Product { + type: "date" + property var theDate: new Date(1999, 11, 31); + Rule { + multiplex: true + Artifact { filePath: "dummy"; fileTags: "date" } + prepare: { + var cmd = new JavaScriptCommand; + cmd.silent = true; + cmd.sourceCode = function() { + var d = product.theDate; + console.info("The stored date was " + d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + + d.getDate()); + }; + return cmd; + } + } +} diff --git a/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs b/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs index e3dacffea..7d1550312 100644 --- a/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs +++ b/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs @@ -1,8 +1,6 @@ -import qbs // FIXME: Don't remove this import because then the test fails! - Product { Depends { name: "themodule" } themodule.newProp: true - themodule.oldProp: false + themodule.expiringProp: false themodule.veryOldProp: false } diff --git a/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs b/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs index cd6b0b70c..58164e918 100644 --- a/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs +++ b/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs @@ -1,8 +1,8 @@ -import qbs // FIXME: Don't remove this import because then the test fails! +import qbs.Environment Module { property bool newProp - property bool oldProp + property bool expiringProp property bool forgottenProp PropertyOptions { @@ -10,9 +10,9 @@ Module { description: "Use this, it's good!" } PropertyOptions { - name: "oldProp" + name: "expiringProp" description: "Use newProp instead." - removalVersion: "99.9" + removalVersion: Environment.getEnv("REMOVAL_VERSION") } PropertyOptions { name: "veryOldProp" diff --git a/tests/auto/blackbox/testdata/discard-unused-data/discard-unused-data.qbs b/tests/auto/blackbox/testdata/discard-unused-data/discard-unused-data.qbs index fdd3aa1f7..367bb665c 100644 --- a/tests/auto/blackbox/testdata/discard-unused-data/discard-unused-data.qbs +++ b/tests/auto/blackbox/testdata/discard-unused-data/discard-unused-data.qbs @@ -4,9 +4,9 @@ CppApplication { files: "main.cpp" - Depends { name: "bundle"; condition: qbs.targetOS.contains("darwin") } + Depends { name: "bundle"; condition: qbs.targetOS.includes("darwin") } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } @@ -17,7 +17,7 @@ CppApplication { var cmd = new JavaScriptCommand(); cmd.silent = true; cmd.sourceCode = function() { - console.info("is Darwin: " + product.qbs.targetOS.contains("darwin")); + console.info("is Darwin: " + product.qbs.targetOS.includes("darwin")); console.info("---" + product.cpp.nmPath + "---"); } return [cmd]; diff --git a/tests/auto/blackbox/testdata/dot-dot-pc-file/dot-dot-pc-file.qbs b/tests/auto/blackbox/testdata/dot-dot-pc-file/dot-dot-pc-file.qbs new file mode 100644 index 000000000..60c4ea2bc --- /dev/null +++ b/tests/auto/blackbox/testdata/dot-dot-pc-file/dot-dot-pc-file.qbs @@ -0,0 +1,7 @@ +CppApplication { + name: "p" + Depends { name: "qbs-metatest-module"; } + files: "main.cpp" + moduleProviders.qbspkgconfig.libDirs: "libdir" + qbsModuleProviders: "qbspkgconfig" +} diff --git a/tests/auto/blackbox/testdata/fallback-module-provider/libdir/qbsmetatestmodule.pc b/tests/auto/blackbox/testdata/dot-dot-pc-file/libdir/qbs.metatest.module.pc index ae4daba89..c00fd26d6 100644 --- a/tests/auto/blackbox/testdata/fallback-module-provider/libdir/qbsmetatestmodule.pc +++ b/tests/auto/blackbox/testdata/dot-dot-pc-file/libdir/qbs.metatest.module.pc @@ -1,4 +1,4 @@ -Name: qbsmetatestmodule +Name: qbs.metatest.module Description: just a test Version: 0.0.1 diff --git a/tests/auto/blackbox/testdata/fallback-module-provider/main.cpp b/tests/auto/blackbox/testdata/dot-dot-pc-file/main.cpp index 442b755bf..442b755bf 100644 --- a/tests/auto/blackbox/testdata/fallback-module-provider/main.cpp +++ b/tests/auto/blackbox/testdata/dot-dot-pc-file/main.cpp diff --git a/tests/auto/blackbox/testdata/driver-linker-flags/driver-linker-flags.qbs b/tests/auto/blackbox/testdata/driver-linker-flags/driver-linker-flags.qbs index 5de0fe053..57f096494 100644 --- a/tests/auto/blackbox/testdata/driver-linker-flags/driver-linker-flags.qbs +++ b/tests/auto/blackbox/testdata/driver-linker-flags/driver-linker-flags.qbs @@ -8,7 +8,7 @@ CppApplication { Probe { id: toolchainProbe - condition: qbs.toolchain.contains("gcc") + condition: qbs.toolchain.includes("gcc") configure: { console.info("toolchain is GCC-like"); found = true; diff --git a/tests/auto/blackbox/testdata/dynamic-library-in-module/Dll.qbs b/tests/auto/blackbox/testdata/dynamic-library-in-module/Dll.qbs index 1acf606dc..c95d88052 100644 --- a/tests/auto/blackbox/testdata/dynamic-library-in-module/Dll.qbs +++ b/tests/auto/blackbox/testdata/dynamic-library-in-module/Dll.qbs @@ -1,8 +1,8 @@ DynamicLibrary { Depends { name: "cpp" } - Depends { name: "bundle"; condition: qbs.targetOS.contains("darwin") } + Depends { name: "bundle"; condition: qbs.targetOS.includes("darwin") } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false cpp.minimumMacosVersion: "10.7" // For -rpath } diff --git a/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/thelib/thelib.qbs b/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/thelib/thelib.qbs index 30f87337d..3059fa5e9 100644 --- a/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/thelib/thelib.qbs +++ b/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/thelib/thelib.qbs @@ -13,7 +13,7 @@ Module { } Group { name: "thelib dll import" - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.includes("windows") files: FileInfo.joinPaths(product.thelib.baseDir, "thelib.lib") fileTags: ["dynamiclibrary_import"] filesAreTargets: true diff --git a/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/theotherlib/theotherlib.qbs b/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/theotherlib/theotherlib.qbs index 1eb1e01a5..f387feb80 100644 --- a/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/theotherlib/theotherlib.qbs +++ b/tests/auto/blackbox/testdata/dynamic-library-in-module/modules/theotherlib/theotherlib.qbs @@ -13,7 +13,7 @@ Module { } Group { name: "theotherlib dll import" - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.includes("windows") files: FileInfo.joinPaths(product.theotherlib.baseDir, "theotherlib.lib") fileTags: ["dynamiclibrary_import"] filesAreTargets: true diff --git a/tests/auto/blackbox/testdata/enableExceptions/exceptions.qbs b/tests/auto/blackbox/testdata/enableExceptions/exceptions.qbs index 9a75043a8..e1d09f7e0 100644 --- a/tests/auto/blackbox/testdata/enableExceptions/exceptions.qbs +++ b/tests/auto/blackbox/testdata/enableExceptions/exceptions.qbs @@ -1,5 +1,5 @@ CppApplication { files: ["main.cpp"] cpp.treatWarningsAsErrors: true - cpp.defines: qbs.toolchain.contains("msvc") && !cpp.enableExceptions ? ["FORCE_FAIL_VS"] : [] + cpp.defines: qbs.toolchain.includes("msvc") && !cpp.enableExceptions ? ["FORCE_FAIL_VS"] : [] } diff --git a/tests/auto/blackbox/testdata/enableExceptions/none.qbs b/tests/auto/blackbox/testdata/enableExceptions/none.qbs index 8fb052476..439ea3037 100644 --- a/tests/auto/blackbox/testdata/enableExceptions/none.qbs +++ b/tests/auto/blackbox/testdata/enableExceptions/none.qbs @@ -2,7 +2,7 @@ CppApplication { files: ["emptymain.cpp"] Group { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") files: ["empty.m", "empty.mm"] } } diff --git a/tests/auto/blackbox/testdata/escaped-linker-flags/escaped-linker-flags.qbs b/tests/auto/blackbox/testdata/escaped-linker-flags/escaped-linker-flags.qbs index f48bf8d1f..b4fb0df4d 100644 --- a/tests/auto/blackbox/testdata/escaped-linker-flags/escaped-linker-flags.qbs +++ b/tests/auto/blackbox/testdata/escaped-linker-flags/escaped-linker-flags.qbs @@ -10,4 +10,9 @@ CppApplication { cpp.linkerFlags: ["-s"] } files: ["main.cpp"] + Probe { + id: checker + property bool isUnixGcc: qbs.toolchain.contains("gcc") && !qbs.targetOS.contains("macos") + configure: { console.info("is gcc: " + isUnixGcc); } + } } diff --git a/tests/auto/blackbox/testdata/exports-cmake/Foo.cpp b/tests/auto/blackbox/testdata/exports-cmake/Foo.cpp new file mode 100644 index 000000000..ea334f9af --- /dev/null +++ b/tests/auto/blackbox/testdata/exports-cmake/Foo.cpp @@ -0,0 +1,5 @@ +#include "Foo.h" +int someFooWork() +{ + return 42; +} diff --git a/tests/auto/blackbox/testdata/exports-cmake/Foo.h b/tests/auto/blackbox/testdata/exports-cmake/Foo.h new file mode 100644 index 000000000..2f279f577 --- /dev/null +++ b/tests/auto/blackbox/testdata/exports-cmake/Foo.h @@ -0,0 +1,16 @@ +#ifndef FOO_H +#define FOO_H +#include <dllexport.h> + +#ifdef FOO_LIB_STATIC +#define FOO_LIB_EXPORT +#else +#ifdef FOO_LIB +#define FOO_LIB_EXPORT DLL_EXPORT +#else +#define FOO_LIB_EXPORT DLL_IMPORT +#endif +#endif + +FOO_LIB_EXPORT int someFooWork(); +#endif // FOO_H diff --git a/tests/auto/blackbox/testdata/exports-cmake/cmake/CMakeLists.txt b/tests/auto/blackbox/testdata/exports-cmake/cmake/CMakeLists.txt new file mode 100644 index 000000000..d874e0e92 --- /dev/null +++ b/tests/auto/blackbox/testdata/exports-cmake/cmake/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.10) + +project(qbs_import) + +find_package(Bar PATHS REQUIRED) +add_executable(Consumer main.cpp) +target_link_libraries(Consumer Bar) diff --git a/tests/auto/blackbox/testdata/exports-cmake/cmake/main.cpp b/tests/auto/blackbox/testdata/exports-cmake/cmake/main.cpp new file mode 100644 index 000000000..1a1fa90ec --- /dev/null +++ b/tests/auto/blackbox/testdata/exports-cmake/cmake/main.cpp @@ -0,0 +1,6 @@ +#include <Foo.h> + +int main() +{ + return someFooWork(); +} diff --git a/tests/auto/blackbox/testdata/exports-cmake/exports-cmake.qbs b/tests/auto/blackbox/testdata/exports-cmake/exports-cmake.qbs new file mode 100644 index 000000000..6464af705 --- /dev/null +++ b/tests/auto/blackbox/testdata/exports-cmake/exports-cmake.qbs @@ -0,0 +1,70 @@ +import qbs.FileInfo + +Project { + property bool isStatic: false + property bool isBundle: false + + property string headersInstallDir: "include" + + Product { + name: "DllExport" + Depends { name: "Exporter.cmake" } + Group { + name: "API headers" + files: ["../dllexport.h"] + qbs.install: true + qbs.installDir: project.headersInstallDir + } + Group { + fileTagsFilter: ["Exporter.cmake.package"] + qbs.install: true + qbs.installDir: "/lib/cmake/DllExport" + } + Export { + Depends { name: "cpp" } + cpp.includePaths: FileInfo.joinPaths( + exportingProduct.qbs.installRoot, + exportingProduct.qbs.installPrefix, + project.headersInstallDir) + } + } + + Library { + type: project.isStatic ? "staticlibrary" : "dynamiclibrary" + Depends { name: "cpp" } + Depends { name: "DllExport" } + Depends { name: "Exporter.cmake" } + Exporter.cmake.packageName: "Bar" + name: "Foo" + files: ["Foo.cpp"] + version: "1.2.3" + cpp.includePaths: "." + cpp.defines: "FOO_LIB" + Group { + name: "API headers" + files: ["Foo.h"] + qbs.install: true + qbs.installDir: project.headersInstallDir + } + install: true + installImportLib: true + Group { + fileTagsFilter: ["Exporter.cmake.package"] + qbs.install: true + qbs.installDir: "/lib/cmake/Bar" + } + Export { + Depends { name: "cpp" } + cpp.includePaths: FileInfo.joinPaths( + exportingProduct.qbs.installRoot, + exportingProduct.qbs.installPrefix, + project.headersInstallDir) + cpp.defines: ["FOO=1"].concat(project.isStatic ? ["FOO_LIB_STATIC"] : []) + cpp.commonCompilerFlags: "-DOTHER_DEF=1" + cpp.linkerFlags: exportingProduct.qbs.toolchain.contains("gcc") ? ["-s"] : [] + } + + Depends { name: 'bundle' } + bundle.isBundle: qbs.targetOS.includes("darwin") && project.isBundle + } +} diff --git a/tests/auto/blackbox/testdata/exports-cmake/find-cmake.qbs b/tests/auto/blackbox/testdata/exports-cmake/find-cmake.qbs new file mode 100644 index 000000000..52f388966 --- /dev/null +++ b/tests/auto/blackbox/testdata/exports-cmake/find-cmake.qbs @@ -0,0 +1,46 @@ +import qbs.Probes + +Product { + Depends { name: "cpp" } + + Probes.BinaryProbe { + id: cmakeProbe + names: "cmake" + } + + Probes.BinaryProbe { + id: ninjaProbe + names: ["ninja"] + } + + property bool test: { + var data = { + cmakeFound: cmakeProbe.found, + cmakeFilePath: cmakeProbe.filePath, + crossCompiling: qbs.targetPlatform !== qbs.hostPlatform, + installPrefix: qbs.installPrefix + }; + data.buildEnv = {} + Object.assign(data.buildEnv, cpp.buildEnv); // deep copy buildEnv from a probe + if (qbs.toolchain.includes("gcc")) { + data.buildEnv["CC"] = cpp.cCompilerName; + data.buildEnv["CXX"] = cpp.cxxCompilerName; + } else { + data.buildEnv["CC"] = cpp.compilerName; + data.buildEnv["CXX"] = cpp.compilerName; + } + + if (ninjaProbe.found) { + data.generator = "Ninja"; + } else { + if (qbs.toolchain.includes("msvc")) { + data.generator = "NMake Makefiles" + } else if (qbs.toolchain.includes("mingw")) { + data.generator = "MinGW Makefiles"; + } else if (qbs.toolchain.includes("gcc")) { + data.generator = "Unix Makefiles"; + } + } + console.info("---" + JSON.stringify(data) + "---"); + } +} diff --git a/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs index 94632053a..23331f93f 100644 --- a/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs +++ b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs @@ -43,7 +43,7 @@ Project { Depends { name: "Qt.core"; required: false } Depends { name: "helper1" } Depends { name: "helper3" } - property bool someCondition: Host.os().contains("windows") // hostOS for easier testing + property bool someCondition: Host.os().includes("windows") // hostOS for easier testing property bool someOtherCondition: someCondition Properties { condition: !someOtherCondition diff --git a/tests/auto/blackbox/testdata/exports-qbs/lib.qbs b/tests/auto/blackbox/testdata/exports-qbs/lib.qbs index 453dac562..01f89a221 100644 --- a/tests/auto/blackbox/testdata/exports-qbs/lib.qbs +++ b/tests/auto/blackbox/testdata/exports-qbs/lib.qbs @@ -16,7 +16,7 @@ DynamicLibrary { cpp.defines: ["MYLIB_BUILD"] cpp.variantSuffix: qbs.buildVariant === "debug" ? "d" : "" Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } files: ["mylib.cpp"] @@ -52,7 +52,7 @@ DynamicLibrary { condition: true prefixMapping: [{ prefix: includeDir, - replacement: FileInfo.joinPaths(qbs.installPrefix, exportingProduct.headersInstallDir) + replacement: FileInfo.joinPaths(exportingProduct.qbs.installPrefix, exportingProduct.headersInstallDir) }] } } diff --git a/tests/auto/blackbox/testdata/external-libs/external-libs.qbs b/tests/auto/blackbox/testdata/external-libs/external-libs.qbs index 619f40867..610df0507 100644 --- a/tests/auto/blackbox/testdata/external-libs/external-libs.qbs +++ b/tests/auto/blackbox/testdata/external-libs/external-libs.qbs @@ -7,7 +7,7 @@ Project { destinationDirectory: project.libDir Depends { name: "cpp" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } files: ["lib1.cpp"] @@ -18,7 +18,7 @@ Project { Depends { name: "cpp" } Depends { name: "lib1" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } files: ["lib2.cpp"] diff --git a/tests/auto/blackbox/testdata/fallback-module-provider/fallback-module-provider.qbs b/tests/auto/blackbox/testdata/fallback-module-provider/fallback-module-provider.qbs deleted file mode 100644 index a798e15b3..000000000 --- a/tests/auto/blackbox/testdata/fallback-module-provider/fallback-module-provider.qbs +++ /dev/null @@ -1,8 +0,0 @@ -CppApplication { - name: "p" - property bool fallbacksEnabled - Depends { name: "pkgconfig"; required: false } - Depends { name: "qbsmetatestmodule"; required: false; enableFallback: fallbacksEnabled } - property bool dummy: { console.info("pkg-config present: " + pkgconfig.present); } - files: "main.cpp" -} diff --git a/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs b/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs index b3519ba4c..1efe5c91c 100644 --- a/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs +++ b/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs @@ -10,7 +10,7 @@ Project { Depends { name: "freedesktop" } - freedesktop.name: "My App" + freedesktop.appName: "My App" freedesktop.desktopKeys: ({ 'Icon': "myapp.png" }) diff --git a/tests/auto/blackbox/testdata/generate-linker-map-file/generate-linker-map-file.qbs b/tests/auto/blackbox/testdata/generate-linker-map-file/generate-linker-map-file.qbs index 8c971a747..0d67fa54c 100644 --- a/tests/auto/blackbox/testdata/generate-linker-map-file/generate-linker-map-file.qbs +++ b/tests/auto/blackbox/testdata/generate-linker-map-file/generate-linker-map-file.qbs @@ -3,13 +3,13 @@ Project { name: "app-map" files: ["main.cpp"] // lld-link has different flag for map files, test it by switching to "lld" linkerVariant - Properties { condition: qbs.toolchain.contains("clang-cl"); cpp.linkerVariant: "lld" } + Properties { condition: qbs.toolchain.includes("clang-cl"); cpp.linkerVariant: "lld" } cpp.generateLinkerMapFile: true } CppApplication { name: "app-nomap" files: ["main.cpp"] - Properties { condition: qbs.toolchain.contains("clang-cl"); cpp.linkerVariant: "lld" } + Properties { condition: qbs.toolchain.includes("clang-cl"); cpp.linkerVariant: "lld" } cpp.generateLinkerMapFile: false } CppApplication { @@ -19,8 +19,8 @@ Project { Probe { id: toolchainProbe - property bool isUsed: qbs.toolchain.contains("msvc") - || qbs.toolchain.contains("gcc") + property bool isUsed: qbs.toolchain.includes("msvc") + || qbs.toolchain.includes("gcc") configure: { console.info("use test: " + isUsed); } diff --git a/tests/auto/blackbox/testdata/generator/generator.qbs b/tests/auto/blackbox/testdata/generator/generator.qbs index d0857beb5..9f6d452e7 100644 --- a/tests/auto/blackbox/testdata/generator/generator.qbs +++ b/tests/auto/blackbox/testdata/generator/generator.qbs @@ -18,12 +18,12 @@ CppApplication { var f = new TextFile(input.filePath, TextFile.ReadOnly); var content = f.readAll(); f.close(); - if (content.contains("file1")) { + if (content.includes("file1")) { f = new TextFile(outputs.file1[0].filePath, TextFile.WriteOnly); f.writeLine("void f1() {}"); f.close(); } - if (content.contains("file2")) { + if (content.includes("file2")) { f = new TextFile(outputs.file2[0].filePath, TextFile.WriteOnly); f.writeLine("void f2() {}"); f.close(); 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 1d1d2d54e..47275821f 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 @@ -14,6 +14,9 @@ Project { name: "helper3" required: false } + Depends { name: "helper7" } + helper7.fileName: "helper7.c" + type: ["diamond"] files: [ diff --git a/tests/auto/blackbox/testdata/groups-in-modules/imports/Helper7Base.qbs b/tests/auto/blackbox/testdata/groups-in-modules/imports/Helper7Base.qbs new file mode 100644 index 000000000..cc55e6351 --- /dev/null +++ b/tests/auto/blackbox/testdata/groups-in-modules/imports/Helper7Base.qbs @@ -0,0 +1,8 @@ +Module { + property string directory + property string fileName + Group { + prefix: directory + "/" + files: fileName + } +} diff --git a/tests/auto/blackbox/testdata/groups-in-modules/modules/helper7/helper7.c b/tests/auto/blackbox/testdata/groups-in-modules/modules/helper7/helper7.c new file mode 100644 index 000000000..a83f5476e --- /dev/null +++ b/tests/auto/blackbox/testdata/groups-in-modules/modules/helper7/helper7.c @@ -0,0 +1 @@ +void helper7(void) {} diff --git a/tests/auto/blackbox/testdata/groups-in-modules/modules/helper7/helper7.qbs b/tests/auto/blackbox/testdata/groups-in-modules/modules/helper7/helper7.qbs new file mode 100644 index 000000000..90e1f11e2 --- /dev/null +++ b/tests/auto/blackbox/testdata/groups-in-modules/modules/helper7/helper7.qbs @@ -0,0 +1,3 @@ +Helper7Base { + directory: path +} diff --git a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs index 6f5360ccb..e36ae47ca 100644 --- a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs +++ b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs @@ -11,11 +11,12 @@ CppApplication { } Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++11" - cpp.minimumMacosVersion: "10.8" + cpp.cxxLanguageVersion: "c++17" + cpp.minimumMacosVersion: "10.15" cpp.warningLevel: "none" Depends { name: "protobuf.cpp"; required: false } + Depends { name: "grpc++"; id: grpcpp; required: false } protobuf.cpp.useGrpc: true property bool hasDependencies: { diff --git a/tests/auto/blackbox/testdata/input-tags-change-tracking/input-tags-change-tracking.qbs b/tests/auto/blackbox/testdata/input-tags-change-tracking/input-tags-change-tracking.qbs index ef2c5c55b..1e4248009 100644 --- a/tests/auto/blackbox/testdata/input-tags-change-tracking/input-tags-change-tracking.qbs +++ b/tests/auto/blackbox/testdata/input-tags-change-tracking/input-tags-change-tracking.qbs @@ -43,10 +43,10 @@ Product { inputs: "txt" outputFileTags: "p_tag" outputArtifacts: { - if (input.fileTags.contains("empty")) + if (input.fileTags.includes("empty")) return []; return [{ - filePath: input.fileTags.contains("y") ? "y.out" : "x.out", + filePath: input.fileTags.includes("y") ? "y.out" : "x.out", fileTags: "p_tag" }] } diff --git a/tests/auto/blackbox/testdata/install-locations/install-locations.qbs b/tests/auto/blackbox/testdata/install-locations/install-locations.qbs index 994b4b146..ba51c0dc1 100644 --- a/tests/auto/blackbox/testdata/install-locations/install-locations.qbs +++ b/tests/auto/blackbox/testdata/install-locations/install-locations.qbs @@ -1,16 +1,16 @@ Project { property bool dummy: { - if (qbs.targetOS.contains("windows")) { + if (qbs.targetOS.includes("windows")) { console.info("is windows"); - } else if (qbs.targetOS.contains("darwin")) { + } else if (qbs.targetOS.includes("darwin")) { console.info("is darwin"); - if (qbs.targetOS.contains("macos")) + if (qbs.targetOS.includes("macos")) console.info("is mac"); } else { console.info("is unix"); } - if (qbs.toolchain.contains("mingw")) + if (qbs.toolchain.includes("mingw")) console.info("is mingw"); } CppApplication { diff --git a/tests/auto/blackbox/testdata/installpackage/installpackage.qbs b/tests/auto/blackbox/testdata/installpackage/installpackage.qbs index a0649a578..3396b79a4 100644 --- a/tests/auto/blackbox/testdata/installpackage/installpackage.qbs +++ b/tests/auto/blackbox/testdata/installpackage/installpackage.qbs @@ -2,7 +2,7 @@ Project { CppApplication { name: "public_tool" Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } Depends { name: "mylib" } @@ -20,7 +20,7 @@ Project { } DynamicLibrary { Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } Depends { name: "cpp" } diff --git a/tests/auto/blackbox/testdata/jsextensions-binaryfile/binaryfile.qbs b/tests/auto/blackbox/testdata/jsextensions-binaryfile/binaryfile.qbs index 1e7426744..5824fe518 100644 --- a/tests/auto/blackbox/testdata/jsextensions-binaryfile/binaryfile.qbs +++ b/tests/auto/blackbox/testdata/jsextensions-binaryfile/binaryfile.qbs @@ -36,6 +36,9 @@ Product { destination.write(source.atEof() ? [ 0xFF ] : [ 0x00 ]); source.close(); destination.close(); + source = new BinaryFile("destination.dat", BinaryFile.ReadOnly); + destination = new BinaryFile("destination2.dat", BinaryFile.WriteOnly); + destination.write(source.read(8)); }; commands.push(cmd); return commands; diff --git a/tests/auto/blackbox/testdata/jsextensions-file/file.qbs b/tests/auto/blackbox/testdata/jsextensions-file/file.qbs index 6adf714e2..7a47cf3cd 100644 --- a/tests/auto/blackbox/testdata/jsextensions-file/file.qbs +++ b/tests/auto/blackbox/testdata/jsextensions-file/file.qbs @@ -33,10 +33,10 @@ Product { if (!created || !File.exists(zePath)) throw new Error("zePath was not created."); var entries = File.directoryEntries(product.sourceDirectory, File.AllEntries | File.NoDotAndDotDot); - if (entries.length < 3 || !entries.contains("file.qbs")) + if (entries.length < 3 || !entries.includes("file.qbs")) throw new Error("Directory did not contain file.qbs"); entries = File.directoryEntries(product.sourceDirectory, File.Dirs | File.NoDotAndDotDot); - if (entries.length < 1 || !entries.contains("zePath")) + if (entries.length < 1 || !entries.includes("zePath")) throw new Error("Directory did not contain only zePath"); var moveSource = FileInfo.joinPaths(product.sourceDirectory, "tomove.txt"); var moveTarget = FileInfo.joinPaths(product.sourceDirectory, "moved.txt"); diff --git a/tests/auto/blackbox/testdata/jsextensions-process/process.qbs b/tests/auto/blackbox/testdata/jsextensions-process/process.qbs index fa184fa91..50f22cdfc 100644 --- a/tests/auto/blackbox/testdata/jsextensions-process/process.qbs +++ b/tests/auto/blackbox/testdata/jsextensions-process/process.qbs @@ -55,7 +55,7 @@ Project { // closeWriteChannel test process = new Process(); - if (Host.os().contains("windows")) + if (Host.os().includes("windows")) process.start(product.qbs.windowsShellPath, ["/C", product.qbs.windowsSystemRoot + "\\system32\\sort.exe"]); else @@ -76,7 +76,7 @@ Project { testReadlineFile.close(); process = new Process(); - if (Host.os().contains("windows")) + if (Host.os().includes("windows")) process.exec(product.qbs.windowsShellPath, ["/C", "type", "123.txt"], true); diff --git a/tests/auto/blackbox/testdata/ld/ld.qbs b/tests/auto/blackbox/testdata/ld/ld.qbs index 25fede1b0..cb04d3d9a 100644 --- a/tests/auto/blackbox/testdata/ld/ld.qbs +++ b/tests/auto/blackbox/testdata/ld/ld.qbs @@ -5,7 +5,7 @@ Project { targetName: "qbs can handle any file paths, even the crazy ones! ;)" files: ["coreutils.cpp", "coreutils.h"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false cpp.sonamePrefix: "@rpath" } diff --git a/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs b/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs index cb93547d4..4cce9a1e3 100644 --- a/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs +++ b/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs @@ -7,7 +7,7 @@ Module { property string yaccBinary: lex_yacc.yaccBinary configure: { var p = Process(); - found = p.exec(yaccBinary, ["-V"]) == 0 && p.readStdOut().contains("bison"); + found = p.exec(yaccBinary, ["-V"]) == 0 && p.readStdOut().includes("bison"); p.close(); } } 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 243ab09b5..faa5d1fac 100644 --- a/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs +++ b/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs @@ -19,10 +19,10 @@ CppApplication { Probe { id: pathCheck property string theDir: { - if (qbs.targetOS.contains("windows")) { - if (qbs.toolchain.contains("mingw")) + if (qbs.targetOS.includes("windows")) { + if (qbs.toolchain.includes("mingw")) return cpp.toolchainInstallPath; - if (qbs.toolchain.contains("clang") && qbs.sysroot) + if (qbs.toolchain.includes("clang") && qbs.sysroot) return qbs.sysroot + "/bin"; } } 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 a126d725d..648860d9c 100644 --- a/tests/auto/blackbox/testdata/lexyacc/two-grammars/two-grammars.qbs +++ b/tests/auto/blackbox/testdata/lexyacc/two-grammars/two-grammars.qbs @@ -5,7 +5,7 @@ CppApplication { consoleApplication: true cpp.includePaths: ".." Properties { - condition: Host.os().contains("darwin") && qbs.toolchain.contains("clang") + condition: Host.os().includes("darwin") && qbs.toolchain.includes("clang") cpp.cFlags: "-Wno-implicit-function-declaration" } files: [ diff --git a/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs b/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs index e69cde064..c41e8f1d7 100644 --- a/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs +++ b/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs @@ -6,6 +6,11 @@ Project { files: ["lib1.cpp"] Depends { name: "bundle" } bundle.isBundle: false + Probe { + id: checker + property bool isGcc: qbs.toolchain.contains("gcc") + configure: { console.info("is gcc: " + isGcc); } + } } DynamicLibrary { diff --git a/tests/auto/blackbox/testdata/linker-variant/linker-variant.qbs b/tests/auto/blackbox/testdata/linker-variant/linker-variant.qbs index 57bd4ccba..9256bf767 100644 --- a/tests/auto/blackbox/testdata/linker-variant/linker-variant.qbs +++ b/tests/auto/blackbox/testdata/linker-variant/linker-variant.qbs @@ -3,7 +3,7 @@ CppApplication { property string linkerVariant Probe { id: gccProbe - property bool isGcc: qbs.toolchain.contains("gcc") + property bool isGcc: qbs.toolchain.includes("gcc") configure: { console.info("is GCC: " + isGcc); if (isGcc) diff --git a/tests/auto/blackbox/testdata/linkerMode/linkerMode.qbs b/tests/auto/blackbox/testdata/linkerMode/linkerMode.qbs index 1be50c0aa..9934efb04 100644 --- a/tests/auto/blackbox/testdata/linkerMode/linkerMode.qbs +++ b/tests/auto/blackbox/testdata/linkerMode/linkerMode.qbs @@ -24,7 +24,7 @@ Project { } CppApplication { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") consoleApplication: true name: "LinkedProduct-Objective-C" @@ -50,7 +50,7 @@ Project { } CppApplication { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") consoleApplication: true name: "LinkedProduct-Objective-C++" diff --git a/tests/auto/blackbox/testdata/linkerMode/main.s b/tests/auto/blackbox/testdata/linkerMode/main.s index ef88f8c52..fb165114b 100644 --- a/tests/auto/blackbox/testdata/linkerMode/main.s +++ b/tests/auto/blackbox/testdata/linkerMode/main.s @@ -3,3 +3,4 @@ _main: main: + ret diff --git a/tests/auto/blackbox/testdata/linkerscripts/linkerscripts.qbs b/tests/auto/blackbox/testdata/linkerscripts/linkerscripts.qbs index 0b4de0ab9..6d068b6a2 100644 --- a/tests/auto/blackbox/testdata/linkerscripts/linkerscripts.qbs +++ b/tests/auto/blackbox/testdata/linkerscripts/linkerscripts.qbs @@ -55,6 +55,13 @@ DynamicLibrary { } } + Probe { + id: checker + property bool isGcc: qbs.toolchain.contains("gcc") + property bool isLinux: qbs.targetOS.contains("linux") + configure: { console.info("is Linux gcc: " + (isGcc && isLinux)) } + } + qbs.installPrefix: "" install: true installDir: "" diff --git a/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs b/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs index a5705a865..8023eed36 100644 --- a/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs +++ b/tests/auto/blackbox/testdata/loadablemodule/loadablemodule.qbs @@ -4,7 +4,7 @@ Project { LoadableModule { Depends { name: "cpp" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } name: "CoolPlugIn" @@ -30,10 +30,10 @@ Project { files: ["main.cpp"] cpp.cxxLanguageVersion: "c++11" - cpp.dynamicLibraries: [qbs.targetOS.contains("windows") ? "kernel32" : "dl"] + cpp.dynamicLibraries: [qbs.targetOS.includes("windows") ? "kernel32" : "dl"] Properties { - condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("unix") && !qbs.targetOS.includes("darwin") cpp.rpaths: [cpp.rpathOrigin] } diff --git a/tests/auto/blackbox/testdata/lsp/lsp.qbs b/tests/auto/blackbox/testdata/lsp/lsp.qbs new file mode 100644 index 000000000..24479e0ec --- /dev/null +++ b/tests/auto/blackbox/testdata/lsp/lsp.qbs @@ -0,0 +1,11 @@ +Project { + Product { + name: "dep" + Depends { name: "m" } + Depends { name: "Prefix"; submodules: ["m1", "m2", "m3"] } + + } + Product { + Depends { name: "dep" } + } +} diff --git a/tests/auto/blackbox/testdata/lsp/modules/Prefix/m1/m1.qbs b/tests/auto/blackbox/testdata/lsp/modules/Prefix/m1/m1.qbs new file mode 100644 index 000000000..09bac2dc2 --- /dev/null +++ b/tests/auto/blackbox/testdata/lsp/modules/Prefix/m1/m1.qbs @@ -0,0 +1,5 @@ +Module { + property bool p1 + property string p2 + property bool x +} diff --git a/tests/auto/blackbox/testdata/lsp/modules/Prefix/m2/m2.qbs b/tests/auto/blackbox/testdata/lsp/modules/Prefix/m2/m2.qbs new file mode 100644 index 000000000..84957060c --- /dev/null +++ b/tests/auto/blackbox/testdata/lsp/modules/Prefix/m2/m2.qbs @@ -0,0 +1,2 @@ +Module { +} diff --git a/tests/auto/blackbox/testdata/lsp/modules/Prefix/m3/m3.qbs b/tests/auto/blackbox/testdata/lsp/modules/Prefix/m3/m3.qbs new file mode 100644 index 000000000..84957060c --- /dev/null +++ b/tests/auto/blackbox/testdata/lsp/modules/Prefix/m3/m3.qbs @@ -0,0 +1,2 @@ +Module { +} diff --git a/tests/auto/blackbox/testdata/lsp/modules/m/m.qbs b/tests/auto/blackbox/testdata/lsp/modules/m/m.qbs new file mode 100644 index 000000000..84957060c --- /dev/null +++ b/tests/auto/blackbox/testdata/lsp/modules/m/m.qbs @@ -0,0 +1,2 @@ +Module { +} diff --git a/tests/auto/blackbox/testdata/makefile-generator/app.qbs b/tests/auto/blackbox/testdata/makefile-generator/app.qbs index 367f484cf..fd3fbb91b 100644 --- a/tests/auto/blackbox/testdata/makefile-generator/app.qbs +++ b/tests/auto/blackbox/testdata/makefile-generator/app.qbs @@ -13,7 +13,7 @@ CppApplication { cpp.cxxLanguageVersion: "c++11" cpp.separateDebugInformation: false Properties { - condition: qbs.targetOS.contains("macos") + condition: qbs.targetOS.includes("macos") bundle.embedInfoPlist: false cpp.minimumMacosVersion: "10.7" } diff --git a/tests/auto/blackbox/testdata/maximum-c-language-version/maximum-c-language-version.qbs b/tests/auto/blackbox/testdata/maximum-c-language-version/maximum-c-language-version.qbs index 320494d00..9f41570f8 100644 --- a/tests/auto/blackbox/testdata/maximum-c-language-version/maximum-c-language-version.qbs +++ b/tests/auto/blackbox/testdata/maximum-c-language-version/maximum-c-language-version.qbs @@ -4,10 +4,13 @@ CppApplication { Probe { id: osProbe - property stringList toolchain: qbs.toolchain + property string toolchainType: qbs.toolchainType + property string compilerVersion: cpp.compilerVersion configure: { - if (toolchain.contains("msvc")) - console.info("is msvc"); + console.info("is msvc: " + (toolchainType === "msvc" || toolchainType === "clang-cl")); + var isOld = (toolchainType === "msvc" && compilerVersion < "19.29.30138") + || (toolchainType === "clang-cl" && compilerVersion < "13"); + console.info("is old msvc: " + isOld); found = true; } } diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/fakewindows.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/fakewindows.qbs index 1a56e0b7e..da836e609 100644 --- a/tests/auto/blackbox/testdata/minimumSystemVersion/fakewindows.qbs +++ b/tests/auto/blackbox/testdata/minimumSystemVersion/fakewindows.qbs @@ -4,7 +4,7 @@ import qbs.Utilities // (but will still compile and link since we avoid passing a // bad value to the linker) CppApplication { - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.includes("windows") files: ["main.cpp"] consoleApplication: true cpp.minimumWindowsVersion: "5.3" diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs index a94b7a80e..26a94e132 100644 --- a/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs +++ b/tests/auto/blackbox/testdata/minimumSystemVersion/macappstore.qbs @@ -8,7 +8,7 @@ CppApplication { var result = qbs.targetPlatform === Host.platform(); if (!result) console.info("targetPlatform differs from hostPlatform"); - return result && qbs.targetOS.contains("macos"); + return result && qbs.targetOS.includes("macos"); } files: ["main.mm"] consoleApplication: true diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs index 4dca16df0..b2b67642a 100644 --- a/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs +++ b/tests/auto/blackbox/testdata/minimumSystemVersion/specific.qbs @@ -10,22 +10,22 @@ CppApplication { var result = qbs.targetPlatform === Host.platform(); if (!result) console.info("targetPlatform differs from hostPlatform"); - return result && qbs.targetOS.contains("windows") || qbs.targetOS.contains("macos"); + return result && qbs.targetOS.includes("windows") || qbs.targetOS.includes("macos"); } - files: [qbs.targetOS.contains("darwin") ? "main.mm" : "main.cpp"] + files: [qbs.targetOS.includes("darwin") ? "main.mm" : "main.cpp"] consoleApplication: true Properties { - condition: qbs.targetOS.contains("windows") - cpp.minimumWindowsVersion: "6.0" + condition: qbs.targetOS.includes("windows") + cpp.minimumWindowsVersion: "6.2" cpp.defines: [ - "QBS_WINVER=0x600", + "QBS_WINVER=0x602", "TOOLCHAIN_INSTALL_PATH=" + Utilities.cStringQuote(cpp.toolchainInstallPath) ] } Properties { - condition: qbs.targetOS.contains("macos") + condition: qbs.targetOS.includes("macos") cpp.frameworks: "Foundation" cpp.minimumMacosVersion: "10.7" } diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs index 36756137e..adb61a6d8 100644 --- a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs +++ b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified-forced.qbs @@ -11,7 +11,7 @@ CppApplication { console.info("targetPlatform differs from hostPlatform"); return result; } - files: [qbs.targetOS.contains("darwin") ? "main.mm" : "main.cpp"] + files: [qbs.targetOS.includes("darwin") ? "main.mm" : "main.cpp"] consoleApplication: true cpp.minimumWindowsVersion: undefined cpp.minimumMacosVersion: undefined @@ -19,12 +19,12 @@ CppApplication { cpp.minimumAndroidVersion: undefined Properties { - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.includes("windows") cpp.defines: ["TOOLCHAIN_INSTALL_PATH=" + Utilities.cStringQuote(cpp.toolchainInstallPath)] } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.frameworks: "Foundation" } } diff --git a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs index 1440925f3..3c6559c39 100644 --- a/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs +++ b/tests/auto/blackbox/testdata/minimumSystemVersion/unspecified.qbs @@ -10,16 +10,16 @@ CppApplication { console.info("targetPlatform differs from hostPlatform"); return result; } - files: [qbs.targetOS.contains("darwin") ? "main.mm" : "main.cpp"] + files: [qbs.targetOS.includes("darwin") ? "main.mm" : "main.cpp"] consoleApplication: true Properties { - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.includes("windows") cpp.defines: ["TOOLCHAIN_INSTALL_PATH=" + Utilities.cStringQuote(cpp.toolchainInstallPath)] } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.frameworks: "Foundation" } } diff --git a/tests/auto/blackbox/testdata/module-providers/main.cpp b/tests/auto/blackbox/testdata/module-providers/main.cpp deleted file mode 100644 index 85a4f551c..000000000 --- a/tests/auto/blackbox/testdata/module-providers/main.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include <iostream> - -int main() -{ - std::cout << "The letters are " << LETTER1 << " and " << LETTER2 << std::endl; - std::cout << "The MY_DEFINE is " << MY_DEFINE << std::endl; - return 0; -} diff --git a/tests/auto/blackbox/testdata/module-providers/module-providers.qbs b/tests/auto/blackbox/testdata/module-providers/module-providers.qbs deleted file mode 100644 index e83c80bb1..000000000 --- a/tests/auto/blackbox/testdata/module-providers/module-providers.qbs +++ /dev/null @@ -1,35 +0,0 @@ -import qbs.Host - -Project { - property bool enabled: { - var result = qbs.targetPlatform === Host.platform(); - if (!result) - console.info("targetPlatform differs from hostPlatform"); - return result; - } - readonly property string beginning: "beginning" - CppApplication { - name: "app1" - Depends { name: "mygenerator.module1" } - Depends { name: "mygenerator.module2" } - Depends { name: "othergenerator" } - moduleProviders.mygenerator.chooseLettersFrom: project.beginning - moduleProviders.othergenerator.someDefines: name - files: "main.cpp" - } - CppApplication { - readonly property string end: "end" - name: "app2" - Depends { name: "mygenerator.module1" } - Depends { name: "mygenerator.module2" } - Depends { name: "othergenerator" } - Profile { - name: "myProfile" - baseProfile: project.profile - moduleProviders.mygenerator.chooseLettersFrom: product.end - moduleProviders.othergenerator.someDefines: "app2" - } - qbs.profile: "myProfile" - files: "main.cpp" - } -} diff --git a/tests/auto/blackbox/testdata/module-providers/module-providers/mygenerator/provider.qbs b/tests/auto/blackbox/testdata/module-providers/module-providers/mygenerator/provider.qbs deleted file mode 100644 index dae02c03a..000000000 --- a/tests/auto/blackbox/testdata/module-providers/module-providers/mygenerator/provider.qbs +++ /dev/null @@ -1,31 +0,0 @@ -import qbs.File; -import qbs.FileInfo; -import qbs.TextFile; - -ModuleProvider { - property string chooseLettersFrom - relativeSearchPaths: { - console.info("Running setup script for " + name); - var startAtBeginning = chooseLettersFrom === "beginning"; - var moduleBaseDir = FileInfo.joinPaths(outputBaseDir, "modules", "mygenerator"); - var module1Dir = FileInfo.joinPaths(moduleBaseDir, "module1"); - File.makePath(module1Dir); - var module1 = new TextFile(FileInfo.joinPaths(module1Dir, "module1.qbs"), TextFile.WriteOnly); - module1.writeLine("Module {"); - module1.writeLine(" Depends { name: 'cpp' }"); - module1.writeLine(" cpp.defines: 'LETTER1=" + (startAtBeginning ? "\\\'A\\\'" : "\\\'Z\\\'") - + "'"); - module1.writeLine("}"); - module1.close(); - var module2Dir = FileInfo.joinPaths(moduleBaseDir, "module2"); - File.makePath(module2Dir); - var module2 = new TextFile(FileInfo.joinPaths(module2Dir, "module2.qbs"), TextFile.WriteOnly); - module2.writeLine("Module {"); - module2.writeLine(" Depends { name: 'cpp' }"); - module2.writeLine(" cpp.defines: 'LETTER2=" + (startAtBeginning ? "\\\'B\\\'" : "\\\'Y\\\'") - + "'"); - module2.writeLine("}"); - module2.close(); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/module-providers/module-providers/othergenerator/provider.qbs b/tests/auto/blackbox/testdata/module-providers/module-providers/othergenerator/provider.qbs deleted file mode 100644 index 66557037c..000000000 --- a/tests/auto/blackbox/testdata/module-providers/module-providers/othergenerator/provider.qbs +++ /dev/null @@ -1,19 +0,0 @@ -import qbs.File; -import qbs.FileInfo; -import qbs.TextFile; - -ModuleProvider { - property string someDefines - relativeSearchPaths: { - console.info("Running setup script for " + name); - var moduleDir = FileInfo.joinPaths(outputBaseDir, "modules", "othergenerator"); - File.makePath(moduleDir); - var module = new TextFile(FileInfo.joinPaths(moduleDir, "module.qbs"), TextFile.WriteOnly); - module.writeLine("Module {"); - module.writeLine(" Depends { name: 'cpp' }"); - module.writeLine(" cpp.defines: 'MY_DEFINE=\"" + someDefines + "\"'"); - module.writeLine("}"); - module.close(); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/concurrent-executor/dummy1.input b/tests/auto/blackbox/testdata/msvc-asm-flags/include/header.inc index e69de29bb..e69de29bb 100644 --- a/tests/auto/blackbox/testdata/concurrent-executor/dummy1.input +++ b/tests/auto/blackbox/testdata/msvc-asm-flags/include/header.inc diff --git a/tests/auto/blackbox/testdata/msvc-asm-flags/msvc-asm-flags.asm b/tests/auto/blackbox/testdata/msvc-asm-flags/msvc-asm-flags.asm new file mode 100644 index 000000000..eddc49131 --- /dev/null +++ b/tests/auto/blackbox/testdata/msvc-asm-flags/msvc-asm-flags.asm @@ -0,0 +1,8 @@ +include header.inc + +.code +main proc + mov ecx, 16 +main endp + +end
\ No newline at end of file diff --git a/tests/auto/blackbox/testdata/msvc-asm-flags/msvc-asm-flags.qbs b/tests/auto/blackbox/testdata/msvc-asm-flags/msvc-asm-flags.qbs new file mode 100644 index 000000000..d632098c9 --- /dev/null +++ b/tests/auto/blackbox/testdata/msvc-asm-flags/msvc-asm-flags.qbs @@ -0,0 +1,6 @@ +StaticLibrary { + condition: qbs.toolchain.includes("msvc") + Depends { name: "cpp" } + files: "msvc-asm-flags.asm" + cpp.assemblerFlags: ["/I", "include"] +} diff --git a/tests/auto/blackbox/testdata/no-exported-symbols/no-exported-symbols.qbs b/tests/auto/blackbox/testdata/no-exported-symbols/no-exported-symbols.qbs index 346a94e21..9aad3d032 100644 --- a/tests/auto/blackbox/testdata/no-exported-symbols/no-exported-symbols.qbs +++ b/tests/auto/blackbox/testdata/no-exported-symbols/no-exported-symbols.qbs @@ -12,7 +12,7 @@ Project { id: toolchainProbe property stringList toolchain: qbs.toolchain configure: { - if (toolchain.contains("msvc") && !toolchain.contains("clang-cl")) + if (toolchain.includes("msvc") && !toolchain.includes("clang-cl")) console.info("compiler is MSVC") else console.info("compiler is not MSVC") diff --git a/tests/auto/blackbox/testdata/nsis/hello.qbs b/tests/auto/blackbox/testdata/nsis/hello.qbs index a161a6998..f70f27e2b 100644 --- a/tests/auto/blackbox/testdata/nsis/hello.qbs +++ b/tests/auto/blackbox/testdata/nsis/hello.qbs @@ -1,5 +1,5 @@ NSISSetup { - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.includes("windows") name: "Qbs Hello" targetName: "qbs-hello-" + qbs.architecture files: ["hello.nsi", "hello.bat"] diff --git a/tests/auto/blackbox/testdata/nsisDependencies/nsisDependencies.qbs b/tests/auto/blackbox/testdata/nsisDependencies/nsisDependencies.qbs index d8185aabf..a4ce92067 100644 --- a/tests/auto/blackbox/testdata/nsisDependencies/nsisDependencies.qbs +++ b/tests/auto/blackbox/testdata/nsisDependencies/nsisDependencies.qbs @@ -2,7 +2,7 @@ import qbs.FileInfo import qbs.TextFile Project { - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.includes("windows") NSISSetup { Depends { name: "app" } diff --git a/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs b/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs index 37b5b3778..d2474cecf 100644 --- a/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs +++ b/tests/auto/blackbox/testdata/output-redirection/output-redirection.qbs @@ -22,7 +22,7 @@ Product { prepare: { var binary; var prefixArgs; - if (Host.os().contains("windows")) { + if (Host.os().includes("windows")) { binary = product.qbs.windowsShellPath; prefixArgs = ["/c", "type"]; } else { diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs b/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs index b69dd0da8..c7eab99e2 100644 --- a/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs +++ b/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs @@ -3,7 +3,7 @@ DynamicLibrary { files: "helperlib.cpp" Depends { name: "cpp" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } diff --git a/tests/auto/blackbox/testdata/path-list-in-probe/main.cpp b/tests/auto/blackbox/testdata/path-list-in-probe/main.cpp new file mode 100644 index 000000000..5bc549337 --- /dev/null +++ b/tests/auto/blackbox/testdata/path-list-in-probe/main.cpp @@ -0,0 +1,4 @@ +int main() +{ + return 0; +}
\ No newline at end of file diff --git a/tests/auto/blackbox/testdata/path-list-in-probe/path-list-in-probe.qbs b/tests/auto/blackbox/testdata/path-list-in-probe/path-list-in-probe.qbs new file mode 100644 index 000000000..3bf36367a --- /dev/null +++ b/tests/auto/blackbox/testdata/path-list-in-probe/path-list-in-probe.qbs @@ -0,0 +1,18 @@ +Project { + CppApplication { + Probe { + id: theProbe + property pathList result + configure: { + result = ["main.cpp"] + found = true + } + } + property pathList res: theProbe.found ? theProbe.result : [] + + Group { + name: "files" + files: res + } + } +} diff --git a/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs b/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs index c40f22736..5c259ae9b 100644 --- a/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs +++ b/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs @@ -4,8 +4,9 @@ BaseApp { inputNames: ["tool.1", "tool.2"] inputSearchPaths: "bin" inputCandidateFilter: { + var fi = FileInfo; return function(f) { - return FileInfo.fileName(f) == "tool.2"; + return fi.fileName(f) == "tool.2"; } } outputFilePaths: ["bin/tool.2"] diff --git a/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs b/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs index 30b7f4ace..752673b78 100644 --- a/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs +++ b/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs @@ -11,8 +11,8 @@ Project { Depends { name: "plugin2" } // not to be linked Depends { name: "plugin3" // supposed to be linked - //property bool theCondition: true - cpp.link: /*theCondition && */product.name === "myapp" // TODO: Make this work + property bool theCondition: true + cpp.link: theCondition && product.name === "myapp" } Depends { name: "plugin4" } // supposed to be linked Depends { name: "helper1" } // supposed to be linked diff --git a/tests/auto/blackbox/testdata/precompiled-headers-and-redefine/precompiled-headers-and-redefine.qbs b/tests/auto/blackbox/testdata/precompiled-headers-and-redefine/precompiled-headers-and-redefine.qbs index 55b53a7af..3974b514e 100644 --- a/tests/auto/blackbox/testdata/precompiled-headers-and-redefine/precompiled-headers-and-redefine.qbs +++ b/tests/auto/blackbox/testdata/precompiled-headers-and-redefine/precompiled-headers-and-redefine.qbs @@ -8,7 +8,7 @@ CppApplication { Group { files: ["file.cpp"] cpp.defines: ["MYDEF=1"] - cpp.cxxFlags: base.concat(qbs.toolchain.contains("clang-cl") ? ["-Wno-clang-cl-pch"] : []) + cpp.cxxFlags: base.concat(qbs.toolchain.includes("clang-cl") ? ["-Wno-clang-cl-pch"] : []) } cpp.treatWarningsAsErrors: true diff --git a/tests/auto/blackbox/testdata/probe-in-module-provider/module-providers/provider_a.qbs b/tests/auto/blackbox/testdata/probe-in-module-provider/module-providers/provider_a.qbs deleted file mode 100644 index 8a7c7d6ed..000000000 --- a/tests/auto/blackbox/testdata/probe-in-module-provider/module-providers/provider_a.qbs +++ /dev/null @@ -1,16 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - Probe { - id: theProbe - configure: { - console.info("Running probe"); - found = true; - } - } - property bool found: theProbe.found - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", undefined, undefined, found); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/probe-in-module-provider/probe-in-module-provider.qbs b/tests/auto/blackbox/testdata/probe-in-module-provider/probe-in-module-provider.qbs deleted file mode 100644 index cb346beeb..000000000 --- a/tests/auto/blackbox/testdata/probe-in-module-provider/probe-in-module-provider.qbs +++ /dev/null @@ -1,8 +0,0 @@ -Product { - qbsModuleProviders: ["provider_a"] - name: "p" - Depends { name: "qbsmetatestmodule" } - property bool dummy: { - console.info("p.qbsmetatestmodule.boolProp: " + JSON.stringify(qbsmetatestmodule.boolProp)); - } -} diff --git a/tests/auto/blackbox/testdata/product-dependencies-by-type/product-dependencies-by-type.qbs b/tests/auto/blackbox/testdata/product-dependencies-by-type/product-dependencies-by-type.qbs index 6772acf27..8e1f291f3 100644 --- a/tests/auto/blackbox/testdata/product-dependencies-by-type/product-dependencies-by-type.qbs +++ b/tests/auto/blackbox/testdata/product-dependencies-by-type/product-dependencies-by-type.qbs @@ -91,7 +91,7 @@ Project { name: "lib-product" files: "main.cpp" Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } diff --git a/tests/auto/blackbox/testdata/property-assignment-on-non-present-module/property-assignment-on-non-present-module.qbs b/tests/auto/blackbox/testdata/property-assignment-on-non-present-module/property-assignment-on-non-present-module.qbs deleted file mode 100644 index a01d6c561..000000000 --- a/tests/auto/blackbox/testdata/property-assignment-on-non-present-module/property-assignment-on-non-present-module.qbs +++ /dev/null @@ -1,4 +0,0 @@ -Product { - Depends { name: "nein"; required: false } - nein.doch: "ohhh!" -} diff --git a/tests/auto/blackbox/testdata/propertyChanges/propertyChanges.qbs b/tests/auto/blackbox/testdata/propertyChanges/propertyChanges.qbs index 0ae8c1550..29365a887 100644 --- a/tests/auto/blackbox/testdata/propertyChanges/propertyChanges.qbs +++ b/tests/auto/blackbox/testdata/propertyChanges/propertyChanges.qbs @@ -27,7 +27,7 @@ Project { name: "library" files: "lib.cpp" Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } } diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs index cf63eb17f..959552ea5 100644 --- a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs +++ b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs @@ -11,8 +11,7 @@ CppApplication { consoleApplication: true Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++11" - cpp.minimumMacosVersion: "10.8" + cpp.minimumMacosVersion: "10.15" Depends { name: "protobuf.cpp"; required: false } property bool hasProtobuf: { diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs index ccb724ef5..3dfc911e1 100644 --- a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs +++ b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs @@ -11,7 +11,6 @@ CppApplication { consoleApplication: true Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++11" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.nanopb"; required: false } diff --git a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs index 967bf2bb8..005752fd8 100644 --- a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs +++ b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs @@ -11,7 +11,6 @@ Project { name: "proto_lib" Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++11" cpp.minimumMacosVersion: "10.8" protobuf.cpp.importPaths: product.sourceDirectory diff --git a/tests/auto/blackbox/testdata/protobuf/import.qbs b/tests/auto/blackbox/testdata/protobuf/import.qbs index 41669020d..56d489de8 100644 --- a/tests/auto/blackbox/testdata/protobuf/import.qbs +++ b/tests/auto/blackbox/testdata/protobuf/import.qbs @@ -12,7 +12,6 @@ CppApplication { protobuf.cpp.importPaths: [sourceDirectory] - cpp.cxxLanguageVersion: "c++11" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.cpp"; required: false } diff --git a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs index 143e9c20f..07be566cb 100644 --- a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs +++ b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs @@ -13,7 +13,6 @@ CppApplication { property path theImportDir protobuf.cpp.importPaths: (theImportDir ? [theImportDir] : []).concat([sourceDirectory]) - cpp.cxxLanguageVersion: "c++11" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.cpp"; required: false } diff --git a/tests/auto/blackbox/testdata/providers-properties/module-providers/provider_a.qbs b/tests/auto/blackbox/testdata/providers-properties/module-providers/provider_a.qbs deleted file mode 100644 index ab9d475d8..000000000 --- a/tests/auto/blackbox/testdata/providers-properties/module-providers/provider_a.qbs +++ /dev/null @@ -1,9 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - property stringList someProp: "provider_a" - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", undefined, someProp); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/providers-properties/module-providers/provider_b.qbs b/tests/auto/blackbox/testdata/providers-properties/module-providers/provider_b.qbs deleted file mode 100644 index 1b2a79979..000000000 --- a/tests/auto/blackbox/testdata/providers-properties/module-providers/provider_b.qbs +++ /dev/null @@ -1,9 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - property stringList someProp: "provider_b" - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsothermodule", undefined, someProp); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/providers-properties/providers-properties.qbs b/tests/auto/blackbox/testdata/providers-properties/providers-properties.qbs deleted file mode 100644 index 258a973fa..000000000 --- a/tests/auto/blackbox/testdata/providers-properties/providers-properties.qbs +++ /dev/null @@ -1,12 +0,0 @@ -Product { - qbsModuleProviders: ["provider_a", "provider_b"] - name: "p" - Depends { name: "qbsmetatestmodule" } - Depends { name: "qbsothermodule" } - moduleProviders.provider_a.someProp: "someValue" - property bool dummy: { - console.info("p.qbsmetatestmodule.listProp: " - + JSON.stringify(qbsmetatestmodule.listProp)); - console.info("p.qbsothermodule.listProp: " + JSON.stringify(qbsothermodule.listProp)); - } -} diff --git a/tests/auto/blackbox/testdata/qbs-config-import-export/config.json b/tests/auto/blackbox/testdata/qbs-config-import-export/config.json new file mode 100644 index 000000000..edcaf238a --- /dev/null +++ b/tests/auto/blackbox/testdata/qbs-config-import-export/config.json @@ -0,0 +1,11 @@ +{ + "group": { + "key1": "value1", + "key2": "value2" + }, + "key": "value", + "listKey": [ + "valueOne", + "valueTwo" + ] +} diff --git a/tests/auto/blackbox/testdata/qbs-config-import-export/config.txt b/tests/auto/blackbox/testdata/qbs-config-import-export/config.txt new file mode 100644 index 000000000..2bd19c422 --- /dev/null +++ b/tests/auto/blackbox/testdata/qbs-config-import-export/config.txt @@ -0,0 +1,4 @@ +group.key1: "value1" +group.key2: "value2" +key: "value" +listKey: ["valueOne", "valueTwo"] diff --git a/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/module-providers/provider_a.qbs b/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/module-providers/provider_a.qbs deleted file mode 100644 index d34d1cac5..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/module-providers/provider_a.qbs +++ /dev/null @@ -1,8 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", "from_provider_a"); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/module-providers/provider_b.qbs b/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/module-providers/provider_b.qbs deleted file mode 100644 index 767e30923..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/module-providers/provider_b.qbs +++ /dev/null @@ -1,9 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", "from_provider_b"); - Helpers.writeModule(outputBaseDir, "qbsothermodule", "from_provider_b"); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/qbs-module-providers-cli-override.qbs b/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/qbs-module-providers-cli-override.qbs deleted file mode 100644 index 6f94ab207..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers-cli-override/qbs-module-providers-cli-override.qbs +++ /dev/null @@ -1,13 +0,0 @@ -Project { - name: "project" - Project { - name: "innerProject" - Product { - name: "product" - Depends { name: "qbsmetatestmodule"; required: false } - property bool dummy: { - console.info("qbsmetatestmodule.prop: " + qbsmetatestmodule.prop); - } - } - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/module-providers/named_provider.qbs b/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/module-providers/named_provider.qbs deleted file mode 100644 index 07114b5ef..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/module-providers/named_provider.qbs +++ /dev/null @@ -1,8 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", "from_named_provider"); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/module-providers/qbsmetatestmodule/provider.qbs b/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/module-providers/qbsmetatestmodule/provider.qbs deleted file mode 100644 index b04a52261..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/module-providers/qbsmetatestmodule/provider.qbs +++ /dev/null @@ -1,8 +0,0 @@ -import "../../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", "from_scoped_provider"); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/qbs-module-providers-compatibility.qbs b/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/qbs-module-providers-compatibility.qbs deleted file mode 100644 index 7885b540a..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers-compatibility/qbs-module-providers-compatibility.qbs +++ /dev/null @@ -1,7 +0,0 @@ -Product { - name: "p" - Depends { name: "qbsmetatestmodule" } - property bool dummy: { - console.info("qbsmetatestmodule.prop: " + qbsmetatestmodule.prop); - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers-helpers.js b/tests/auto/blackbox/testdata/qbs-module-providers-helpers.js deleted file mode 100644 index 8b6d9e275..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers-helpers.js +++ /dev/null @@ -1,23 +0,0 @@ -var File = require("qbs.File"); -var FileInfo = require("qbs.FileInfo"); -var TextFile = require("qbs.TextFile"); -var ModUtils = require("qbs.ModUtils"); - -function writeModule(outputBaseDir, name, prop, listProp, boolProp) { - console.info("Running setup script for " + name); - var moduleDir = FileInfo.joinPaths(outputBaseDir, "modules", name); - File.makePath(moduleDir); - var module = new TextFile(FileInfo.joinPaths(moduleDir, "module.qbs"), TextFile.WriteOnly); - module.writeLine("Module {"); - module.writeLine(" property string prop: " + ModUtils.toJSLiteral(prop)); - if (listProp) { - module.writeLine(" property stringList listProp: " - + ModUtils.toJSLiteral(listProp)); - } - if (boolProp) { - module.writeLine(" property bool boolProp: " - + ModUtils.toJSLiteral(boolProp)); - } - module.writeLine("}"); - module.close(); -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers/module-providers/provider_a.qbs b/tests/auto/blackbox/testdata/qbs-module-providers/module-providers/provider_a.qbs deleted file mode 100644 index d34d1cac5..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers/module-providers/provider_a.qbs +++ /dev/null @@ -1,8 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", "from_provider_a"); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers/module-providers/provider_b.qbs b/tests/auto/blackbox/testdata/qbs-module-providers/module-providers/provider_b.qbs deleted file mode 100644 index 767e30923..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers/module-providers/provider_b.qbs +++ /dev/null @@ -1,9 +0,0 @@ -import "../../qbs-module-providers-helpers.js" as Helpers - -ModuleProvider { - relativeSearchPaths: { - Helpers.writeModule(outputBaseDir, "qbsmetatestmodule", "from_provider_b"); - Helpers.writeModule(outputBaseDir, "qbsothermodule", "from_provider_b"); - return ""; - } -} diff --git a/tests/auto/blackbox/testdata/qbs-module-providers/qbs-module-providers.qbs b/tests/auto/blackbox/testdata/qbs-module-providers/qbs-module-providers.qbs deleted file mode 100644 index 00776a62e..000000000 --- a/tests/auto/blackbox/testdata/qbs-module-providers/qbs-module-providers.qbs +++ /dev/null @@ -1,28 +0,0 @@ -Project { - qbsModuleProviders: "provider_a" - property stringList wantedProviders: qbsModuleProviders - name: "project" - Project { - name: "innerProject" - qbsModuleProviders: project.wantedProviders - Product { - name: "p1" - Depends { name: "qbsmetatestmodule" } - Depends { name: "qbsothermodule"; required: false } - property bool dummy: { - console.info("p1.qbsmetatestmodule.prop: " + qbsmetatestmodule.prop); - console.info("p1.qbsothermodule.prop: " + qbsothermodule.prop); - } - } - } - - Product { - name: "p2" - Depends { name: "qbsmetatestmodule" } - Depends { name: "qbsothermodule"; required: false } - property bool dummy: { - console.info("p2.qbsmetatestmodule.prop: " + qbsmetatestmodule.prop); - console.info("p2.qbsothermodule.prop: " + qbsothermodule.prop); - } - } -} diff --git a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libdir/libA.pc b/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libdir/libA.pc deleted file mode 100644 index 077a05893..000000000 --- a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libdir/libA.pc +++ /dev/null @@ -1,6 +0,0 @@ -Name: libA -Description: just a test -Version: 0.0.1 - -Cflags: -DTHE_MAGIC_DEFINE -I/usr/local/include -Libs: -L/usr/local/lib -llibA diff --git a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libA.cpp b/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libA.cpp deleted file mode 100644 index 0c5274415..000000000 --- a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libA.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "libA.h" - -#include <iostream> - -void foo() -{ - std::cout << "hello from foo: "; -#ifdef MYLIB_FRAMEWORK - std::cout << "bundled: yes"; -#else - std::cout << "bundled: no"; -#endif - std::cout << std::endl; -} diff --git a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libA.h b/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libA.h deleted file mode 100644 index ddaaf1609..000000000 --- a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libA.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#if defined(_WIN32) || defined(WIN32) -# define DECL_EXPORT __declspec(dllexport) -# define DECL_IMPORT __declspec(dllimport) -#else -# define DECL_EXPORT __attribute__((visibility("default"))) -# define DECL_IMPORT __attribute__((visibility("default"))) -# endif - -#if defined(LIBA_STATIC_LIBRARY) -# define LIBA_EXPORT -#else -# if defined(MYLIB_LIBRARY) -# define LIBA_EXPORT DECL_EXPORT -# else -# define LIBA_EXPORT DECL_IMPORT -# endif -#endif - -LIBA_EXPORT void foo(); diff --git a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libs.qbs b/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libs.qbs deleted file mode 100644 index 9d482415b..000000000 --- a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libs.qbs +++ /dev/null @@ -1,29 +0,0 @@ -import qbs.FileInfo - -Project { - property bool isBundle: false - - DynamicLibrary { - Depends { name: "cpp" } - Depends { name: "bundle" } - name: "libA" - bundle.isBundle: project.isBundle - bundle.publicHeaders: ["libA.h"] - files: "libA.cpp" - cpp.defines: { - var result = []; - if (project.isBundle) - result.push("MYLIB_FRAMEWORK"); - return result; - } - qbs.installPrefix: "" - install: true - installImportLib: true - installDir: "lib" - Group { - files: ["libA.h"] - qbs.install: !project.isBundle - qbs.installDir: FileInfo.joinPaths("include", product.name) - } - } -} diff --git a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/main.cpp b/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/main.cpp deleted file mode 100644 index 5fa0f7eed..000000000 --- a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include <libA/libA.h> - -#ifndef THE_MAGIC_DEFINE -#error "missing the magic define" -#endif - -int main() -{ - foo(); - return 0; -} diff --git a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/qbspkgconfig-module-provider.qbs b/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/qbspkgconfig-module-provider.qbs deleted file mode 100644 index d2b3654ae..000000000 --- a/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/qbspkgconfig-module-provider.qbs +++ /dev/null @@ -1,6 +0,0 @@ -CppApplication { - name: "p" - Depends { name: "libA" } - files: "main.cpp" - qbsModuleProviders: "qbspkgconfig" -} 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 040e12b3a..d89e47414 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 @@ -7,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") && !Host.os().contains("bsd"))) + + (qbs.toolchain.includes("gcc") && !Host.os().includes("bsd"))) } qbsSearchPaths: "." diff --git a/tests/auto/blackbox/testdata/reproducible-build/reproducible-build.qbs b/tests/auto/blackbox/testdata/reproducible-build/reproducible-build.qbs index f7ed8e61a..fabdf48db 100644 --- a/tests/auto/blackbox/testdata/reproducible-build/reproducible-build.qbs +++ b/tests/auto/blackbox/testdata/reproducible-build/reproducible-build.qbs @@ -2,4 +2,9 @@ CppApplication { name: "the product" files: ["file1.cpp", "file2.cpp", "main.cpp"] cpp.cxxFlags: ["-flto"] + Probe { + id: checker + property bool isGcc: qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang") + configure: { console.info("is gcc: " + isGcc); } + } } diff --git a/tests/auto/blackbox/testdata/require-deprecated/blubb.js b/tests/auto/blackbox/testdata/require-deprecated/blubb.js deleted file mode 100644 index 9acc13968..000000000 --- a/tests/auto/blackbox/testdata/require-deprecated/blubb.js +++ /dev/null @@ -1,13 +0,0 @@ -var TextFile = loadExtension("qbs.TextFile") -var zort = loadFile("zort.js") - -function createCommands(filePaths) { - var cmd = new JavaScriptCommand(); - cmd.description = "Write an empty file"; - cmd.filePath = filePaths[0]; - cmd.sourceCode = function() { - var f = new TextFile(filePath, TextFile.WriteOnly); - f.close(); - } - return [cmd, zort.createCommand(filePaths)]; -} diff --git a/tests/auto/blackbox/testdata/require-deprecated/require.qbs b/tests/auto/blackbox/testdata/require-deprecated/require.qbs deleted file mode 100644 index 87d8b054b..000000000 --- a/tests/auto/blackbox/testdata/require-deprecated/require.qbs +++ /dev/null @@ -1,21 +0,0 @@ -import 'blubb.js' as blubb - -Product { - type: ["text"] - Rule { - multiplex: true - Artifact { - fileTags: ["text"] - filePath: "one.txt" - } - Artifact { - fileTags: ["text"] - filePath: "two.txt" - } - prepare: { - var filePaths = outputs.text.map(function (artifact) {return artifact.filePath; }); - return blubb.createCommands(filePaths); - } - } -} - diff --git a/tests/auto/blackbox/testdata/require-deprecated/zort.js b/tests/auto/blackbox/testdata/require-deprecated/zort.js deleted file mode 100644 index 0dcffb767..000000000 --- a/tests/auto/blackbox/testdata/require-deprecated/zort.js +++ /dev/null @@ -1,11 +0,0 @@ -var File = loadExtension("qbs.File") - -function createCommand(filePaths) { - var cmd = new JavaScriptCommand(); - cmd.description = "Create another empty file"; - cmd.filePaths = filePaths; - cmd.sourceCode = function() { - File.copy(filePaths[0], filePaths[1]); - }; - return cmd; -} diff --git a/tests/auto/blackbox/testdata/response-files/response-files.qbs b/tests/auto/blackbox/testdata/response-files/response-files.qbs index 9158a85fa..c18fcac43 100644 --- a/tests/auto/blackbox/testdata/response-files/response-files.qbs +++ b/tests/auto/blackbox/testdata/response-files/response-files.qbs @@ -47,7 +47,7 @@ Project { type: ["dynamiclibrary"] // clang-cl does not use response file internally, thus linker complains that command is // too long. This can be worked around by calling the linker directly - cpp.linkerMode: qbs.toolchain.contains("clang-cl") ? "manual" : original + cpp.linkerMode: qbs.toolchain.includes("clang-cl") ? "manual" : original Depends { name: "cpp" } Rule { multiplex: true diff --git a/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication-lib.cpp b/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication-lib.cpp new file mode 100644 index 000000000..6418df94d --- /dev/null +++ b/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication-lib.cpp @@ -0,0 +1,3 @@ +int dynamicFunc() { + return 1; +}
\ No newline at end of file diff --git a/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication-main.cpp b/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication-main.cpp new file mode 100644 index 000000000..60f8494f6 --- /dev/null +++ b/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication-main.cpp @@ -0,0 +1,5 @@ +extern int dynamicFunc(); + +int main() { + return dynamicFunc(); +}
\ No newline at end of file diff --git a/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication.qbs b/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication.qbs new file mode 100644 index 000000000..adb63872a --- /dev/null +++ b/tests/auto/blackbox/testdata/rpathlink-deduplication/rpathlink-deduplication.qbs @@ -0,0 +1,47 @@ +Project { + DynamicLibrary { + Depends { name: "bundle" } + Depends { name: "cpp" } + + bundle.isBundle: false + name: "DynamicLibraryA" + files: ["rpathlink-deduplication-lib.cpp"] + } + + DynamicLibrary { + Depends { name: "bundle" } + Depends { name: "cpp" } + Depends { name: "DynamicLibraryA" } + + bundle.isBundle: false + name: "DynamicLibraryB" + files: ["rpathlink-deduplication-lib.cpp"] + } + + DynamicLibrary { + Depends { name: "bundle" } + Depends { name: "cpp" } + Depends { name: "DynamicLibraryA" } + + bundle.isBundle: false + name: "DynamicLibraryC" + files: ["rpathlink-deduplication-lib.cpp"] + } + + CppApplication { + Depends { name: "bundle" } + Depends { name: "DynamicLibraryB" } + Depends { name: "DynamicLibraryC" } + consoleApplication: true + bundle.isBundle: false + cpp.removeDuplicateLibraries: false + files: "rpathlink-deduplication-main.cpp" + property bool test: { + if (cpp.useRPathLink) + console.info("useRPathLink: true"); + else + console.info("useRPathLink: false"); + console.info("===" + cpp.rpathLinkFlag + "==="); + } + } +}
\ No newline at end of file diff --git a/tests/auto/blackbox/testdata/run-multiplexed/main.cpp b/tests/auto/blackbox/testdata/run-multiplexed/main.cpp new file mode 100644 index 000000000..237c8ce18 --- /dev/null +++ b/tests/auto/blackbox/testdata/run-multiplexed/main.cpp @@ -0,0 +1 @@ +int main() {} diff --git a/tests/auto/blackbox/testdata/run-multiplexed/run-multiplexed.qbs b/tests/auto/blackbox/testdata/run-multiplexed/run-multiplexed.qbs new file mode 100644 index 000000000..11577b54a --- /dev/null +++ b/tests/auto/blackbox/testdata/run-multiplexed/run-multiplexed.qbs @@ -0,0 +1,21 @@ +import qbs.Host + +CppApplication { + aggregate: false + consoleApplication: true + name: "app" + multiplexByQbsProperties: "buildVariants" + + qbs.buildVariants: ["debug", "release"] + + files: "main.cpp" + + Probe { + id: checker + property string targetPlatform: qbs.targetPlatform + configure: { + if (targetPlatform !== Host.platform()) + console.info("targetPlatform differs from hostPlatform"); + } + } +} diff --git a/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs b/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs index 9126a7913..438f3cc39 100644 --- a/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs +++ b/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs @@ -4,12 +4,12 @@ CppApplication { property string sanitizer property bool supportsSanitizer: { - if (qbs.toolchain.contains("mingw")) + if (qbs.toolchain.includes("mingw")) return false; if (sanitizer === "address") return Sanitizers.address._supported; - if (qbs.toolchain.contains("clang-cl")) { - if (cpp.toolchainInstallPath.contains("Microsoft Visual Studio") + if (qbs.toolchain.includes("clang-cl")) { + if (cpp.toolchainInstallPath.includes("Microsoft Visual Studio") && qbs.architecture === "x86_64") { // 32 bit sanitizer shipped with VS misses the x86_64 libraries return false; @@ -17,9 +17,9 @@ CppApplication { // only these are supported return sanitizer === "address" || sanitizer === "undefined"; } - if (!qbs.toolchain.contains("gcc")) + if (!qbs.toolchain.includes("gcc")) return false; - if (qbs.targetOS.contains("ios")) { + if (qbs.targetOS.includes("ios")) { // thread sanitizer is not supported return sanitizer !== "thread"; } diff --git a/tests/auto/blackbox/testdata/separate-debug-info/separate-debug-info.qbs b/tests/auto/blackbox/testdata/separate-debug-info/separate-debug-info.qbs index 48e70f260..4198b863f 100644 --- a/tests/auto/blackbox/testdata/separate-debug-info/separate-debug-info.qbs +++ b/tests/auto/blackbox/testdata/separate-debug-info/separate-debug-info.qbs @@ -8,10 +8,13 @@ Project { Probe { id: osProbe property stringList targetOS: qbs.targetOS + property stringList toolchain: qbs.toolchain configure: { - console.info("is windows: " + (targetOS.contains("windows") ? "yes" : "no")); - console.info("is macos: " + (targetOS.contains("macos") ? "yes" : "no")); - console.info("is darwin: " + (targetOS.contains("darwin") ? "yes" : "no")); + console.info("is windows: " + (targetOS.includes("windows") ? "yes" : "no")); + console.info("is macos: " + (targetOS.includes("macos") ? "yes" : "no")); + console.info("is darwin: " + (targetOS.includes("darwin") ? "yes" : "no")); + console.info("is gcc: " + (toolchain.includes("gcc") ? "yes" : "no")); + console.info("is msvc: " + (toolchain.includes("msvc") ? "yes" : "no")); } } } @@ -55,7 +58,7 @@ Project { files: ["main.cpp"] cpp.separateDebugInformation: true Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.dsymutilFlags: ["--flat"] } } @@ -66,7 +69,7 @@ Project { files: ["foo.cpp"] cpp.separateDebugInformation: true Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.dsymutilFlags: ["--flat"] } } @@ -76,7 +79,7 @@ Project { files: ["foo.cpp"] cpp.separateDebugInformation: true Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.dsymutilFlags: ["--flat"] } } @@ -94,7 +97,7 @@ Project { type: ["dynamiclibrary"] files: ["foo.cpp"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } cpp.separateDebugInformation: true @@ -104,7 +107,7 @@ Project { name: "bar4" files: ["foo.cpp"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } cpp.separateDebugInformation: true @@ -115,12 +118,12 @@ Project { type: ["application"] files: ["main.cpp"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } cpp.separateDebugInformation: true Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.dsymutilFlags: ["--flat"] } } @@ -130,12 +133,12 @@ Project { type: ["dynamiclibrary"] files: ["foo.cpp"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } cpp.separateDebugInformation: true Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.dsymutilFlags: ["--flat"] } } @@ -144,12 +147,12 @@ Project { name: "bar5" files: ["foo.cpp"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } cpp.separateDebugInformation: true Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.dsymutilFlags: ["--flat"] } } 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 02f5ec7b1..b1310c005 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 @@ -8,13 +8,13 @@ Project { files: ["lib1.cpp"] - install: !qbs.targetOS.contains("darwin") + install: !qbs.targetOS.includes("darwin") installImportLib: true installDir: "lib1" importLibInstallDir: installDir Group { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") fileTagsFilter: ["bundle.content"] qbs.install: true qbs.installSourceBase: destinationDirectory @@ -27,7 +27,7 @@ Project { Depends { name: "lib5" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } @@ -41,7 +41,7 @@ Project { files: ["lib3.cpp"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } @@ -58,14 +58,14 @@ Project { files: ["lib4.cpp"] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } // 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: Host.os().contains("windows") && qbs.toolchain.contains("clang") + condition: Host.os().includes("windows") && qbs.toolchain.includes("clang") cpp.dynamicLibraryPrefix: "lib" cpp.dynamicLibraryImportSuffix: ".a" } @@ -83,7 +83,7 @@ Project { Depends { name: "cpp" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } @@ -108,7 +108,7 @@ Project { property string fullInstallPrefix: FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix) property string lib3FilePath: FileInfo.joinPaths(fullInstallPrefix, "lib3", - cpp.dynamicLibraryPrefix + "lib3" + (qbs.targetOS.contains("windows") + cpp.dynamicLibraryPrefix + "lib3" + (qbs.targetOS.includes("windows") ? cpp.dynamicLibraryImportSuffix : cpp.dynamicLibrarySuffix)) cpp.dynamicLibraries: [lib3FilePath, "lib4"] @@ -117,7 +117,7 @@ Project { Probe { id: osPrinter - property bool isWindows: qbs.targetOS.contains("windows") + property bool isWindows: qbs.targetOS.includes("windows") configure: { console.info("is windows"); found = true; diff --git a/tests/auto/blackbox/testdata/smart-relinking/smart-relinking.qbs b/tests/auto/blackbox/testdata/smart-relinking/smart-relinking.qbs index aac0692a8..29e6c2e17 100644 --- a/tests/auto/blackbox/testdata/smart-relinking/smart-relinking.qbs +++ b/tests/auto/blackbox/testdata/smart-relinking/smart-relinking.qbs @@ -5,7 +5,7 @@ Project { property stringList toolchain: qbs.toolchain property stringList targetOS: qbs.targetOS configure: { - found = toolchain.contains("gcc") && targetOS.contains("unix"); + found = toolchain.includes("gcc") && targetOS.includes("unix"); if (!found) console.info("project disabled"); } diff --git a/tests/auto/blackbox/testdata/source-artifact-changes/source-artifact-changes.qbs b/tests/auto/blackbox/testdata/source-artifact-changes/source-artifact-changes.qbs index de56376df..a53819753 100644 --- a/tests/auto/blackbox/testdata/source-artifact-changes/source-artifact-changes.qbs +++ b/tests/auto/blackbox/testdata/source-artifact-changes/source-artifact-changes.qbs @@ -4,7 +4,7 @@ CppApplication { consoleApplication: true Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.embedInfoPlist: false } @@ -12,7 +12,7 @@ CppApplication { id: toolchainProbe property stringList toolchain: qbs.toolchain configure: { - console.info("is gcc: " + toolchain.contains("gcc")); + console.info("is gcc: " + toolchain.includes("gcc")); found = true; } } diff --git a/tests/auto/blackbox/testdata/static-lib-without-sources/static-lib-without-sources.qbs b/tests/auto/blackbox/testdata/static-lib-without-sources/static-lib-without-sources.qbs index 32a58c94b..54ec5e230 100644 --- a/tests/auto/blackbox/testdata/static-lib-without-sources/static-lib-without-sources.qbs +++ b/tests/auto/blackbox/testdata/static-lib-without-sources/static-lib-without-sources.qbs @@ -6,7 +6,7 @@ StaticLibrary { } Product { - type: qbs.targetOS.contains("darwin") ? undefined : ["staticlibrary"] + type: qbs.targetOS.includes("darwin") ? undefined : ["staticlibrary"] name: "b" Depends { name: "cpp" } Depends { name: "a" } diff --git a/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs b/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs index 086a9455b..49bcd9951 100644 --- a/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs +++ b/tests/auto/blackbox/testdata/symbolLinkMode/symbolLinkMode.qbs @@ -16,7 +16,7 @@ Project { Depends { name: "functions"; cpp.symbolLinkMode: product.symbolLinkMode - cpp.link: !(product.qbs.targetOS.contains("linux") && product.symbolLinkMode === "weak") + cpp.link: !(product.qbs.targetOS.includes("linux") && product.symbolLinkMode === "weak") } property string symbolLinkMode: project.lazy ? "lazy" : "weak" @@ -27,7 +27,7 @@ Project { property string installLib: "SHOULD_INSTALL_LIB=" + project.shouldInstallLibrary cpp.defines: { if (symbolLinkMode === "weak") { - return qbs.targetOS.contains("darwin") + return qbs.targetOS.includes("darwin") ? ["WEAK_IMPORT=__attribute__((weak_import))", installLib] : ["WEAK_IMPORT=__attribute__((weak))", installLib]; } @@ -49,7 +49,7 @@ Project { Depends { name: "indirect"; cpp.symbolLinkMode: "reexport" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } name: "functions" @@ -59,7 +59,7 @@ Project { cpp.rpaths: [cpp.rpathOrigin] Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") cpp.sonamePrefix: "@rpath" } @@ -72,7 +72,7 @@ Project { Export { // let the autotest pass on Linux where reexport is not supported - Depends { name: "indirect"; condition: !qbs.targetOS.contains("darwin") } + Depends { name: "indirect"; condition: !qbs.targetOS.includes("darwin") } // on Linux, there is no LC_WEAK_LOAD_DYLIB equivalent (the library is simply omitted // from the list of load commands entirely), so use LD_PRELOAD to emulate @@ -91,7 +91,7 @@ Project { Depends { name: "cpp" } Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") bundle.isBundle: false } name: "indirect" @@ -100,7 +100,7 @@ Project { cpp.minimumMacosVersion: "10.7" Properties { - condition: qbs.targetOS.contains("darwin") + condition: qbs.targetOS.includes("darwin") // reexport is incompatible with rpath, // "ERROR: ld: file not found: @rpath/libindirect.dylib for architecture x86_64" cpp.sonamePrefix: qbs.installRoot + "/lib" diff --git a/tests/auto/blackbox/testdata/system-run-paths/system-run-paths.qbs b/tests/auto/blackbox/testdata/system-run-paths/system-run-paths.qbs index 6e2137173..35dd7a00f 100644 --- a/tests/auto/blackbox/testdata/system-run-paths/system-run-paths.qbs +++ b/tests/auto/blackbox/testdata/system-run-paths/system-run-paths.qbs @@ -20,4 +20,9 @@ Project { cpp.rpaths: qbs.installRoot + "/lib" cpp.systemRunPaths: project.setRunPaths ? [qbs.installRoot + "/lib"] : [] } + Probe { + id: checker + property bool isUnix: qbs.targetOS.contains("unix") + configure: { console.info("is unix: " + isUnix); } + } } diff --git a/tests/auto/blackbox/testdata/trackExternalProductChanges/trackExternalProductChanges.qbs b/tests/auto/blackbox/testdata/trackExternalProductChanges/trackExternalProductChanges.qbs index 534f49ff2..0e28e5687 100644 --- a/tests/auto/blackbox/testdata/trackExternalProductChanges/trackExternalProductChanges.qbs +++ b/tests/auto/blackbox/testdata/trackExternalProductChanges/trackExternalProductChanges.qbs @@ -11,4 +11,9 @@ CppApplication { name: "file that needs help from the environment to find a header" files: "including.cpp" } + Probe { + id: checker + property bool isGcc: qbs.toolchain.contains("gcc") + configure: { console.info("is gcc: " + isGcc); } + } } diff --git a/tests/auto/blackbox/testdata/variant-suffix/variant-suffix.qbs b/tests/auto/blackbox/testdata/variant-suffix/variant-suffix.qbs index b6e025e4c..1131e6a2f 100644 --- a/tests/auto/blackbox/testdata/variant-suffix/variant-suffix.qbs +++ b/tests/auto/blackbox/testdata/variant-suffix/variant-suffix.qbs @@ -1,8 +1,8 @@ StaticLibrary { name: "l" - Depends { condition: qbs.targetOS.contains("darwin"); name: "bundle" } - Properties { condition: qbs.targetOS.contains("darwin"); bundle.isBundle: false } + Depends { condition: qbs.targetOS.includes("darwin"); name: "bundle" } + Properties { condition: qbs.targetOS.includes("darwin"); bundle.isBundle: false } aggregate: false property string variantSuffix @@ -31,8 +31,8 @@ StaticLibrary { id: targetOSProbe property stringList targetOS: qbs.targetOS configure: { - console.info("is Windows: " + targetOS.contains("windows")); - console.info("is Apple: " + targetOS.contains("darwin")); + console.info("is Windows: " + targetOS.includes("windows")); + console.info("is Apple: " + targetOS.includes("darwin")); } } } diff --git a/tests/auto/blackbox/testdata/versionscript/versionscript.qbs b/tests/auto/blackbox/testdata/versionscript/versionscript.qbs index cc5c7b1cc..fcb4314a2 100644 --- a/tests/auto/blackbox/testdata/versionscript/versionscript.qbs +++ b/tests/auto/blackbox/testdata/versionscript/versionscript.qbs @@ -20,6 +20,12 @@ DynamicLibrary { return [cmd]; } } + Probe { + id: checker + property bool isLinux: qbs.targetOS.includes("linux") + property bool isGcc: qbs.toolchain.contains("gcc") + configure: { console.info("is gcc for Linux: " + (isLinux && isGcc)); } + } qbs.installPrefix: "" install: true diff --git a/tests/auto/blackbox/testdata/whole-archive/whole-archive.qbs b/tests/auto/blackbox/testdata/whole-archive/whole-archive.qbs index f3bcff2cd..c138e46c0 100644 --- a/tests/auto/blackbox/testdata/whole-archive/whole-archive.qbs +++ b/tests/auto/blackbox/testdata/whole-archive/whole-archive.qbs @@ -32,7 +32,8 @@ Project { property string compilerVersion: cpp.compilerVersion property string dummy: product.linkWholeArchive // To force probe re-execution configure: { - if (!toolchain.contains("msvc") + if (!toolchain.includes("msvc") + || toolchain.includes("clang-cl") || Utilities.versionCompare(compilerVersion, "19.0.24215.1") >= 0) { console.info("can link whole archives"); } else { diff --git a/tests/auto/blackbox/testdata/concurrent-executor/dummy2.input b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/nonrecursive/subdir1/file.txt index e69de29bb..e69de29bb 100644 --- a/tests/auto/blackbox/testdata/concurrent-executor/dummy2.input +++ b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/nonrecursive/subdir1/file.txt diff --git a/tests/auto/blackbox/testdata/wildcards-and-change-tracking/nonrecursive/subdir2/file.txt b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/nonrecursive/subdir2/file.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/nonrecursive/subdir2/file.txt diff --git a/tests/auto/blackbox/testdata/wildcards-and-change-tracking/recursive1/recursive.txt b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/recursive1/recursive.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/recursive1/recursive.txt diff --git a/tests/auto/blackbox/testdata/wildcards-and-change-tracking/recursive2/recursive.txt b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/recursive2/recursive.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/recursive2/recursive.txt diff --git a/tests/auto/blackbox/testdata/wildcards-and-change-tracking/wildcards-and-change-tracking.qbs b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/wildcards-and-change-tracking.qbs new file mode 100644 index 000000000..0a889bab3 --- /dev/null +++ b/tests/auto/blackbox/testdata/wildcards-and-change-tracking/wildcards-and-change-tracking.qbs @@ -0,0 +1,16 @@ +Product { + Group { + name: "recursive" + files: "**/file.txt" + } + Group { + name: "directories" + prefix: "nonrecursive/" + files: "subdi?/file.txt" + } + Group { + prefix: "nonrecursive/empty/" + name: "no files" + files: "*.txt" + } +} |