aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/testdata')
-rw-r--r--tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs20
-rw-r--r--tests/auto/blackbox/testdata/autotest-timeout/test-main.cpp37
-rw-r--r--tests/auto/blackbox/testdata/autotest-with-dependencies/autotest-with-dependencies.qbs4
-rw-r--r--tests/auto/blackbox/testdata/autotests/autotests.qbs7
-rw-r--r--tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs17
-rw-r--r--tests/auto/blackbox/testdata/separate-debug-info/separate-debug-info.qbs9
-rw-r--r--tests/auto/blackbox/testdata/setup-run-environment/setup-run-environment.qbs15
7 files changed, 106 insertions, 3 deletions
diff --git a/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs b/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs
new file mode 100644
index 000000000..49ee35d3a
--- /dev/null
+++ b/tests/auto/blackbox/testdata/autotest-timeout/autotests-timeout.qbs
@@ -0,0 +1,20 @@
+Project {
+ CppApplication {
+ name: "testApp"
+ type: ["application", "autotest"]
+ Depends { name: "autotest" }
+ cpp.cxxLanguageVersion: "c++11"
+ cpp.minimumOsxVersion: "10.8" // For <chrono>
+ Properties {
+ condition: qbs.toolchain.contains("gcc")
+ cpp.driverFlags: "-pthread"
+ }
+ files: "test-main.cpp"
+ }
+ AutotestRunner {
+ Depends {
+ name: "cpp" // Make sure build environment is set up properly.
+ condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ }
+ }
+}
diff --git a/tests/auto/blackbox/testdata/autotest-timeout/test-main.cpp b/tests/auto/blackbox/testdata/autotest-timeout/test-main.cpp
new file mode 100644
index 000000000..4bb1ca27c
--- /dev/null
+++ b/tests/auto/blackbox/testdata/autotest-timeout/test-main.cpp
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Jochen Ulrich <jochenulrich@t-online.de>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qbs.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <chrono>
+#include <thread>
+
+int main()
+{
+ std::this_thread::sleep_for(std::chrono::seconds(5));
+ return 0;
+}
+
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 92d5ec6dd..7ae6cef73 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
@@ -21,6 +21,10 @@ Project {
}
AutotestRunner {
+ Depends {
+ name: "cpp" // Make sure build environment is set up properly.
+ condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ }
arguments: FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, "bin")
auxiliaryInputs: "test-helper"
}
diff --git a/tests/auto/blackbox/testdata/autotests/autotests.qbs b/tests/auto/blackbox/testdata/autotests/autotests.qbs
index a2c2646dc..10334156e 100644
--- a/tests/auto/blackbox/testdata/autotests/autotests.qbs
+++ b/tests/auto/blackbox/testdata/autotests/autotests.qbs
@@ -1,4 +1,9 @@
Project {
references: ["test1", "test2", "test3"]
- AutotestRunner {}
+ AutotestRunner {
+ Depends {
+ name: "cpp" // Make sure build environment is set up properly.
+ condition: qbs.hostOS.contains("windows") && qbs.toolchain.contains("gcc")
+ }
+ }
}
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 61f76f4be..6cd334247 100644
--- a/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs
+++ b/tests/auto/blackbox/testdata/lexyacc/one-grammar/one-grammar.qbs
@@ -8,6 +8,23 @@ CppApplication {
cpp.cxxLanguageVersion: "c++11"
cpp.minimumMacosVersion: "10.7"
consoleApplication: true
+ Probe {
+ id: pathCheck
+ property string theDir: {
+ if (qbs.targetOS.contains("windows")) {
+ if (qbs.toolchain.contains("mingw"))
+ return cpp.toolchainInstallPath;
+ if (qbs.toolchain.contains("clang") && qbs.sysroot)
+ return qbs.sysroot + "/bin";
+ }
+ }
+ configure: {
+ if (theDir)
+ console.info("add to PATH: " + theDir);
+ found = true;
+ }
+ }
+
files: [
"lexer.l",
"parser.y",
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 48bdff904..0b16d1984 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
@@ -4,6 +4,15 @@ Project {
type: ["application"]
files: ["main.cpp"]
cpp.separateDebugInformation: true
+
+ Probe {
+ id: osProbe
+ property stringList targetOS: qbs.targetOS
+ configure: {
+ console.info("is windows: " + (targetOS.contains("windows") ? "yes" : "no"));
+ console.info("is darwin: " + (targetOS.contains("darwin") ? "yes" : "no"));
+ }
+ }
}
DynamicLibrary {
Depends { name: "cpp" }
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 b5ac8b289..d2d47b767 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
@@ -61,6 +61,16 @@ Project {
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: qbs.hostOS.contains("windows") && qbs.toolchain.contains("clang")
+ cpp.dynamicLibraryPrefix: "lib"
+ cpp.dynamicLibraryImportSuffix: ".a"
+ }
+ cpp.dynamicLibraryPrefix: original
+ cpp.dynamicLibraryImportSuffix: original
+
install: true
installImportLib: true
installDir: "lib4"
@@ -91,8 +101,9 @@ Project {
property string fullInstallPrefix: FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix)
property string lib3FilePath: FileInfo.joinPaths(fullInstallPrefix, "lib3",
- cpp.dynamicLibraryPrefix + "lib3" + (qbs.toolchain.contains("msvc")
- ? ".lib" : cpp.dynamicLibrarySuffix))
+ cpp.dynamicLibraryPrefix + "lib3" + (qbs.targetOS.contains("windows")
+ ? cpp.dynamicLibraryImportSuffix
+ : cpp.dynamicLibrarySuffix))
cpp.dynamicLibraries: [lib3FilePath, "lib4"]
cpp.libraryPaths: FileInfo.joinPaths(fullInstallPrefix, "lib4")
}