summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-10-10 17:26:33 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-10-14 23:23:45 +0200
commitc8b795532c5b5fa0752e218ab5b75c1569a2c5c1 (patch)
tree398974b7a781f3dee425eb608dfd58399b3689e7 /tests
parentc939d3bb79619229626ccd02ea7deabe5debf060 (diff)
downloadqbs-c8b795532c5b5fa0752e218ab5b75c1569a2c5c1.tar.gz
Spring cleaning in manual tests.
Fix the ones that are broken, remove outdated constructs, turn into autotest where it seems sensible. Change-Id: I0fa7e95af4e49ea190b739f779ddf7e4e8b6f96a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/baseProperties/imports/Bar.qbs (renamed from tests/manual/baseProperties/imports/Bar.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/baseProperties/imports/Foo.qbs (renamed from tests/manual/baseProperties/imports/Foo.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/baseProperties/main.cpp (renamed from tests/manual/baseProperties/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/baseProperties/prj.qbs (renamed from tests/manual/baseProperties/prj.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/dynamicLibs/lib1.cpp (renamed from tests/manual/link_dynamiclib/lib1.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/dynamicLibs/lib2.cpp (renamed from tests/manual/link_dynamiclib/lib2.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/dynamicLibs/lib3.cpp (renamed from tests/manual/link_dynamiclib/lib3.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/dynamicLibs/lib4.cpp (renamed from tests/manual/link_dynamiclib/lib4.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/dynamicLibs/lib4.h (renamed from tests/manual/link_dynamiclib/lib4.h)0
-rw-r--r--tests/auto/blackbox/testdata/dynamicLibs/link_dynamiclib.qbs (renamed from tests/manual/link_dynamiclib/link_dynamiclib.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/dynamicLibs/main.cpp (renamed from tests/manual/link_dynamiclib/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/inheritQbsSearchPaths/imports/Foo.qbs (renamed from tests/manual/inheritModuleSearchPath/imports/Foo.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/inheritQbsSearchPaths/main.cpp (renamed from tests/manual/inheritModuleSearchPath/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/inheritQbsSearchPaths/prj.qbs (renamed from tests/manual/inheritModuleSearchPath/prj.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/inheritQbsSearchPaths/subdir/modules/bli/m.qbs (renamed from tests/manual/inheritModuleSearchPath/subdir/modules/bli/m.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/main.cpp (renamed from tests/manual/proper quoting/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/my static lib helper.cpp (renamed from tests/manual/proper quoting/my static lib helper.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/my static lib.cpp (renamed from tests/manual/proper quoting/my static lib.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs (renamed from tests/manual/proper quoting/proper quoting.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/some helper/some helper.cpp (renamed from tests/manual/proper quoting/some helper/some helper.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/some helper/some helper.h (renamed from tests/manual/proper quoting/some helper/some helper.h)0
-rw-r--r--tests/auto/blackbox/testdata/propertiesBlocks/main.cpp (renamed from tests/manual/propertiesblocks/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/propertiesBlocks/propertiesblocks.qbs (renamed from tests/manual/propertiesblocks/propertiesblocks.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/transformers/main.cpp (renamed from tests/manual/transformers/main.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/transformers/transformers.qbs (renamed from tests/manual/transformers/transformers.qbs)0
-rw-r--r--tests/auto/blackbox/testdata/uic/bla.cpp (renamed from tests/manual/uic/bla.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/uic/bla.h (renamed from tests/manual/uic/bla.h)0
-rw-r--r--tests/auto/blackbox/testdata/uic/ui.h (renamed from tests/manual/uic/ui.h)0
-rw-r--r--tests/auto/blackbox/testdata/uic/ui.ui (renamed from tests/manual/uic/ui.ui)0
-rw-r--r--tests/auto/blackbox/testdata/uic/uic.qbs (renamed from tests/manual/uic/uic.qbs)0
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp48
-rw-r--r--tests/auto/blackbox/tst_blackbox.h7
-rw-r--r--tests/manual/configure/modules/definition/module.qbs2
-rw-r--r--tests/manual/groupTaggerConflict/test.qbs10
-rw-r--r--tests/manual/productmoduledeps/productmoduledeps.qbs6
35 files changed, 63 insertions, 10 deletions
diff --git a/tests/manual/baseProperties/imports/Bar.qbs b/tests/auto/blackbox/testdata/baseProperties/imports/Bar.qbs
index 07ab724e4..07ab724e4 100644
--- a/tests/manual/baseProperties/imports/Bar.qbs
+++ b/tests/auto/blackbox/testdata/baseProperties/imports/Bar.qbs
diff --git a/tests/manual/baseProperties/imports/Foo.qbs b/tests/auto/blackbox/testdata/baseProperties/imports/Foo.qbs
index 563992434..563992434 100644
--- a/tests/manual/baseProperties/imports/Foo.qbs
+++ b/tests/auto/blackbox/testdata/baseProperties/imports/Foo.qbs
diff --git a/tests/manual/baseProperties/main.cpp b/tests/auto/blackbox/testdata/baseProperties/main.cpp
index 79c0af79c..79c0af79c 100644
--- a/tests/manual/baseProperties/main.cpp
+++ b/tests/auto/blackbox/testdata/baseProperties/main.cpp
diff --git a/tests/manual/baseProperties/prj.qbs b/tests/auto/blackbox/testdata/baseProperties/prj.qbs
index a43b930dc..a43b930dc 100644
--- a/tests/manual/baseProperties/prj.qbs
+++ b/tests/auto/blackbox/testdata/baseProperties/prj.qbs
diff --git a/tests/manual/link_dynamiclib/lib1.cpp b/tests/auto/blackbox/testdata/dynamicLibs/lib1.cpp
index 0cca8b6e9..0cca8b6e9 100644
--- a/tests/manual/link_dynamiclib/lib1.cpp
+++ b/tests/auto/blackbox/testdata/dynamicLibs/lib1.cpp
diff --git a/tests/manual/link_dynamiclib/lib2.cpp b/tests/auto/blackbox/testdata/dynamicLibs/lib2.cpp
index 26ab80cc7..26ab80cc7 100644
--- a/tests/manual/link_dynamiclib/lib2.cpp
+++ b/tests/auto/blackbox/testdata/dynamicLibs/lib2.cpp
diff --git a/tests/manual/link_dynamiclib/lib3.cpp b/tests/auto/blackbox/testdata/dynamicLibs/lib3.cpp
index 4f46512d7..4f46512d7 100644
--- a/tests/manual/link_dynamiclib/lib3.cpp
+++ b/tests/auto/blackbox/testdata/dynamicLibs/lib3.cpp
diff --git a/tests/manual/link_dynamiclib/lib4.cpp b/tests/auto/blackbox/testdata/dynamicLibs/lib4.cpp
index c0ead4721..c0ead4721 100644
--- a/tests/manual/link_dynamiclib/lib4.cpp
+++ b/tests/auto/blackbox/testdata/dynamicLibs/lib4.cpp
diff --git a/tests/manual/link_dynamiclib/lib4.h b/tests/auto/blackbox/testdata/dynamicLibs/lib4.h
index 689e8d146..689e8d146 100644
--- a/tests/manual/link_dynamiclib/lib4.h
+++ b/tests/auto/blackbox/testdata/dynamicLibs/lib4.h
diff --git a/tests/manual/link_dynamiclib/link_dynamiclib.qbs b/tests/auto/blackbox/testdata/dynamicLibs/link_dynamiclib.qbs
index 53cebc4a9..53cebc4a9 100644
--- a/tests/manual/link_dynamiclib/link_dynamiclib.qbs
+++ b/tests/auto/blackbox/testdata/dynamicLibs/link_dynamiclib.qbs
diff --git a/tests/manual/link_dynamiclib/main.cpp b/tests/auto/blackbox/testdata/dynamicLibs/main.cpp
index ea0be27c8..ea0be27c8 100644
--- a/tests/manual/link_dynamiclib/main.cpp
+++ b/tests/auto/blackbox/testdata/dynamicLibs/main.cpp
diff --git a/tests/manual/inheritModuleSearchPath/imports/Foo.qbs b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/imports/Foo.qbs
index f6c1733b5..f6c1733b5 100644
--- a/tests/manual/inheritModuleSearchPath/imports/Foo.qbs
+++ b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/imports/Foo.qbs
diff --git a/tests/manual/inheritModuleSearchPath/main.cpp b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/main.cpp
index 7382cd2dd..7382cd2dd 100644
--- a/tests/manual/inheritModuleSearchPath/main.cpp
+++ b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/main.cpp
diff --git a/tests/manual/inheritModuleSearchPath/prj.qbs b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/prj.qbs
index ba8284f4f..ba8284f4f 100644
--- a/tests/manual/inheritModuleSearchPath/prj.qbs
+++ b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/prj.qbs
diff --git a/tests/manual/inheritModuleSearchPath/subdir/modules/bli/m.qbs b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/subdir/modules/bli/m.qbs
index b4b93678a..b4b93678a 100644
--- a/tests/manual/inheritModuleSearchPath/subdir/modules/bli/m.qbs
+++ b/tests/auto/blackbox/testdata/inheritQbsSearchPaths/subdir/modules/bli/m.qbs
diff --git a/tests/manual/proper quoting/main.cpp b/tests/auto/blackbox/testdata/proper quoting/main.cpp
index 26e0cdc49..26e0cdc49 100644
--- a/tests/manual/proper quoting/main.cpp
+++ b/tests/auto/blackbox/testdata/proper quoting/main.cpp
diff --git a/tests/manual/proper quoting/my static lib helper.cpp b/tests/auto/blackbox/testdata/proper quoting/my static lib helper.cpp
index 76a6a38e9..76a6a38e9 100644
--- a/tests/manual/proper quoting/my static lib helper.cpp
+++ b/tests/auto/blackbox/testdata/proper quoting/my static lib helper.cpp
diff --git a/tests/manual/proper quoting/my static lib.cpp b/tests/auto/blackbox/testdata/proper quoting/my static lib.cpp
index c346a6846..c346a6846 100644
--- a/tests/manual/proper quoting/my static lib.cpp
+++ b/tests/auto/blackbox/testdata/proper quoting/my static lib.cpp
diff --git a/tests/manual/proper quoting/proper quoting.qbs b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
index 64a35b46b..64a35b46b 100644
--- a/tests/manual/proper quoting/proper quoting.qbs
+++ b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
diff --git a/tests/manual/proper quoting/some helper/some helper.cpp b/tests/auto/blackbox/testdata/proper quoting/some helper/some helper.cpp
index dcdc7349b..dcdc7349b 100644
--- a/tests/manual/proper quoting/some helper/some helper.cpp
+++ b/tests/auto/blackbox/testdata/proper quoting/some helper/some helper.cpp
diff --git a/tests/manual/proper quoting/some helper/some helper.h b/tests/auto/blackbox/testdata/proper quoting/some helper/some helper.h
index fe13c76c4..fe13c76c4 100644
--- a/tests/manual/proper quoting/some helper/some helper.h
+++ b/tests/auto/blackbox/testdata/proper quoting/some helper/some helper.h
diff --git a/tests/manual/propertiesblocks/main.cpp b/tests/auto/blackbox/testdata/propertiesBlocks/main.cpp
index 0ddce8345..0ddce8345 100644
--- a/tests/manual/propertiesblocks/main.cpp
+++ b/tests/auto/blackbox/testdata/propertiesBlocks/main.cpp
diff --git a/tests/manual/propertiesblocks/propertiesblocks.qbs b/tests/auto/blackbox/testdata/propertiesBlocks/propertiesblocks.qbs
index 5fe02a103..5fe02a103 100644
--- a/tests/manual/propertiesblocks/propertiesblocks.qbs
+++ b/tests/auto/blackbox/testdata/propertiesBlocks/propertiesblocks.qbs
diff --git a/tests/manual/transformers/main.cpp b/tests/auto/blackbox/testdata/transformers/main.cpp
index b7ce4f10f..b7ce4f10f 100644
--- a/tests/manual/transformers/main.cpp
+++ b/tests/auto/blackbox/testdata/transformers/main.cpp
diff --git a/tests/manual/transformers/transformers.qbs b/tests/auto/blackbox/testdata/transformers/transformers.qbs
index 7445bea15..7445bea15 100644
--- a/tests/manual/transformers/transformers.qbs
+++ b/tests/auto/blackbox/testdata/transformers/transformers.qbs
diff --git a/tests/manual/uic/bla.cpp b/tests/auto/blackbox/testdata/uic/bla.cpp
index b11cb9b43..b11cb9b43 100644
--- a/tests/manual/uic/bla.cpp
+++ b/tests/auto/blackbox/testdata/uic/bla.cpp
diff --git a/tests/manual/uic/bla.h b/tests/auto/blackbox/testdata/uic/bla.h
index 6c3a7d3a5..6c3a7d3a5 100644
--- a/tests/manual/uic/bla.h
+++ b/tests/auto/blackbox/testdata/uic/bla.h
diff --git a/tests/manual/uic/ui.h b/tests/auto/blackbox/testdata/uic/ui.h
index a6898c2c6..a6898c2c6 100644
--- a/tests/manual/uic/ui.h
+++ b/tests/auto/blackbox/testdata/uic/ui.h
diff --git a/tests/manual/uic/ui.ui b/tests/auto/blackbox/testdata/uic/ui.ui
index b07f62d05..b07f62d05 100644
--- a/tests/manual/uic/ui.ui
+++ b/tests/auto/blackbox/testdata/uic/ui.ui
diff --git a/tests/manual/uic/uic.qbs b/tests/auto/blackbox/testdata/uic/uic.qbs
index cea4ec2a1..cea4ec2a1 100644
--- a/tests/manual/uic/uic.qbs
+++ b/tests/auto/blackbox/testdata/uic/uic.qbs
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index a78b68711..0d378259f 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -190,6 +190,12 @@ void TestBlackbox::initTestCase()
ccp(testSourceDir, testDataDir);
}
+void TestBlackbox::baseProperties()
+{
+ QDir::setCurrent(testDataDir + QLatin1String("/baseProperties"));
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackbox::build_project_data()
{
QTest::addColumn<QString>("projectSubDir");
@@ -884,6 +890,18 @@ void TestBlackbox::trackRemoveProduct()
QVERIFY(!m_qbsStdout.contains("linking product3"));
}
+void TestBlackbox::transformers()
+{
+ QDir::setCurrent(testDataDir + "/transformers");
+ QCOMPARE(runQbs(), 0);
+}
+
+void TestBlackbox::uic()
+{
+ QDir::setCurrent(testDataDir + "/uic");
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackbox::wildcardRenaming()
{
QDir::setCurrent(testDataDir + "/wildcard_renaming");
@@ -1149,6 +1167,12 @@ void TestBlackbox::disabledProject()
QCOMPARE(runQbs(), 0);
}
+void TestBlackbox::dynamicLibs()
+{
+ QDir::setCurrent(testDataDir + "/dynamicLibs");
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackbox::explicitlyDependsOn()
{
QDir::setCurrent(testDataDir + "/explicitlyDependsOn");
@@ -1272,6 +1296,30 @@ void TestBlackbox::jsExtensionsTextFile()
QCOMPARE(lines.at(4).trimmed().constData(), "true");
}
+void TestBlackbox::inheritQbsSearchPaths()
+{
+ QDir::setCurrent(testDataDir + "/inheritQbsSearchPaths");
+ QCOMPARE(runQbs(), 0);
+}
+
+void TestBlackbox::properQuoting()
+{
+ QDir::setCurrent(testDataDir + "/proper quoting");
+ QCOMPARE(runQbs(), 0);
+ QbsRunParameters params(QStringList() << "run" << "-qp" << "Hello World");
+ params.expectFailure = true; // Because the exit code is non-zero.
+ QCOMPARE(runQbs(params), 156);
+ const char * const expectedOutput = "whitespaceless\ncontains space\ncontains\ttab\n"
+ "backslash\\\nbackslash\\\nHello World! The magic number is 156.";
+ QCOMPARE(unifiedLineEndings(m_qbsStdout).constData(), expectedOutput);
+}
+
+void TestBlackbox::propertiesBlocks()
+{
+ QDir::setCurrent(testDataDir + "/propertiesBlocks");
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackbox::installedApp()
{
QDir::setCurrent(testDataDir + "/installed_artifact");
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 6d4770d34..c9a5d975b 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -93,6 +93,7 @@ public slots:
void initTestCase();
private slots:
+ void baseProperties();
void build_project_data();
void build_project();
void build_project_dry_run_data();
@@ -100,12 +101,16 @@ private slots:
void dependenciesProperty();
void disabledProduct();
void disabledProject();
+ void dynamicLibs();
void explicitlyDependsOn();
void fileDependencies();
void jsExtensionsFile();
void jsExtensionsFileInfo();
void jsExtensionsProcess();
void jsExtensionsTextFile();
+ void inheritQbsSearchPaths();
+ void properQuoting();
+ void propertiesBlocks();
void resolve_project_data();
void resolve_project();
void resolve_project_dry_run_data();
@@ -125,6 +130,8 @@ private slots:
void trackAddMocInclude();
void trackAddProduct();
void trackRemoveProduct();
+ void transformers();
+ void uic();
void wildcardRenaming();
void recursiveRenaming();
void recursiveWildcards();
diff --git a/tests/manual/configure/modules/definition/module.qbs b/tests/manual/configure/modules/definition/module.qbs
index 729656e96..3e3509e20 100644
--- a/tests/manual/configure/modules/definition/module.qbs
+++ b/tests/manual/configure/modules/definition/module.qbs
@@ -1,4 +1,5 @@
import qbs 1.0
+import qbs.Process
Module {
name: 'definition'
@@ -24,6 +25,7 @@ Module {
found = false;
result = undefined;
}
+ p.close();
}
}
cpp.defines: node.found ? 'TEXT="Configured at ' + node.result + '"' : undefined
diff --git a/tests/manual/groupTaggerConflict/test.qbs b/tests/manual/groupTaggerConflict/test.qbs
index ebdabd492..86b9424ee 100644
--- a/tests/manual/groupTaggerConflict/test.qbs
+++ b/tests/manual/groupTaggerConflict/test.qbs
@@ -3,11 +3,11 @@ import qbs 1.0
Project {
Product {
- type: ["dynamiclibrary", "installed_content"]
+ type: ["dynamiclibrary"]
name: "bar"
Depends { name: "cpp" }
- Depends { name: "qt"; submodules: ['core'] }
+ Depends { name: "Qt"; submodules: ['core'] }
files: [
"src/bar.cpp"
@@ -15,16 +15,14 @@ Project {
Group {
condition: Qt.core.versionMajor === 4
- overrideTags: false
+ qbs.install: true
qbs.installDir: "include/bar"
- fileTags: ["install"]
files: ["src/bar_qt4.h"]
}
Group {
condition: Qt.core.versionMajor === 5
- overrideTags: false
+ qbs.install: true
qbs.installDir: "include/bar"
- fileTags: ["install"]
files: ["src/bar_qt5.h"]
}
}
diff --git a/tests/manual/productmoduledeps/productmoduledeps.qbs b/tests/manual/productmoduledeps/productmoduledeps.qbs
index 9f6509723..1b665b880 100644
--- a/tests/manual/productmoduledeps/productmoduledeps.qbs
+++ b/tests/manual/productmoduledeps/productmoduledeps.qbs
@@ -13,10 +13,9 @@ Project {
Product {
name: 'dummy'
- type: 'installed_content'
Group {
files: 'main.cpp'
- fileTags: 'install'
+ qbs.install: true
}
Export {
Depends { name: 'dummy2' }
@@ -25,10 +24,9 @@ Project {
Product {
name: 'dummy2'
- type: 'installed_content'
Group {
files: 'lib1.cpp'
- fileTags: 'install'
+ qbs.install: true
}
Export {
Depends { name: 'lib1' }