diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-08-26 17:50:02 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2013-09-09 12:16:09 +0200 |
commit | 698144e32ed270145cf2c1ff3ec8a9519ffef419 (patch) | |
tree | 4882fc026b5360a8bcb5cd8d4df43807090569a4 /tests/auto/valgrind/memcheck | |
parent | fbda0ef558c3bee966fe517fc48b642bef85e6f4 (diff) | |
download | qt-creator-698144e32ed270145cf2c1ff3ec8a9519ffef419.tar.gz |
Add qbs project files for autotests.
Note: Since not all autotests are able to run from an installed location,
we need to be able to start them from the build directory, which
in turn forces us to set a destination directory for libraries and plugins,
so they will be found at run-time.
Change-Id: Idcf7e1333dfa6e9dbf745391b78c035f842ccc5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/valgrind/memcheck')
18 files changed, 149 insertions, 0 deletions
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"' + ]) +} |