aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qtcreator.qbs2
-rw-r--r--src/libs/QtcLibrary.qbs1
-rw-r--r--src/plugins/QtcPlugin.qbs1
-rw-r--r--tests/auto/aggregation/aggregation.qbs8
-rw-r--r--tests/auto/auto.qbs26
-rw-r--r--tests/auto/autotest.qbs30
-rw-r--r--tests/auto/changeset/changeset.qbs9
-rw-r--r--tests/auto/cplusplus/ast/ast.qbs7
-rw-r--r--tests/auto/cplusplus/checksymbols/checksymbols.qbs7
-rw-r--r--tests/auto/cplusplus/codeformatter/codeformatter.qbs7
-rw-r--r--tests/auto/cplusplus/cplusplus.qbs19
-rw-r--r--tests/auto/cplusplus/cplusplusautotest.qbs9
-rw-r--r--tests/auto/cplusplus/cxx11/cxx11.qbs26
-rw-r--r--tests/auto/cplusplus/findusages/findusages.qbs7
-rw-r--r--tests/auto/cplusplus/lexer/lexer.qbs7
-rw-r--r--tests/auto/cplusplus/lookup/lookup.qbs7
-rw-r--r--tests/auto/cplusplus/misc/misc.qbs7
-rw-r--r--tests/auto/cplusplus/preprocessor/preprocessor.qbs36
-rw-r--r--tests/auto/cplusplus/semantic/semantic.qbs7
-rw-r--r--tests/auto/cplusplus/simplifytypes/simplifytypes.qbs7
-rw-r--r--tests/auto/cplusplus/typeprettyprinter/typeprettyprinter.qbs7
-rw-r--r--tests/auto/debugger/debugger.qbs11
-rw-r--r--tests/auto/debugger/dumpers.qbs35
-rw-r--r--tests/auto/debugger/gdb.qbs17
-rw-r--r--tests/auto/debugger/namedemangler.qbs16
-rw-r--r--tests/auto/diff/diff.qbs6
-rw-r--r--tests/auto/diff/differ/differ.qbs9
-rw-r--r--tests/auto/environment/environment.qbs9
-rw-r--r--tests/auto/extensionsystem/copytransformer.qbs26
-rw-r--r--tests/auto/extensionsystem/extensionsystem.qbs9
-rw-r--r--tests/auto/extensionsystem/plugin.qbs24
-rw-r--r--tests/auto/extensionsystem/pluginmanager/circularplugins/circularplugins.qbs10
-rw-r--r--tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.qbs9
-rw-r--r--tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.qbs9
-rw-r--r--tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.qbs9
-rw-r--r--tests/auto/extensionsystem/pluginmanager/correctplugins1/correctplugins1.qbs10
-rw-r--r--tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.qbs15
-rw-r--r--tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.qbs9
-rw-r--r--tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.qbs11
-rw-r--r--tests/auto/extensionsystem/pluginmanager/pluginmanager.qbs10
-rw-r--r--tests/auto/extensionsystem/pluginmanager/test.qbs34
-rw-r--r--tests/auto/extensionsystem/pluginspec/pluginspec.qbs6
-rw-r--r--tests/auto/extensionsystem/pluginspec/test.qbs63
-rw-r--r--tests/auto/extensionsystem/pluginspec/testplugin/testplugin.qbs12
-rw-r--r--tests/auto/externaltool/externaltool.qbs131
-rw-r--r--tests/auto/filesearch/filesearch.qbs13
-rw-r--r--tests/auto/generichighlighter/generichighlighter.qbs11
-rw-r--r--tests/auto/generichighlighter/highlighterengine/highlighterengine.qbs47
-rw-r--r--tests/auto/generichighlighter/specificrules/specificrules.qbs27
-rw-r--r--tests/auto/ioutils/ioutils.qbs16
-rw-r--r--tests/auto/profilewriter/profilewriter.qbs29
-rw-r--r--tests/auto/qml/codemodel/check/check.qbs16
-rw-r--r--tests/auto/qml/codemodel/codemodel.qbs6
-rw-r--r--tests/auto/qml/qml.qbs14
-rw-r--r--tests/auto/qml/qmleditor/qmlcodeformatter/qmlcodeformatter.qbs12
-rw-r--r--tests/auto/qml/qmleditor/qmleditor.qbs6
-rw-r--r--tests/auto/qml/qmljssimplereader/qmljssimplereader.qbs11
-rw-r--r--tests/auto/qml/qmlprojectmanager/fileformat/fileformat.qbs14
-rw-r--r--tests/auto/qml/qmlprojectmanager/qmlprojectmanager.qbs7
-rw-r--r--tests/auto/qml/qrcparser/qrcparser.qbs10
-rw-r--r--tests/auto/qml/reformatter/reformatter.qbs15
-rw-r--r--tests/auto/qtcprocess/qtcprocess.qbs13
-rw-r--r--tests/auto/treeviewfind/treeviewfind.qbs9
-rw-r--r--tests/auto/utils/fileutils/fileutils.qbs13
-rw-r--r--tests/auto/utils/utils.qbs6
-rw-r--r--tests/auto/utils_stringutils/utils_stringutils.qbs9
-rw-r--r--tests/auto/valgrind/callgrind/callgrind.qbs6
-rw-r--r--tests/auto/valgrind/callgrind/callgrindparsertests.qbs16
-rw-r--r--tests/auto/valgrind/memcheck/memcheck.qbs11
-rw-r--r--tests/auto/valgrind/memcheck/modeldemo.qbs17
-rw-r--r--tests/auto/valgrind/memcheck/parsertests.qbs17
-rw-r--r--tests/auto/valgrind/memcheck/testapps/free1/free1.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/free2/free2.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/invalidjump/invalidjump.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/leak1/leak1.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/leak2/leak2.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/leak3/leak3.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/leak4/leak4.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/overlap/overlap.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/syscall/syscall.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/testapp.qbs9
-rw-r--r--tests/auto/valgrind/memcheck/testapps/testapps.qbs19
-rw-r--r--tests/auto/valgrind/memcheck/testapps/uninit1/uninit1.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/uninit2/uninit2.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testapps/uninit3/uninit3.qbs4
-rw-r--r--tests/auto/valgrind/memcheck/testrunner.qbs28
-rw-r--r--tests/auto/valgrind/valgrind.qbs10
-rw-r--r--tests/tests.qbs6
88 files changed, 1228 insertions, 0 deletions
diff --git a/qtcreator.qbs b/qtcreator.qbs
index deb1e82391..3e1d842900 100644
--- a/qtcreator.qbs
+++ b/qtcreator.qbs
@@ -1,6 +1,7 @@
import qbs.base 1.0
Project {
+ property bool withAutotests: qbs.buildVariant === "debug"
property string ide_version_major: '2'
property string ide_version_minor: '8'
property string ide_version_release: '81'
@@ -55,5 +56,6 @@ Project {
"lib/qtcreator/qtcomponents/qtcomponents.qbs",
"share/share.qbs",
"share/qtcreator/translations/translations.qbs",
+ "tests/tests.qbs"
]
}
diff --git a/src/libs/QtcLibrary.qbs b/src/libs/QtcLibrary.qbs
index 45020f4c8e..50301ae962 100644
--- a/src/libs/QtcLibrary.qbs
+++ b/src/libs/QtcLibrary.qbs
@@ -9,6 +9,7 @@ DynamicLibrary {
}
targetName: Defaults.qtLibraryName(qbs, name)
+ destinationDirectory: project.ide_library_path
cpp.defines: project.generalDefines
cpp.linkerFlags: {
diff --git a/src/plugins/QtcPlugin.qbs b/src/plugins/QtcPlugin.qbs
index 0ddd27c8aa..ea4a785934 100644
--- a/src/plugins/QtcPlugin.qbs
+++ b/src/plugins/QtcPlugin.qbs
@@ -9,6 +9,7 @@ Product {
property var pluginRecommends: []
targetName: Defaults.qtLibraryName(qbs, name)
+ destinationDirectory: project.ide_plugin_path + '/' + provider
Depends { name: "ExtensionSystem" }
Depends { name: "pluginspec" }
diff --git a/tests/auto/aggregation/aggregation.qbs b/tests/auto/aggregation/aggregation.qbs
new file mode 100644
index 0000000000..e1dc9c8fe1
--- /dev/null
+++ b/tests/auto/aggregation/aggregation.qbs
@@ -0,0 +1,8 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Aggregation autotest"
+ Depends { name: "Aggregation" }
+ files: "tst_aggregate.cpp"
+}
diff --git a/tests/auto/auto.qbs b/tests/auto/auto.qbs
new file mode 100644
index 0000000000..07d8f63d23
--- /dev/null
+++ b/tests/auto/auto.qbs
@@ -0,0 +1,26 @@
+import qbs
+
+Project {
+ name: "Autotests"
+ condition: project.withAutotests
+ references: [
+ "aggregation/aggregation.qbs",
+ "changeset/changeset.qbs",
+ "cplusplus/cplusplus.qbs",
+ "debugger/debugger.qbs",
+ "diff/diff.qbs",
+ "environment/environment.qbs",
+ "extensionsystem/extensionsystem.qbs",
+ "externaltool/externaltool.qbs",
+ "filesearch/filesearch.qbs",
+ "generichighlighter/generichighlighter.qbs",
+ "ioutils/ioutils.qbs",
+ "profilewriter/profilewriter.qbs",
+ "qml/qml.qbs",
+ "qtcprocess/qtcprocess.qbs",
+ "treeviewfind/treeviewfind.qbs",
+ "utils/utils.qbs",
+ "utils_stringutils/utils_stringutils.qbs",
+ "valgrind/valgrind.qbs"
+ ]
+}
diff --git a/tests/auto/autotest.qbs b/tests/auto/autotest.qbs
new file mode 100644
index 0000000000..9625b10b29
--- /dev/null
+++ b/tests/auto/autotest.qbs
@@ -0,0 +1,30 @@
+import qbs
+import qbs.FileInfo
+
+CppApplication {
+ type: "application"
+ Depends { name: "Qt.test" }
+ targetName: "tst_" + name.split(' ').join("")
+
+ // This needs to be absolute, because it is passed to one of the source files.
+ destinationDirectory: buildDirectory + '/'
+ + FileInfo.relativePath(project.ide_source_tree, sourceDirectory)
+
+ cpp.rpaths: [
+ buildDirectory + '/' + project.ide_library_path,
+ buildDirectory + '/' + project.ide_library_path + "/..", // OSX
+ buildDirectory + '/' + project.ide_plugin_path + "/QtProject"
+ ]
+
+ // The following would be conceptually right, but does not work currently as some autotests
+ // (e.g. extensionsystem) do not work when installed, because they want hardcoded
+ // absolute paths to resources in the build directory.
+// cpp.rpaths: qbs.targetOS.contains("osx")
+// ? ["@executable_path/.."]
+// : ["$ORIGIN/../lib/qtcreator", "$ORIGIN/../lib/qtcreator/plugins/QtProject"]
+// Group {
+// fileTagsFilter: product.type
+// qbs.install: true
+// qbs.installDir: project.ide_bin_path
+// }
+}
diff --git a/tests/auto/changeset/changeset.qbs b/tests/auto/changeset/changeset.qbs
new file mode 100644
index 0000000000..f1f8f00cf2
--- /dev/null
+++ b/tests/auto/changeset/changeset.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "ChangeSet autotest"
+ Depends { name: "Utils" }
+ Depends { name: "Qt.gui" } // TODO: Remove once qbs bug is fixed.
+ files: "tst_changeset.cpp"
+}
diff --git a/tests/auto/cplusplus/ast/ast.qbs b/tests/auto/cplusplus/ast/ast.qbs
new file mode 100644
index 0000000000..9858056caa
--- /dev/null
+++ b/tests/auto/cplusplus/ast/ast.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus AST autotest"
+ files: "tst_ast.cpp"
+}
diff --git a/tests/auto/cplusplus/checksymbols/checksymbols.qbs b/tests/auto/cplusplus/checksymbols/checksymbols.qbs
new file mode 100644
index 0000000000..f03bacba9b
--- /dev/null
+++ b/tests/auto/cplusplus/checksymbols/checksymbols.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus check symbols autotest"
+ files: "tst_checksymbols.cpp"
+}
diff --git a/tests/auto/cplusplus/codeformatter/codeformatter.qbs b/tests/auto/cplusplus/codeformatter/codeformatter.qbs
new file mode 100644
index 0000000000..3527f345a8
--- /dev/null
+++ b/tests/auto/cplusplus/codeformatter/codeformatter.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus code formatter autotest"
+ files: "tst_codeformatter.cpp"
+}
diff --git a/tests/auto/cplusplus/cplusplus.qbs b/tests/auto/cplusplus/cplusplus.qbs
new file mode 100644
index 0000000000..0c64daffb2
--- /dev/null
+++ b/tests/auto/cplusplus/cplusplus.qbs
@@ -0,0 +1,19 @@
+import qbs
+
+Project {
+ name: "CPlusPlus autotests"
+ references: [
+ "ast/ast.qbs",
+ "checksymbols/checksymbols.qbs",
+ "codeformatter/codeformatter.qbs",
+ "cxx11/cxx11.qbs",
+ "findusages/findusages.qbs",
+ "lexer/lexer.qbs",
+ "lookup/lookup.qbs",
+ "misc/misc.qbs",
+ "preprocessor/preprocessor.qbs",
+ "semantic/semantic.qbs",
+ "simplifytypes/simplifytypes.qbs",
+ "typeprettyprinter/typeprettyprinter.qbs"
+ ]
+}
diff --git a/tests/auto/cplusplus/cplusplusautotest.qbs b/tests/auto/cplusplus/cplusplusautotest.qbs
new file mode 100644
index 0000000000..487f02128c
--- /dev/null
+++ b/tests/auto/cplusplus/cplusplusautotest.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ Depends { name: "CppTools" }
+ Depends { name: "TextEditor" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // For QTextDocument & friends
+}
diff --git a/tests/auto/cplusplus/cxx11/cxx11.qbs b/tests/auto/cplusplus/cxx11/cxx11.qbs
new file mode 100644
index 0000000000..d62a6f49fb
--- /dev/null
+++ b/tests/auto/cplusplus/cxx11/cxx11.qbs
@@ -0,0 +1,26 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "Cxx11 autotest"
+ Group {
+ name: "Source Files"
+ files: "tst_cxx11.cpp"
+ }
+
+ Group {
+ name: "Data Files"
+ prefix: "data/"
+ fileTags: ["data"]
+ files: [
+ "inlineNamespace.1.cpp",
+ "inlineNamespace.1.errors.txt",
+ "staticAssert.1.cpp",
+ "staticAssert.1.errors.txt",
+ "noExcept.1.cpp",
+ "noExcept.1.errors.txt"
+ ]
+ }
+
+ cpp.defines: base.concat(['SRCDIR="' + path + '"'])
+}
diff --git a/tests/auto/cplusplus/findusages/findusages.qbs b/tests/auto/cplusplus/findusages/findusages.qbs
new file mode 100644
index 0000000000..4aa0c8f250
--- /dev/null
+++ b/tests/auto/cplusplus/findusages/findusages.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus find usages autotest"
+ files: "tst_findusages.cpp"
+}
diff --git a/tests/auto/cplusplus/lexer/lexer.qbs b/tests/auto/cplusplus/lexer/lexer.qbs
new file mode 100644
index 0000000000..114af60e60
--- /dev/null
+++ b/tests/auto/cplusplus/lexer/lexer.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus lexer autotest"
+ files: "tst_lexer.cpp"
+}
diff --git a/tests/auto/cplusplus/lookup/lookup.qbs b/tests/auto/cplusplus/lookup/lookup.qbs
new file mode 100644
index 0000000000..02a08720cf
--- /dev/null
+++ b/tests/auto/cplusplus/lookup/lookup.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus lookup autotest"
+ files: "tst_lookup.cpp"
+}
diff --git a/tests/auto/cplusplus/misc/misc.qbs b/tests/auto/cplusplus/misc/misc.qbs
new file mode 100644
index 0000000000..2eea7b9ac7
--- /dev/null
+++ b/tests/auto/cplusplus/misc/misc.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus miscellaneous autotest"
+ files: "tst_misc.cpp"
+}
diff --git a/tests/auto/cplusplus/preprocessor/preprocessor.qbs b/tests/auto/cplusplus/preprocessor/preprocessor.qbs
new file mode 100644
index 0000000000..cd525c9c84
--- /dev/null
+++ b/tests/auto/cplusplus/preprocessor/preprocessor.qbs
@@ -0,0 +1,36 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus preprocessor autotest"
+ Group {
+ name: "Source Files"
+ files: "tst_preprocessor.cpp"
+ }
+
+ Group {
+ name: "Data files"
+ prefix: "data/"
+ fileTags: ["data"]
+ files: [
+ "empty-macro.cpp", "empty-macro.out.cpp",
+ "empty-macro.2.cpp", "empty-macro.2.out.cpp",
+ "identifier-expansion.1.cpp", "identifier-expansion.1.out.cpp",
+ "identifier-expansion.2.cpp", "identifier-expansion.2.out.cpp",
+ "identifier-expansion.3.cpp", "identifier-expansion.3.out.cpp",
+ "identifier-expansion.4.cpp", "identifier-expansion.4.out.cpp",
+ "identifier-expansion.5.cpp", "identifier-expansion.5.out.cpp",
+ "macro_expand.c", "macro_expand.out.c",
+ "macro_expand_1.cpp", "macro_expand_1.out.cpp",
+ "macro-test.cpp", "macro-test.out.cpp",
+ "macro_pounder_fn.c",
+ "noPP.1.cpp",
+ "noPP.2.cpp",
+ "poundpound.1.cpp", "poundpound.1.out.cpp",
+ "recursive.1.cpp", "recursive.1.out.cpp",
+ "reserved.1.cpp", "reserved.1.out.cpp",
+ ]
+ }
+
+ cpp.defines: base.concat(['SRCDIR="' + path + '"'])
+}
diff --git a/tests/auto/cplusplus/semantic/semantic.qbs b/tests/auto/cplusplus/semantic/semantic.qbs
new file mode 100644
index 0000000000..c12e02d393
--- /dev/null
+++ b/tests/auto/cplusplus/semantic/semantic.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus semantic autotest"
+ files: "tst_semantic.cpp"
+}
diff --git a/tests/auto/cplusplus/simplifytypes/simplifytypes.qbs b/tests/auto/cplusplus/simplifytypes/simplifytypes.qbs
new file mode 100644
index 0000000000..877a79e7a8
--- /dev/null
+++ b/tests/auto/cplusplus/simplifytypes/simplifytypes.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus simplify types autotest"
+ files: "tst_simplifytypestest.cpp"
+}
diff --git a/tests/auto/cplusplus/typeprettyprinter/typeprettyprinter.qbs b/tests/auto/cplusplus/typeprettyprinter/typeprettyprinter.qbs
new file mode 100644
index 0000000000..7d712467d5
--- /dev/null
+++ b/tests/auto/cplusplus/typeprettyprinter/typeprettyprinter.qbs
@@ -0,0 +1,7 @@
+import qbs
+import "../cplusplusautotest.qbs" as CPlusPlusAutotest
+
+CPlusPlusAutotest {
+ name: "CPlusPlus pretty printer autotest"
+ files: "tst_typeprettyprinter.cpp"
+}
diff --git a/tests/auto/debugger/debugger.qbs b/tests/auto/debugger/debugger.qbs
new file mode 100644
index 0000000000..bd5b373e25
--- /dev/null
+++ b/tests/auto/debugger/debugger.qbs
@@ -0,0 +1,11 @@
+import qbs
+
+Project {
+ name: "Debugger autotests"
+ property path debuggerDir: project.ide_source_tree + "/src/plugins/debugger/"
+ references: [
+ "dumpers.qbs",
+ "gdb.qbs",
+ "namedemangler.qbs"
+ ]
+}
diff --git a/tests/auto/debugger/dumpers.qbs b/tests/auto/debugger/dumpers.qbs
new file mode 100644
index 0000000000..68f2689171
--- /dev/null
+++ b/tests/auto/debugger/dumpers.qbs
@@ -0,0 +1,35 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Debugger dumpers autotest"
+ Depends { name: "CPlusPlus" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // For QTextDocument
+ Depends { name: "Qt.network" } // For QHostAddress
+ Group {
+ name: "Sources from Debugger plugin"
+ prefix: project.debuggerDir
+ files: [
+ "debuggerprotocol.h", "debuggerprotocol.cpp",
+ "watchdata.h", "watchdata.cpp",
+ "watchutils.h", "watchutils.cpp"
+ ]
+ }
+
+ Group {
+ name: "Test sources"
+ files: [
+ "temporarydir.h",
+ "tst_dumpers.cpp"
+ ]
+ }
+
+ cpp.defines: base.concat([
+ 'CDBEXT_PATH="' + buildDirectory + '\\\\lib"',
+ 'DUMPERDIR="' + path + '/../../../share/qtcreator/dumper"',
+ 'QT_NO_CAST_FROM_ASCII',
+ 'QT_DISABLE_DEPRECATED_BEFORE=0x040900'
+ ])
+ cpp.includePaths: base.concat([project.debuggerDir])
+}
diff --git a/tests/auto/debugger/gdb.qbs b/tests/auto/debugger/gdb.qbs
new file mode 100644
index 0000000000..159729652a
--- /dev/null
+++ b/tests/auto/debugger/gdb.qbs
@@ -0,0 +1,17 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "gdb autotest"
+ Depends { name: "Qt.network" } // For QHostAddress
+ Group {
+ name: "Sources from Debugger plugin"
+ prefix: project.debuggerDir
+ files: "debuggerprotocol.cpp"
+ }
+ Group {
+ name: "Test sources"
+ files: "tst_gdb.cpp"
+ }
+ cpp.includePaths: base.concat([project.debuggerDir])
+}
diff --git a/tests/auto/debugger/namedemangler.qbs b/tests/auto/debugger/namedemangler.qbs
new file mode 100644
index 0000000000..c7e03a5cdd
--- /dev/null
+++ b/tests/auto/debugger/namedemangler.qbs
@@ -0,0 +1,16 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Name demangler autotest"
+ Group {
+ name: "Sources from Debugger plugin"
+ prefix: project.debuggerDir + "namedemangler/"
+ files: ["*.h", "*.cpp"]
+ }
+ Group {
+ name: "Test sources"
+ files: "tst_namedemangler.cpp"
+ }
+ cpp.includePaths: base.concat([project.debuggerDir])
+}
diff --git a/tests/auto/diff/diff.qbs b/tests/auto/diff/diff.qbs
new file mode 100644
index 0000000000..1c65583b44
--- /dev/null
+++ b/tests/auto/diff/diff.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Project {
+ name: "Diff autotests"
+ references: ["differ/differ.qbs"]
+}
diff --git a/tests/auto/diff/differ/differ.qbs b/tests/auto/diff/differ/differ.qbs
new file mode 100644
index 0000000000..2f678a6e1f
--- /dev/null
+++ b/tests/auto/diff/differ/differ.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Differ autotest"
+ Depends { name: "DiffEditor" }
+ Depends { name: "Qt.widgets" } // For QTextDocument
+ files: "tst_differ.cpp"
+}
diff --git a/tests/auto/environment/environment.qbs b/tests/auto/environment/environment.qbs
new file mode 100644
index 0000000000..b169e290d8
--- /dev/null
+++ b/tests/auto/environment/environment.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Environment autotest"
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // TODO: qbs bug, remove when fixed
+ files: "tst_environment.cpp"
+}
diff --git a/tests/auto/extensionsystem/copytransformer.qbs b/tests/auto/extensionsystem/copytransformer.qbs
new file mode 100644
index 0000000000..fc0d7856af
--- /dev/null
+++ b/tests/auto/extensionsystem/copytransformer.qbs
@@ -0,0 +1,26 @@
+import qbs
+import qbs.File
+import qbs.FileInfo
+
+Transformer {
+ property pathList sourceFiles
+ property path targetDirectory
+ inputs: sourceFiles
+ Artifact { fileName: targetDirectory }
+ prepare: {
+ var commands = []
+ for (var tag in inputs) {
+ for (var index in inputs[tag]) {
+ var artifact = inputs[tag][index];
+ var cmd = new JavaScriptCommand();
+ cmd.sourceFile = artifact.fileName;
+ cmd.description = "Copying '" + cmd.sourceFile + "' to '" + output.fileName + "/'.";
+ cmd.highlight = "codegen";
+ cmd.targetFilePath = output.fileName + '/' + FileInfo.fileName(cmd.sourceFile);
+ cmd.sourceCode = function() { File.copy(sourceFile, targetFilePath); }
+ commands.push(cmd);
+ }
+ }
+ return commands;
+ }
+}
diff --git a/tests/auto/extensionsystem/extensionsystem.qbs b/tests/auto/extensionsystem/extensionsystem.qbs
new file mode 100644
index 0000000000..a6e484c0e3
--- /dev/null
+++ b/tests/auto/extensionsystem/extensionsystem.qbs
@@ -0,0 +1,9 @@
+import qbs
+
+Project {
+ name: "ExtensionSystem autotests"
+ references: [
+ "pluginmanager/pluginmanager.qbs",
+ "pluginspec/pluginspec.qbs"
+ ]
+}
diff --git a/tests/auto/extensionsystem/plugin.qbs b/tests/auto/extensionsystem/plugin.qbs
new file mode 100644
index 0000000000..2d285cb890
--- /dev/null
+++ b/tests/auto/extensionsystem/plugin.qbs
@@ -0,0 +1,24 @@
+import qbs
+import qbs.File
+import qbs.FileInfo
+import "./copytransformer.qbs" as CopyTransformer
+import "../../../qbs/defaults.js" as Defaults
+
+DynamicLibrary {
+ Depends { name: "Aggregation" }
+ Depends { name: "ExtensionSystem" }
+ Depends { name: "cpp" }
+ Depends { name: "Qt.core" }
+ targetName: Defaults.qtLibraryName(qbs, name.split('_')[1])
+ destinationDirectory: FileInfo.relativePath(project.ide_source_tree, sourceDirectory)
+ cpp.rpaths: [
+ buildDirectory + "/lib/qtcreator",
+ buildDirectory + "/lib/qtcreator/plugins/QtProject"
+ ].concat(additionalRPaths)
+ property pathList filesToCopy
+ property pathList additionalRPaths: []
+ CopyTransformer {
+ sourceFiles: product.filesToCopy
+ targetDirectory: product.destinationDirectory
+ }
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/circularplugins.qbs b/tests/auto/extensionsystem/pluginmanager/circularplugins/circularplugins.qbs
new file mode 100644
index 0000000000..64ddabe7a3
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/circularplugins.qbs
@@ -0,0 +1,10 @@
+import qbs
+
+Project {
+ name: "ExtensionSystem cirular plugins autotests"
+ references: [
+ "plugin1/plugin1.qbs",
+ "plugin2/plugin2.qbs",
+ "plugin3/plugin3.qbs"
+ ]
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.qbs b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.qbs
new file mode 100644
index 0000000000..106403770a
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../../../plugin.qbs" as Plugin
+
+Plugin {
+ name: "circular_plugin1"
+ filesToCopy: "plugin.xml"
+ files: ["plugin1.h", "plugin1.cpp"].concat(filesToCopy)
+ cpp.defines: base.concat(["PLUGIN1_LIBRARY"])
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.qbs b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.qbs
new file mode 100644
index 0000000000..a54b405a90
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../../../plugin.qbs" as Plugin
+
+Plugin {
+ name: "circular_plugin2"
+ filesToCopy: "plugin.xml"
+ files: ["plugin2.h", "plugin2.cpp"].concat(filesToCopy)
+ cpp.defines: base.concat(["PLUGIN2_LIBRARY"])
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.qbs b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.qbs
new file mode 100644
index 0000000000..600741b223
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../../../plugin.qbs" as Plugin
+
+Plugin {
+ name: "circular_plugin3"
+ filesToCopy: "plugin.xml"
+ files: ["plugin3.h", "plugin3.cpp"].concat(filesToCopy)
+ cpp.defines: base.concat(["PLUGIN3_LIBRARY"])
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/correctplugins1.qbs b/tests/auto/extensionsystem/pluginmanager/correctplugins1/correctplugins1.qbs
new file mode 100644
index 0000000000..8138e126ed
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/correctplugins1.qbs
@@ -0,0 +1,10 @@
+import qbs
+
+Project {
+ name: "ExtensionSystem correct plugins autotests"
+ references: [
+ "plugin1/plugin1.qbs",
+ "plugin2/plugin2.qbs",
+ "plugin3/plugin3.qbs"
+ ]
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.qbs b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.qbs
new file mode 100644
index 0000000000..9c73779a72
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.qbs
@@ -0,0 +1,15 @@
+import qbs
+import "../../../plugin.qbs" as Plugin
+
+Plugin {
+ name: "correct_plugin1"
+ Depends { name: "correct_plugin2" }
+ Depends { name: "correct_plugin3" }
+ filesToCopy: "plugin.spec"
+ additionalRPaths: [
+ destinationDirectory + "/../plugin2",
+ destinationDirectory + "/../plugin3"
+ ]
+ files: ["plugin1.h", "plugin1.cpp"].concat(filesToCopy)
+ cpp.defines: base.concat(["PLUGIN1_LIBRARY"])
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.qbs b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.qbs
new file mode 100644
index 0000000000..638cb3072a
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../../../plugin.qbs" as Plugin
+
+Plugin {
+ name: "correct_plugin2"
+ filesToCopy: "plugin.spec"
+ files: ["plugin2.h", "plugin2.cpp"].concat(filesToCopy)
+ cpp.defines: base.concat(["PLUGIN2_LIBRARY"])
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.qbs b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.qbs
new file mode 100644
index 0000000000..9f0a5167aa
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.qbs
@@ -0,0 +1,11 @@
+import qbs
+import "../../../plugin.qbs" as Plugin
+
+Plugin {
+ name: "correct_plugin3"
+ Depends { name: "correct_plugin2" }
+ filesToCopy: "plugin.spec"
+ additionalRPaths: [destinationDirectory + "/../plugin2"]
+ files: ["plugin3.h", "plugin3.cpp"].concat(filesToCopy)
+ cpp.defines: base.concat(["PLUGIN3_LIBRARY"])
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/pluginmanager.qbs b/tests/auto/extensionsystem/pluginmanager/pluginmanager.qbs
new file mode 100644
index 0000000000..b53ffcce4e
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/pluginmanager.qbs
@@ -0,0 +1,10 @@
+import qbs
+
+Project {
+ name: "PluginManager autotests"
+ references: [
+ "circularplugins/circularplugins.qbs",
+ "correctplugins1/correctplugins1.qbs",
+ "test.qbs"
+ ]
+}
diff --git a/tests/auto/extensionsystem/pluginmanager/test.qbs b/tests/auto/extensionsystem/pluginmanager/test.qbs
new file mode 100644
index 0000000000..8e539d8099
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginmanager/test.qbs
@@ -0,0 +1,34 @@
+import qbs
+import qbs.File
+import qbs.FileInfo
+import "../../autotest.qbs" as Autotest
+import "../copytransformer.qbs" as CopyTransformer
+
+Autotest {
+ name: "PluginManager autotest"
+ Depends { name: "Aggregation" }
+ Depends { name: "ExtensionSystem" }
+ Depends { name: "circular_plugin1" }
+ Depends { name: "circular_plugin2" }
+ Depends { name: "circular_plugin3" }
+ Depends { name: "correct_plugin1" }
+ Depends { name: "correct_plugin2" }
+ Depends { name: "correct_plugin3" }
+ Group {
+ id: pluginGroup
+ name: "plugins"
+ files: [
+ "plugins/otherplugin.xml",
+ "plugins/plugin1.xml",
+ "plugins/myplug/myplug.xml"
+ ]
+ }
+
+ CopyTransformer {
+ sourceFiles: pluginGroup.files
+ targetDirectory: product.destinationDirectory + "/plugins"
+ }
+
+ files: "tst_pluginmanager.cpp"
+ cpp.defines: base.concat(['PLUGINMANAGER_TESTS_DIR="' + destinationDirectory + '"'])
+}
diff --git a/tests/auto/extensionsystem/pluginspec/pluginspec.qbs b/tests/auto/extensionsystem/pluginspec/pluginspec.qbs
new file mode 100644
index 0000000000..8c883d56ac
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginspec/pluginspec.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Project {
+ name: "ExtensionSystem pluginspec autotests"
+ references: ["testplugin/testplugin.qbs", "test.qbs"]
+}
diff --git a/tests/auto/extensionsystem/pluginspec/test.qbs b/tests/auto/extensionsystem/pluginspec/test.qbs
new file mode 100644
index 0000000000..705c7ac02e
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginspec/test.qbs
@@ -0,0 +1,63 @@
+import qbs
+
+// TODO: Remove when import bug is fixed
+import qbs.File
+import qbs.FileInfo
+
+import "../../autotest.qbs" as Autotest
+import "../copytransformer.qbs" as CopyTransformer
+
+Autotest {
+ name: "ExtensionSystem pluginspec autotest"
+ Depends { name: "Aggregation" }
+ Depends { name: "ExtensionSystem" }
+ Depends { name: "pluginspec_test" }
+ cpp.defines: base.concat(['PLUGINSPEC_DIR="' + destinationDirectory + '"'])
+ files: "tst_pluginspec.cpp"
+ Group {
+ id: testSpecsGroup
+ name: "test specs"
+ files: [
+ "testspecs/simplespec.xml",
+ "testspecs/simplespec_experimental.xml",
+ "testspecs/spec1.xml",
+ "testspecs/spec2.xml",
+ "testspecs/spec_wrong1.xml",
+ "testspecs/spec_wrong2.xml",
+ "testspecs/spec_wrong3.xml",
+ "testspecs/spec_wrong4.xml",
+ "testspecs/spec_wrong5.xml",
+ ]
+ }
+ Group {
+ id: testDependenciesGroup
+ name: "test dependencies"
+ files: [
+ "testdependencies/spec1.xml",
+ "testdependencies/spec2.xml",
+ "testdependencies/spec3.xml",
+ "testdependencies/spec4.xml",
+ "testdependencies/spec5.xml",
+ ]
+ }
+ Group {
+ id: specGroup
+ name: "spec"
+ files: ["testdir/spec.xml"]
+ }
+
+ CopyTransformer {
+ sourceFiles: testSpecsGroup.files
+ targetDirectory: product.destinationDirectory + "/testspecs"
+ }
+
+ CopyTransformer {
+ sourceFiles: testDependenciesGroup.files
+ targetDirectory: product.destinationDirectory + "/testdependencies"
+ }
+
+ CopyTransformer {
+ sourceFiles: specGroup.files
+ targetDirectory: product.destinationDirectory + "/testdir"
+ }
+}
diff --git a/tests/auto/extensionsystem/pluginspec/testplugin/testplugin.qbs b/tests/auto/extensionsystem/pluginspec/testplugin/testplugin.qbs
new file mode 100644
index 0000000000..2ed6f66b59
--- /dev/null
+++ b/tests/auto/extensionsystem/pluginspec/testplugin/testplugin.qbs
@@ -0,0 +1,12 @@
+import qbs
+import "../../plugin.qbs" as Plugin
+
+Plugin {
+ name: "pluginspec_test"
+ files: [
+ "testplugin.h", "testplugin.cpp",
+ "testplugin_global.h"
+ ].concat(filesToCopy)
+ filesToCopy: "testplugin.xml"
+ cpp.defines: base.concat(["MYPLUGIN_LIBRARY"])
+}
diff --git a/tests/auto/externaltool/externaltool.qbs b/tests/auto/externaltool/externaltool.qbs
new file mode 100644
index 0000000000..717ef082ff
--- /dev/null
+++ b/tests/auto/externaltool/externaltool.qbs
@@ -0,0 +1,131 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "ExternalTool autotest"
+ property path corePluginDir: project.ide_source_tree + "/src/plugins/coreplugin"
+ // TODO: This should be all that is needed here: Depends { name: "Core" }
+ Depends { name: "app_version_header" }
+ Depends { name: "Aggregation" }
+ Depends { name: "ExtensionSystem" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt"; submodules: ["help", "printsupport", "sql"]; }
+ Depends { name: "Qt.widgets" } // TODO: qbs bug, remove when fixed
+ Group {
+ name: "Sources from Core plugin"
+ prefix: product.corePluginDir + '/'
+ files: [
+ "actionmanager/*",
+ "dialogs/*",
+ "editormanager/*",
+ "documentmanager.h", "documentmanager.cpp",
+ "editortoolbar.h", "editortoolbar.cpp",
+ "externaltool.h", "externaltool.cpp",
+ "externaltoolmanager.h",
+ "fancyactionbar.h", "fancyactionbar.cpp",
+ "fancytabwidget.h", "fancytabwidget.cpp",
+ "featureprovider.h", "featureprovider.cpp",
+ "fileiconprovider.h", "fileiconprovider.cpp",
+ "fileutils.h", "fileutils.cpp",
+ "findplaceholder.h", "findplaceholder.cpp",
+ "generalsettings.*",
+ "helpmanager.h", "helpmanager.cpp",
+ "icontext.h", "icontext.cpp",
+ "icore.h", "icore.cpp",
+ "icorelistener.h",
+ "idocument.h", "idocument.cpp",
+ "idocumentfactory.h",
+ "id.h", "id.cpp",
+ "imode.h", "imode.cpp",
+ "inavigationwidgetfactory.h", "inavigationwidgetfactory.cpp",
+ "infobar.h", "infobar.cpp",
+ "ioutputpane.h",
+ "iversioncontrol.h", "iversioncontrol.cpp",
+ "mainwindow.h", "mainwindow.cpp",
+ "manhattanstyle.h", "manhattanstyle.cpp",
+ "messagemanager.h", "messagemanager.cpp",
+ "messageoutputwindow.h", "messageoutputwindow.cpp",
+ "mimedatabase.h", "mimedatabase.cpp",
+ "mimetypemagicdialog.*",
+ "mimetypesettings.h", "mimetypesettings.cpp",
+ "minisplitter.h", "minisplitter.cpp",
+ "modemanager.h", "modemanager.cpp",
+ "navigationsubwidget.h", "navigationsubwidget.cpp",
+ "navigationwidget.h", "navigationwidget.cpp",
+ "outputpane.h", "outputpane.cpp",
+ "outputpanemanager.h", "outputpanemanager.cpp",
+ "outputwindow.h", "outputwindow.cpp",
+ "plugindialog.h", "plugindialog.cpp",
+ "rightpane.h", "rightpane.cpp",
+ "settingsdatabase.h", "settingsdatabase.cpp",
+ "statusbarmanager.h", "statusbarmanager.cpp",
+ "statusbarwidget.h", "statusbarwidget.cpp",
+ "styleanimator.h", "styleanimator.cpp",
+ "toolsettings.h", "toolsettings.cpp",
+ "variablechooser.h", "variablechooser.cpp",
+ "variablemanager.h", "variablemanager.cpp",
+ "vcsmanager.h", "vcsmanager.cpp",
+ "versiondialog.h", "versiondialog.cpp",
+ ]
+ }
+
+ Group {
+ name: "Progress Manager"
+ prefix: product.corePluginDir + "/progressmanager/"
+ files: [
+ "futureprogress.cpp", "futureprogress.h",
+ "progressbar.cpp", "progressbar.h",
+ "progressmanager.cpp", "progressmanager.h", "progressmanager_p.h",
+ "progressview.cpp", "progressview.h",
+ ]
+ }
+
+ Group {
+ name: "ProgressManager_win"
+ prefix: product.corePluginDir + '/'
+ condition: qbs.targetOS.contains("windows")
+ files: [
+ "progressmanager/progressmanager_win.cpp",
+ ]
+ }
+
+ Group {
+ name: "ProgressManager_mac"
+ prefix: product.corePluginDir + '/'
+ condition: qbs.targetOS.contains("osx")
+ files: [
+ "macfullscreen.h",
+ "macfullscreen.mm",
+ "progressmanager/progressmanager_mac.mm",
+ ]
+ }
+
+ Group {
+ name: "ProgressManager_x11"
+ prefix: product.corePluginDir + '/'
+ condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("osx")
+ files: [
+ "progressmanager/progressmanager_x11.cpp",
+ ]
+ }
+
+ Group {
+ name: "Test sources"
+ files: "tst_externaltooltest.cpp"
+ }
+ cpp.defines: base.concat([
+ "QT_DISABLE_DEPRECATED_BEFORE=0x040900",
+ "CORE_LIBRARY" // Needed to compile on Windows...
+ ])
+ cpp.includePaths: base.concat([
+ product.buildDirectory + "/GeneratedFiles/Core",
+ corePluginDir + "/.."
+ ])
+ cpp.dynamicLibraries: {
+ if (qbs.targetOS.contains("windows")) return [
+ "ole32",
+ "user32"
+ ]
+ }
+ cpp.frameworks: qbs.targetOS.contains("osx") ? ["AppKit"] : undefined
+}
diff --git a/tests/auto/filesearch/filesearch.qbs b/tests/auto/filesearch/filesearch.qbs
new file mode 100644
index 0000000000..77c197aa03
--- /dev/null
+++ b/tests/auto/filesearch/filesearch.qbs
@@ -0,0 +1,13 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "File search autotest"
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // For QTextDocument
+ files: [
+ "testfile.txt",
+ "tst_filesearch.cpp",
+ "tst_filesearch.qrc"
+ ]
+}
diff --git a/tests/auto/generichighlighter/generichighlighter.qbs b/tests/auto/generichighlighter/generichighlighter.qbs
new file mode 100644
index 0000000000..07ab96a02e
--- /dev/null
+++ b/tests/auto/generichighlighter/generichighlighter.qbs
@@ -0,0 +1,11 @@
+import qbs
+
+Project {
+ name: "Generic highlighter autotests"
+ property path genericHighlighterDir: project.ide_source_tree
+ + "/src/plugins/texteditor/generichighlighter"
+ references: [
+ "highlighterengine/highlighterengine.qbs",
+ "specificrules/specificrules.qbs"
+ ]
+}
diff --git a/tests/auto/generichighlighter/highlighterengine/highlighterengine.qbs b/tests/auto/generichighlighter/highlighterengine/highlighterengine.qbs
new file mode 100644
index 0000000000..af6def8e3d
--- /dev/null
+++ b/tests/auto/generichighlighter/highlighterengine/highlighterengine.qbs
@@ -0,0 +1,47 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Highlighter engine autotest"
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" }
+ Group {
+ name: "Sources from TextEditor plugin"
+ prefix: project.genericHighlighterDir + '/'
+ files: [
+ "context.h", "context.cpp",
+ "dynamicrule.h", "dynamicrule.cpp",
+ "highlightdefinition.h", "highlightdefinition.cpp",
+ "highlighter.h", "highlighter.cpp",
+ "itemdata.h", "itemdata.cpp",
+ "keywordlist.h", "keywordlist.cpp",
+ "progressdata.h", "progressdata.cpp",
+ "rule.h", "rule.cpp",
+ "specificrules.h", "specificrules.cpp"
+ ]
+ }
+ Group {
+ name: "Test sources"
+ files: [
+ "formats.h", "formats.cpp",
+ "highlightermock.h", "highlightermock.cpp",
+ "tst_highlighterengine.cpp"
+ ]
+ }
+ Group {
+ name: "Drop-in sources for the plugin"
+ prefix: "texteditor/"
+ files: [
+ "basetextdocumentlayout.h",
+ "syntaxhighlighter.h", "syntaxhighlighter.cpp",
+ "tabsettings.h"
+ ]
+ }
+
+ cpp.defines: base.concat(["TEXTEDITOR_LIBRARY"]) // For Windows
+ cpp.includePaths: base.concat([
+ path,
+ project.genericHighlighterDir,
+ project.genericHighlighterDir + "/../..",
+ path])
+}
diff --git a/tests/auto/generichighlighter/specificrules/specificrules.qbs b/tests/auto/generichighlighter/specificrules/specificrules.qbs
new file mode 100644
index 0000000000..9cc208b170
--- /dev/null
+++ b/tests/auto/generichighlighter/specificrules/specificrules.qbs
@@ -0,0 +1,27 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Generic highlighter specific rules autotest"
+ Depends { name: "Qt.widgets" }
+ Group {
+ name: "Sources from TextEditor plugin"
+ prefix: project.genericHighlighterDir + '/'
+ files: [
+ "context.cpp",
+ "dynamicrule.cpp",
+ "highlightdefinition.cpp",
+ "itemdata.cpp",
+ "keywordlist.cpp",
+ "progressdata.cpp",
+ "rule.cpp",
+ "specificrules.cpp",
+ ]
+ }
+ Group {
+ name: "Test sources"
+ files: "tst_specificrules.cpp"
+ }
+
+ cpp.includePaths: base.concat([project.genericHighlighterDir + "/../.."])
+}
diff --git a/tests/auto/ioutils/ioutils.qbs b/tests/auto/ioutils/ioutils.qbs
new file mode 100644
index 0000000000..fab554da2a
--- /dev/null
+++ b/tests/auto/ioutils/ioutils.qbs
@@ -0,0 +1,16 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "IoUtils autotest"
+ Depends { name: "Qt.core" }
+ files: [
+ project.ide_source_tree + "/src/shared/proparser/ioutils.cpp",
+ "tst_ioutils.cpp"
+ ]
+ Properties {
+ condition: Qt.core.versionMajor == 4
+ cpp.defines: base.concat(["QT_BOOTSTRAPPED"]) // For shellQuote().
+ }
+ cpp.includePaths: base.concat([project.ide_source_tree + "/src/shared"])
+}
diff --git a/tests/auto/profilewriter/profilewriter.qbs b/tests/auto/profilewriter/profilewriter.qbs
new file mode 100644
index 0000000000..6263fade36
--- /dev/null
+++ b/tests/auto/profilewriter/profilewriter.qbs
@@ -0,0 +1,29 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "ProFileWriter autotest"
+ Depends { name: "Qt.xml" }
+ Group {
+ name: "Sources from ProParser"
+ id: proParserGroup
+ prefix: project.ide_source_tree + "/src/shared/proparser/"
+ files: [
+ "ioutils.h", "ioutils.cpp",
+ "profileevaluator.h", "profileevaluator.cpp",
+ "proitems.h", "proitems.cpp",
+ "prowriter.h", "prowriter.cpp",
+ "qmake_global.h",
+ "qmakebuiltins.cpp",
+ "qmakeevaluator.h", "qmakeevaluator_p.h", "qmakeevaluator.cpp",
+ "qmakeglobals.h", "qmakeglobals.cpp",
+ "qmakeparser.h", "qmakeparser.cpp",
+ "qmakevfs.h", "qmakevfs.cpp"
+ ]
+ }
+ Group {
+ name: "Test sources"
+ files: "tst_profilewriter.cpp"
+ }
+ cpp.includePaths: base.concat([proParserGroup.prefix])
+}
diff --git a/tests/auto/qml/codemodel/check/check.qbs b/tests/auto/qml/codemodel/check/check.qbs
new file mode 100644
index 0000000000..ffa48d6ac2
--- /dev/null
+++ b/tests/auto/qml/codemodel/check/check.qbs
@@ -0,0 +1,16 @@
+import qbs
+import "../../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "QML code model check autotest"
+ Depends { name: "LanguageUtils" }
+ Depends { name: "QmlJS" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" }
+ files: "tst_check.cpp"
+ cpp.defines: base.concat([
+ 'QT_CREATOR',
+ 'QTCREATORDIR="' + project.ide_source_tree + '"',
+ 'TESTSRCDIR="' + path + '"'
+ ])
+}
diff --git a/tests/auto/qml/codemodel/codemodel.qbs b/tests/auto/qml/codemodel/codemodel.qbs
new file mode 100644
index 0000000000..63ad360bfd
--- /dev/null
+++ b/tests/auto/qml/codemodel/codemodel.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Project {
+ name: "QML code model autotests"
+ references: ["check/check.qbs"]
+}
diff --git a/tests/auto/qml/qml.qbs b/tests/auto/qml/qml.qbs
new file mode 100644
index 0000000000..e15aba1dfa
--- /dev/null
+++ b/tests/auto/qml/qml.qbs
@@ -0,0 +1,14 @@
+import qbs
+
+Project {
+ name: "QML autotests"
+ references: [
+ "codemodel/codemodel.qbs",
+// "qmldesigner/qmldesigner.qbs",
+ "qmleditor/qmleditor.qbs",
+ "qmljssimplereader/qmljssimplereader.qbs",
+ "qmlprojectmanager/qmlprojectmanager.qbs",
+ "qrcparser/qrcparser.qbs",
+ "reformatter/reformatter.qbs"
+ ]
+}
diff --git a/tests/auto/qml/qmleditor/qmlcodeformatter/qmlcodeformatter.qbs b/tests/auto/qml/qmleditor/qmlcodeformatter/qmlcodeformatter.qbs
new file mode 100644
index 0000000000..15691fb120
--- /dev/null
+++ b/tests/auto/qml/qmleditor/qmlcodeformatter/qmlcodeformatter.qbs
@@ -0,0 +1,12 @@
+import qbs
+import "../../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "QML code formatter autotest"
+ Depends { name: "LanguageUtils" }
+ Depends { name: "QmlJS" }
+ Depends { name: "QmlJSTools" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ files: "tst_qmlcodeformatter.cpp"
+}
diff --git a/tests/auto/qml/qmleditor/qmleditor.qbs b/tests/auto/qml/qmleditor/qmleditor.qbs
new file mode 100644
index 0000000000..3d039aa23c
--- /dev/null
+++ b/tests/auto/qml/qmleditor/qmleditor.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Project {
+ name: "QML editor autotests"
+ references: ["qmlcodeformatter/qmlcodeformatter.qbs"]
+}
diff --git a/tests/auto/qml/qmljssimplereader/qmljssimplereader.qbs b/tests/auto/qml/qmljssimplereader/qmljssimplereader.qbs
new file mode 100644
index 0000000000..48e174b6c7
--- /dev/null
+++ b/tests/auto/qml/qmljssimplereader/qmljssimplereader.qbs
@@ -0,0 +1,11 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "QMLJS simple reader autotest"
+ Depends { name: "QmlJS" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ files: "tst_qmljssimplereader.cpp"
+ cpp.defines: base.concat(["QT_CREATOR"])
+}
diff --git a/tests/auto/qml/qmlprojectmanager/fileformat/fileformat.qbs b/tests/auto/qml/qmlprojectmanager/fileformat/fileformat.qbs
new file mode 100644
index 0000000000..27ac534889
--- /dev/null
+++ b/tests/auto/qml/qmlprojectmanager/fileformat/fileformat.qbs
@@ -0,0 +1,14 @@
+import qbs
+import "../../../autotest.qbs" as Autotest
+
+Autotest {
+ condition: false
+ name: "QmlProjectManager file format autotest"
+ Depends { name: "QmlProjectManager" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt"; submodules: ["script", "declarative"]; }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ files: "tst_fileformat.cpp"
+ cpp.includePaths: base.concat([project.ide_source_tree + "/src/plugins/qmlprojectmanager/fileformat"])
+ cpp.defines: base.concat(['SRCDIR="' + path + '"'])
+}
diff --git a/tests/auto/qml/qmlprojectmanager/qmlprojectmanager.qbs b/tests/auto/qml/qmlprojectmanager/qmlprojectmanager.qbs
new file mode 100644
index 0000000000..82f60bad77
--- /dev/null
+++ b/tests/auto/qml/qmlprojectmanager/qmlprojectmanager.qbs
@@ -0,0 +1,7 @@
+import qbs
+
+Project {
+ condition: false // Known to be broken, nobody cares.
+ name: "QmlProjectManager autotests"
+ references: "fileformat/fileformat.qbs"
+}
diff --git a/tests/auto/qml/qrcparser/qrcparser.qbs b/tests/auto/qml/qrcparser/qrcparser.qbs
new file mode 100644
index 0000000000..f5d138af11
--- /dev/null
+++ b/tests/auto/qml/qrcparser/qrcparser.qbs
@@ -0,0 +1,10 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "QML qrc parser autotest"
+ Depends { name: "QmlJS" }
+ Depends { name: "QmlJSTools" }
+ files: "tst_qrcparser.cpp"
+ cpp.defines: base.concat(['TESTSRCDIR="' + path + '"'])
+}
diff --git a/tests/auto/qml/reformatter/reformatter.qbs b/tests/auto/qml/reformatter/reformatter.qbs
new file mode 100644
index 0000000000..ace17a2174
--- /dev/null
+++ b/tests/auto/qml/reformatter/reformatter.qbs
@@ -0,0 +1,15 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "QML reformatter autotest"
+ Depends { name: "QmlJS" }
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ files: "tst_reformatter.cpp"
+ cpp.defines: base.concat([
+ 'QT_CREATOR',
+ 'QTCREATORDIR="' + project.ide_source_tree + '"',
+ 'TESTSRCDIR="' + path + '"'
+ ])
+}
diff --git a/tests/auto/qtcprocess/qtcprocess.qbs b/tests/auto/qtcprocess/qtcprocess.qbs
new file mode 100644
index 0000000000..1050f6c36a
--- /dev/null
+++ b/tests/auto/qtcprocess/qtcprocess.qbs
@@ -0,0 +1,13 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "QtcProcess autotest"
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // TODO: qbs bug, remove when fixed
+ files: "tst_qtcprocess.cpp"
+ Properties {
+ condition: qbs.targetOS === "windows"
+ cpp.defines: base.concat(["_CRT_SECURE_NO_WARNINGS"])
+ }
+}
diff --git a/tests/auto/treeviewfind/treeviewfind.qbs b/tests/auto/treeviewfind/treeviewfind.qbs
new file mode 100644
index 0000000000..ec1b77de39
--- /dev/null
+++ b/tests/auto/treeviewfind/treeviewfind.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "TreeViewFind autotest"
+ Depends { name: "Find" }
+ Depends { name: "Qt.widgets" } // For QTextDocument
+ files: "tst_treeviewfind.cpp"
+}
diff --git a/tests/auto/utils/fileutils/fileutils.qbs b/tests/auto/utils/fileutils/fileutils.qbs
new file mode 100644
index 0000000000..fc2539a24b
--- /dev/null
+++ b/tests/auto/utils/fileutils/fileutils.qbs
@@ -0,0 +1,13 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "FileUtils autotest"
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ Properties {
+ condition: qbs.toolchain.contains("gcc")
+ cpp.cxxFlags: base.concat(["-Wno-trigraphs"])
+ }
+ files: "tst_fileutils.cpp"
+}
diff --git a/tests/auto/utils/utils.qbs b/tests/auto/utils/utils.qbs
new file mode 100644
index 0000000000..724084e59c
--- /dev/null
+++ b/tests/auto/utils/utils.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Project {
+ name: "Utils autotests"
+ references: ["fileutils/fileutils.qbs"]
+}
diff --git a/tests/auto/utils_stringutils/utils_stringutils.qbs b/tests/auto/utils_stringutils/utils_stringutils.qbs
new file mode 100644
index 0000000000..609dbd08f9
--- /dev/null
+++ b/tests/auto/utils_stringutils/utils_stringutils.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../autotest.qbs" as Autotest
+
+Autotest {
+ name: "StringUtils autotest"
+ Depends { name: "Utils" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ files: "tst_stringutils.cpp"
+}
diff --git a/tests/auto/valgrind/callgrind/callgrind.qbs b/tests/auto/valgrind/callgrind/callgrind.qbs
new file mode 100644
index 0000000000..98d5cd681b
--- /dev/null
+++ b/tests/auto/valgrind/callgrind/callgrind.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Project {
+ name: "Callgrind autotests"
+ references: ["callgrindparsertests.qbs"]
+}
diff --git a/tests/auto/valgrind/callgrind/callgrindparsertests.qbs b/tests/auto/valgrind/callgrind/callgrindparsertests.qbs
new file mode 100644
index 0000000000..2fc51e896a
--- /dev/null
+++ b/tests/auto/valgrind/callgrind/callgrindparsertests.qbs
@@ -0,0 +1,16 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Callgrind parser autotest"
+ Depends { name: "QtcSsh" }
+ Depends { name: "Utils" }
+ Depends { name: "Valgrind" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ property path pluginDir: project.ide_source_tree + "/src/plugins/valgrind"
+ files: ["callgrindparsertests.h", "callgrindparsertests.cpp"]
+ cpp.defines: base.concat([
+ 'CALLGRINDPARSERTESTS',
+ 'PARSERTESTS_DATA_DIR="' + path + '/data"'
+ ])
+}
diff --git a/tests/auto/valgrind/memcheck/memcheck.qbs b/tests/auto/valgrind/memcheck/memcheck.qbs
new file mode 100644
index 0000000000..531319c811
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/memcheck.qbs
@@ -0,0 +1,11 @@
+import qbs
+
+Project {
+ name: "Memcheck autotests"
+ references: [
+ "testapps/testapps.qbs",
+ "modeldemo.qbs",
+ "parsertests.qbs",
+ "testrunner.qbs"
+ ]
+}
diff --git a/tests/auto/valgrind/memcheck/modeldemo.qbs b/tests/auto/valgrind/memcheck/modeldemo.qbs
new file mode 100644
index 0000000000..0a520c5555
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/modeldemo.qbs
@@ -0,0 +1,17 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Memcheck ModelDemo autotest"
+ Depends { name: "QtcSsh" }
+ Depends { name: "Utils" }
+ Depends { name: "Valgrind" }
+ Depends { name: "valgrind-fake" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ Depends { name: "Qt.network" }
+ files: ["modeldemo.h", "modeldemo.cpp"]
+ cpp.defines: base.concat([
+ 'PARSERTESTS_DATA_DIR="' + path + '/data"',
+ 'VALGRIND_FAKE_PATH="' + product.buildDirectory + '/' + project.ide_bin_path + '/valgrind-fake"'
+ ])
+}
diff --git a/tests/auto/valgrind/memcheck/parsertests.qbs b/tests/auto/valgrind/memcheck/parsertests.qbs
new file mode 100644
index 0000000000..509263c887
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/parsertests.qbs
@@ -0,0 +1,17 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Memcheck parser autotest"
+ Depends { name: "QtcSsh" }
+ Depends { name: "Utils" }
+ Depends { name: "Valgrind" }
+ Depends { name: "valgrind-fake" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ Depends { name: "Qt.network" }
+ files: ["parsertests.h", "parsertests.cpp"]
+ cpp.defines: base.concat([
+ 'PARSERTESTS_DATA_DIR="' + path + '/data"',
+ 'VALGRIND_FAKE_PATH="' + product.buildDirectory + '/' + project.ide_bin_path + '/valgrind-fake"'
+ ])
+}
diff --git a/tests/auto/valgrind/memcheck/testapps/free1/free1.qbs b/tests/auto/valgrind/memcheck/testapps/free1/free1.qbs
new file mode 100644
index 0000000000..3c6725bed5
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/free1/free1.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "free1" }
diff --git a/tests/auto/valgrind/memcheck/testapps/free2/free2.qbs b/tests/auto/valgrind/memcheck/testapps/free2/free2.qbs
new file mode 100644
index 0000000000..f0f91dcdb3
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/free2/free2.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "free2" }
diff --git a/tests/auto/valgrind/memcheck/testapps/invalidjump/invalidjump.qbs b/tests/auto/valgrind/memcheck/testapps/invalidjump/invalidjump.qbs
new file mode 100644
index 0000000000..270aea02dd
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/invalidjump/invalidjump.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "invalidjump" }
diff --git a/tests/auto/valgrind/memcheck/testapps/leak1/leak1.qbs b/tests/auto/valgrind/memcheck/testapps/leak1/leak1.qbs
new file mode 100644
index 0000000000..679c2966f5
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/leak1/leak1.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "leak1" }
diff --git a/tests/auto/valgrind/memcheck/testapps/leak2/leak2.qbs b/tests/auto/valgrind/memcheck/testapps/leak2/leak2.qbs
new file mode 100644
index 0000000000..17dc2b6915
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/leak2/leak2.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "leak2" }
diff --git a/tests/auto/valgrind/memcheck/testapps/leak3/leak3.qbs b/tests/auto/valgrind/memcheck/testapps/leak3/leak3.qbs
new file mode 100644
index 0000000000..170717e1e5
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/leak3/leak3.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "leak3" }
diff --git a/tests/auto/valgrind/memcheck/testapps/leak4/leak4.qbs b/tests/auto/valgrind/memcheck/testapps/leak4/leak4.qbs
new file mode 100644
index 0000000000..537f824b88
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/leak4/leak4.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "leak4" }
diff --git a/tests/auto/valgrind/memcheck/testapps/overlap/overlap.qbs b/tests/auto/valgrind/memcheck/testapps/overlap/overlap.qbs
new file mode 100644
index 0000000000..1affd7896c
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/overlap/overlap.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "overlap"; cpp.cxxFlags: base.concat(["-O0", "-fno-builtin"]); }
diff --git a/tests/auto/valgrind/memcheck/testapps/syscall/syscall.qbs b/tests/auto/valgrind/memcheck/testapps/syscall/syscall.qbs
new file mode 100644
index 0000000000..1887ceb4ab
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/syscall/syscall.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "syscall"; cpp.cxxFlags: base.concat(["-O0"]); }
diff --git a/tests/auto/valgrind/memcheck/testapps/testapp.qbs b/tests/auto/valgrind/memcheck/testapps/testapp.qbs
new file mode 100644
index 0000000000..fcbac27d85
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/testapp.qbs
@@ -0,0 +1,9 @@
+import qbs
+import "../../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Memcheck " + testName + " autotest"
+ targetName: testName // Test runner hardcodes the names of the executables
+ destinationDirectory: buildDirectory + '/' + project.ide_bin_path + '/testapps/' + testName
+ files: "main.cpp"
+}
diff --git a/tests/auto/valgrind/memcheck/testapps/testapps.qbs b/tests/auto/valgrind/memcheck/testapps/testapps.qbs
new file mode 100644
index 0000000000..cc426c7f7e
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/testapps.qbs
@@ -0,0 +1,19 @@
+import qbs
+
+Project {
+ name: "Memcheck test apps"
+ references: [
+ "free1/free1.qbs",
+ "free2/free2.qbs",
+ "invalidjump/invalidjump.qbs",
+ "leak1/leak1.qbs",
+ "leak2/leak2.qbs",
+ "leak3/leak3.qbs",
+ "leak4/leak4.qbs",
+ "overlap/overlap.qbs",
+ "syscall/syscall.qbs",
+ "uninit1/uninit1.qbs",
+ "uninit2/uninit2.qbs",
+ "uninit3/uninit3.qbs"
+ ]
+}
diff --git a/tests/auto/valgrind/memcheck/testapps/uninit1/uninit1.qbs b/tests/auto/valgrind/memcheck/testapps/uninit1/uninit1.qbs
new file mode 100644
index 0000000000..da65d07f4b
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/uninit1/uninit1.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "uninit1"; cpp.cxxFlags: base.concat(["-O0"]); }
diff --git a/tests/auto/valgrind/memcheck/testapps/uninit2/uninit2.qbs b/tests/auto/valgrind/memcheck/testapps/uninit2/uninit2.qbs
new file mode 100644
index 0000000000..af077a57b5
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/uninit2/uninit2.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "uninit2"; cpp.cxxFlags: base.concat(["-O0"]); }
diff --git a/tests/auto/valgrind/memcheck/testapps/uninit3/uninit3.qbs b/tests/auto/valgrind/memcheck/testapps/uninit3/uninit3.qbs
new file mode 100644
index 0000000000..5e9c3e3bee
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testapps/uninit3/uninit3.qbs
@@ -0,0 +1,4 @@
+import qbs
+import "../testapp.qbs" as TestApp
+
+TestApp { testName: "uninit3"; cpp.cxxFlags: base.concat(["-O0"]); }
diff --git a/tests/auto/valgrind/memcheck/testrunner.qbs b/tests/auto/valgrind/memcheck/testrunner.qbs
new file mode 100644
index 0000000000..12883429e7
--- /dev/null
+++ b/tests/auto/valgrind/memcheck/testrunner.qbs
@@ -0,0 +1,28 @@
+import qbs
+import "../../autotest.qbs" as Autotest
+
+Autotest {
+ name: "Memcheck test runner"
+ Depends { name: "Memcheck free1 autotest" }
+ Depends { name: "Memcheck free2 autotest" }
+ Depends { name: "Memcheck invalidjump autotest" }
+ Depends { name: "Memcheck leak1 autotest" }
+ Depends { name: "Memcheck leak2 autotest" }
+ Depends { name: "Memcheck leak3 autotest" }
+ Depends { name: "Memcheck leak4 autotest" }
+ Depends { name: "Memcheck overlap autotest" }
+ Depends { name: "Memcheck syscall autotest" }
+ Depends { name: "Memcheck uninit1 autotest" }
+ Depends { name: "Memcheck uninit2 autotest" }
+ Depends { name: "Memcheck uninit3 autotest" }
+ Depends { name: "QtcSsh" }
+ Depends { name: "Utils" }
+ Depends { name: "Valgrind" }
+ Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
+ files: ["testrunner.h", "testrunner.cpp"]
+ destinationDirectory: project.ide_bin_path
+ cpp.defines: base.concat([
+ 'TESTRUNNER_SRC_DIR="' + path + '/testapps"',
+ 'TESTRUNNER_APP_DIR="' + product.buildDirectory + '/' + destinationDirectory + '/testapps"'
+ ])
+}
diff --git a/tests/auto/valgrind/valgrind.qbs b/tests/auto/valgrind/valgrind.qbs
new file mode 100644
index 0000000000..54516b31b5
--- /dev/null
+++ b/tests/auto/valgrind/valgrind.qbs
@@ -0,0 +1,10 @@
+import qbs
+
+Project {
+ name: "Valgrind autotests"
+ condition: qbs.targetOS.contains("unix")
+ references: [
+ "callgrind/callgrind.qbs",
+ "memcheck/memcheck.qbs"
+ ]
+}
diff --git a/tests/tests.qbs b/tests/tests.qbs
new file mode 100644
index 0000000000..0b475afde5
--- /dev/null
+++ b/tests/tests.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Project {
+ name: "Tests"
+ references: ["auto/auto.qbs"]
+}