aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-10-30 18:22:21 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-10-31 17:48:47 +0100
commit7f0cc84396dd3d729200d3c99aae6358b9ed647e (patch)
tree51db9c6c8c48e8a9af073afc0f3e679518910c01
parent4cdb21ade421b4635d49a0f0d7b72118532b6ef6 (diff)
Clean up manual tests.
Turn some manual tests that add coverage of a feature into autotests. Turn some manual tests that demonstrate a feature into examples. Remove some manual tests that do neither. Change-Id: Ie54005e1ba5aad07319eb864cc5ad70e26308080 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--examples/app-and-lib/app/app.qbs (renamed from tests/manual/lib_subdir/app/app.qbs)4
-rw-r--r--examples/app-and-lib/app/main.cpp (renamed from tests/manual/lib_subdir/app/main.cpp)0
-rw-r--r--examples/app-and-lib/app_and_lib.qbs (renamed from tests/manual/lib_subdir/lib_subdir.qbs)0
-rw-r--r--examples/app-and-lib/lib/lib.cpp (renamed from tests/manual/lib_subdir/lib/lib.cpp)2
-rw-r--r--examples/app-and-lib/lib/lib.qbs (renamed from tests/manual/lib_subdir/lib/lib.qbs)2
-rw-r--r--examples/examples.qbs1
-rw-r--r--tests/auto/blackbox/testdata/exportSimple/lib1.cpp (renamed from tests/manual/productmoduledeps/lib1.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/exportSimple/main.cpp (renamed from tests/manual/productmoduledeps/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/exportSimple/project.qbs (renamed from tests/manual/productmoduledeps/productmoduledeps.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/fileTagger/bla.txt (renamed from tests/manual/genmoc_cpp/bla.txt)0
-rw-r--r--tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs (renamed from tests/manual/genmoc_cpp/moc_cpp.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/objc/main.mm (renamed from tests/manual/objc/main.mm)0
-rw-r--r--tests/auto/blackbox/testdata/objc/objc.qbs (renamed from tests/manual/objc/objc.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/rc/main.cpp (renamed from tests/manual/rc/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/rc/rc.qbs (renamed from tests/manual/rc/rc.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/rc/test.rc (renamed from tests/manual/rc/test.rc)0
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp27
-rw-r--r--tests/auto/blackbox/tst_blackbox.h4
-rw-r--r--tests/manual/qrc2/bla.cpp32
-rw-r--r--tests/manual/qrc2/bla.qrc5
-rw-r--r--tests/manual/qrc2/foo.qrc5
-rw-r--r--tests/manual/qrc2/i.qbs19
-rw-r--r--tests/manual/qrc2/stuff.txt1
23 files changed, 36 insertions, 66 deletions
diff --git a/tests/manual/lib_subdir/app/app.qbs b/examples/app-and-lib/app/app.qbs
index b4e5bf529..01800e744 100644
--- a/tests/manual/lib_subdir/app/app.qbs
+++ b/examples/app-and-lib/app/app.qbs
@@ -2,9 +2,9 @@ import qbs 1.0
Product {
type: "application"
- name : "HelloWorld"
+ name : "app-and-lib-app"
files : [ "main.cpp" ]
Depends { name: "cpp" }
- Depends { name: "lol" }
+ Depends { name: "app-and-lib-lib" }
}
diff --git a/tests/manual/lib_subdir/app/main.cpp b/examples/app-and-lib/app/main.cpp
index e7d24bdc3..e7d24bdc3 100644
--- a/tests/manual/lib_subdir/app/main.cpp
+++ b/examples/app-and-lib/app/main.cpp
diff --git a/tests/manual/lib_subdir/lib_subdir.qbs b/examples/app-and-lib/app_and_lib.qbs
index 56edf28a4..56edf28a4 100644
--- a/tests/manual/lib_subdir/lib_subdir.qbs
+++ b/examples/app-and-lib/app_and_lib.qbs
diff --git a/tests/manual/lib_subdir/lib/lib.cpp b/examples/app-and-lib/lib/lib.cpp
index 01c397614..fed239535 100644
--- a/tests/manual/lib_subdir/lib/lib.cpp
+++ b/examples/app-and-lib/lib/lib.cpp
@@ -35,6 +35,6 @@
int bla()
{
- puts("Hello WOrld!");
+ puts("Hello World!");
return 2;
}
diff --git a/tests/manual/lib_subdir/lib/lib.qbs b/examples/app-and-lib/lib/lib.qbs
index 036746692..32d985294 100644
--- a/tests/manual/lib_subdir/lib/lib.qbs
+++ b/examples/app-and-lib/lib/lib.qbs
@@ -2,7 +2,7 @@ import qbs 1.0
Product {
type: "staticlibrary"
- name: "lol"
+ name: "app-and-lib-lib"
files: [ "lib.cpp" ]
cpp.defines: ['CRUCIAL_DEFINE']
Depends { name: 'cpp' }
diff --git a/examples/examples.qbs b/examples/examples.qbs
index 7eb5f70f8..567d51b9a 100644
--- a/examples/examples.qbs
+++ b/examples/examples.qbs
@@ -2,6 +2,7 @@ import qbs
Project {
references: [
+ "app-and-lib/app_and_lib.qbs",
"cocoa-application/CocoaApplication.qbs",
"collidingmice/collidingmice.qbs",
"helloworld-complex/hello.qbs",
diff --git a/tests/manual/productmoduledeps/lib1.cpp b/tests/auto/blackbox/testdata/exportSimple/lib1.cpp
index 2760a9170..2760a9170 100644
--- a/tests/manual/productmoduledeps/lib1.cpp
+++ b/tests/auto/blackbox/testdata/exportSimple/lib1.cpp
diff --git a/tests/manual/productmoduledeps/main.cpp b/tests/auto/blackbox/testdata/exportSimple/main.cpp
index b7ddf7215..b7ddf7215 100644
--- a/tests/manual/productmoduledeps/main.cpp
+++ b/tests/auto/blackbox/testdata/exportSimple/main.cpp
diff --git a/tests/manual/productmoduledeps/productmoduledeps.qbs b/tests/auto/blackbox/testdata/exportSimple/project.qbs
index 1b665b880..1b665b880 100644
--- a/tests/manual/productmoduledeps/productmoduledeps.qbs
+++ b/tests/auto/blackbox/testdata/exportSimple/project.qbs
diff --git a/tests/manual/genmoc_cpp/bla.txt b/tests/auto/blackbox/testdata/fileTagger/bla.txt
index 26185684a..26185684a 100644
--- a/tests/manual/genmoc_cpp/bla.txt
+++ b/tests/auto/blackbox/testdata/fileTagger/bla.txt
diff --git a/tests/manual/genmoc_cpp/moc_cpp.qbs b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs
index 681a93f28..681a93f28 100644
--- a/tests/manual/genmoc_cpp/moc_cpp.qbs
+++ b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs
diff --git a/tests/manual/objc/main.mm b/tests/auto/blackbox/testdata/objc/main.mm
index 49b4f3915..49b4f3915 100644
--- a/tests/manual/objc/main.mm
+++ b/tests/auto/blackbox/testdata/objc/main.mm
diff --git a/tests/manual/objc/objc.qbs b/tests/auto/blackbox/testdata/objc/objc.qbs
index b878097c4..b878097c4 100644
--- a/tests/manual/objc/objc.qbs
+++ b/tests/auto/blackbox/testdata/objc/objc.qbs
diff --git a/tests/manual/rc/main.cpp b/tests/auto/blackbox/testdata/rc/main.cpp
index f5fab598e..f5fab598e 100644
--- a/tests/manual/rc/main.cpp
+++ b/tests/auto/blackbox/testdata/rc/main.cpp
diff --git a/tests/manual/rc/rc.qbs b/tests/auto/blackbox/testdata/rc/rc.qbs
index 75502cf88..75502cf88 100644
--- a/tests/manual/rc/rc.qbs
+++ b/tests/auto/blackbox/testdata/rc/rc.qbs
diff --git a/tests/manual/rc/test.rc b/tests/auto/blackbox/testdata/rc/test.rc
index a8e5fd39b..a8e5fd39b 100644
--- a/tests/manual/rc/test.rc
+++ b/tests/auto/blackbox/testdata/rc/test.rc
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index ddebcce0e..68f57166f 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -431,6 +431,12 @@ void TestBlackbox::clean()
QVERIFY(QFile(depExeFilePath).exists());
}
+void TestBlackbox::exportSimple()
+{
+ QDir::setCurrent(testDataDir + "/exportSimple");
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackbox::exportWithRecursiveDepends()
{
QDir::setCurrent(testDataDir + "/exportWithRecursiveDepends");
@@ -440,6 +446,21 @@ void TestBlackbox::exportWithRecursiveDepends()
QCOMPARE(runQbs(params), 0);
}
+void TestBlackbox::fileTagger()
+{
+ QDir::setCurrent(testDataDir + "/fileTagger");
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("moc bla.cpp"));
+}
+
+void TestBlackbox::rc()
+{
+ QDir::setCurrent(testDataDir + "/rc");
+ QCOMPARE(runQbs(), 0);
+ const bool rcFileWasCompiled = m_qbsStdout.contains("compiling test.rc");
+ QCOMPARE(rcFileWasCompiled, HostOsInfo::isWindowsHost());
+}
+
void TestBlackbox::renameProduct()
{
QDir::setCurrent(testDataDir + "/renameProduct");
@@ -1342,6 +1363,12 @@ void TestBlackbox::inheritQbsSearchPaths()
QCOMPARE(runQbs(), 0);
}
+void TestBlackbox::objC()
+{
+ QDir::setCurrent(testDataDir + "/objc");
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackbox::properQuoting()
{
QDir::setCurrent(testDataDir + "/proper quoting");
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 042446a96..f86e7617c 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -111,6 +111,7 @@ private slots:
void jsExtensionsProcess();
void jsExtensionsTextFile();
void inheritQbsSearchPaths();
+ void objC();
void properQuoting();
void propertiesBlocks();
void resolve_project_data();
@@ -118,7 +119,10 @@ private slots:
void resolve_project_dry_run_data();
void resolve_project_dry_run();
void clean();
+ void exportSimple();
void exportWithRecursiveDepends();
+ void fileTagger();
+ void rc();
void renameProduct();
void renameTargetArtifact();
void subProjects();
diff --git a/tests/manual/qrc2/bla.cpp b/tests/manual/qrc2/bla.cpp
deleted file mode 100644
index 17ba1b7a7..000000000
--- a/tests/manual/qrc2/bla.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Build Suite.
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-int main(){
- return 3;
-}
diff --git a/tests/manual/qrc2/bla.qrc b/tests/manual/qrc2/bla.qrc
deleted file mode 100644
index f0a7168f5..000000000
--- a/tests/manual/qrc2/bla.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/bla">
- <file>stuff.txt</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/qrc2/foo.qrc b/tests/manual/qrc2/foo.qrc
deleted file mode 100644
index a8acfc34a..000000000
--- a/tests/manual/qrc2/foo.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/foo">
- <file>stuff.txt</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/qrc2/i.qbs b/tests/manual/qrc2/i.qbs
deleted file mode 100644
index e5c310773..000000000
--- a/tests/manual/qrc2/i.qbs
+++ /dev/null
@@ -1,19 +0,0 @@
-import qbs 1.0
-
-Project {
- Product {
- type: "application"
- name: "i"
-
- Depends {
- name: "Qt.core"
- }
-
- files: [
- "bla.cpp",
- "bla.qrc",
- "foo.qrc",
- "stuff.txt"
- ]
- }
-}
diff --git a/tests/manual/qrc2/stuff.txt b/tests/manual/qrc2/stuff.txt
deleted file mode 100644
index 78f0d32c6..000000000
--- a/tests/manual/qrc2/stuff.txt
+++ /dev/null
@@ -1 +0,0 @@
-a resource file