diff options
| author | Christian Kandeler <christian.kandeler@digia.com> | 2013-11-06 12:14:06 +0100 |
|---|---|---|
| committer | Christian Kandeler <christian.kandeler@digia.com> | 2013-11-06 12:16:37 +0100 |
| commit | 2d80d68db948bea027a6e0d9a9e289f112c5dd6e (patch) | |
| tree | 816aa3e9bcfba960265938ff2ba2584c6e4b8131 /tests | |
| parent | 896b90a06a692702e7e5c5da148bdac835c97b6d (diff) | |
| parent | db11fbfc994272c965f62effeb5b464741234ab6 (diff) | |
| download | qbs-2d80d68db948bea027a6e0d9a9e289f112c5dd6e.tar.gz | |
Merge branch '1.1' into 'master'.
Change-Id: Ia6cb10047d02ebe2752984f57e8b729be9d6552e
Diffstat (limited to 'tests')
25 files changed, 33 insertions, 177 deletions
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/auto/blackbox/testdata/proper quoting/main.cpp b/tests/auto/blackbox/testdata/proper quoting/main.cpp index 26e0cdc49..edc62cfcf 100644 --- a/tests/auto/blackbox/testdata/proper quoting/main.cpp +++ b/tests/auto/blackbox/testdata/proper quoting/main.cpp @@ -29,9 +29,6 @@ #include <stdio.h> -#define __stringify__(x) #x -#define stringify(x) __stringify__(x) - int bla(); int main() @@ -40,8 +37,6 @@ int main() printf(DEFINEWITHSPACE"\n"); printf(DEFINEWITHTAB"\n"); printf(DEFINEWITHBACKSLASH"\n"); - printf(stringify(DEFINEWITHBACKSLASHRAW)"\n"); return bla(); } - diff --git a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs index 64a35b46b..c1db3c1b2 100644 --- a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs +++ b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs @@ -12,9 +12,7 @@ Project { 'DEFINEWITHSPACE="contains space"', 'DEFINEWITHTAB="contains\ttab"', 'DEFINEWITHBACKSLASH="backslash\\\\"', - 'DEFINEWITHBACKSLASHRAW=backslash\\\\' ] -// cpp.responseFileThreshold: 0 } Product { @@ -23,7 +21,6 @@ Project { files : [ "my static lib.cpp" ] Depends { name: "cpp" } Depends { name: "helper lib" } -// cpp.responseFileThreshold: 0 } Product { @@ -38,6 +35,5 @@ Project { Depends { name: "cpp" } cpp.includePaths: ['some helper'] } -// cpp.responseFileThreshold: 0 } } 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..116da31fa 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"); @@ -1350,7 +1377,7 @@ void TestBlackbox::properQuoting() 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."; + "backslash\\\nHello World! The magic number is 156."; QCOMPARE(unifiedLineEndings(m_qbsStdout).constData(), expectedOutput); } 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/lib_subdir/app/app.qbs b/tests/manual/lib_subdir/app/app.qbs deleted file mode 100644 index b4e5bf529..000000000 --- a/tests/manual/lib_subdir/app/app.qbs +++ /dev/null @@ -1,10 +0,0 @@ -import qbs 1.0 - -Product { - type: "application" - name : "HelloWorld" - files : [ "main.cpp" ] - Depends { name: "cpp" } - Depends { name: "lol" } -} - diff --git a/tests/manual/lib_subdir/app/main.cpp b/tests/manual/lib_subdir/app/main.cpp deleted file mode 100644 index e7d24bdc3..000000000 --- a/tests/manual/lib_subdir/app/main.cpp +++ /dev/null @@ -1,36 +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. -** -****************************************************************************/ - -#include <stdio.h> - -int bla(); -int main() -{ - return bla(); -} diff --git a/tests/manual/lib_subdir/lib/lib.cpp b/tests/manual/lib_subdir/lib/lib.cpp deleted file mode 100644 index 01c397614..000000000 --- a/tests/manual/lib_subdir/lib/lib.cpp +++ /dev/null @@ -1,40 +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. -** -****************************************************************************/ - -#include <stdio.h> - -#ifndef CRUCIAL_DEFINE -# error CRUCIAL_DEFINE not defined -#endif - -int bla() -{ - puts("Hello WOrld!"); - return 2; -} diff --git a/tests/manual/lib_subdir/lib/lib.qbs b/tests/manual/lib_subdir/lib/lib.qbs deleted file mode 100644 index 036746692..000000000 --- a/tests/manual/lib_subdir/lib/lib.qbs +++ /dev/null @@ -1,10 +0,0 @@ -import qbs 1.0 - -Product { - type: "staticlibrary" - name: "lol" - files: [ "lib.cpp" ] - cpp.defines: ['CRUCIAL_DEFINE'] - Depends { name: 'cpp' } -} - diff --git a/tests/manual/lib_subdir/lib_subdir.qbs b/tests/manual/lib_subdir/lib_subdir.qbs deleted file mode 100644 index 56edf28a4..000000000 --- a/tests/manual/lib_subdir/lib_subdir.qbs +++ /dev/null @@ -1,8 +0,0 @@ -import qbs 1.0 -Project { - references: [ - "app/app.qbs", - "lib/lib.qbs" - ] -} - diff --git a/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs b/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs index ddf8114e9..51272a8d7 100644 --- a/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs +++ b/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs @@ -76,6 +76,6 @@ Project { name: "macappstore" files: "main.cpp" cpp.frameworks: "Foundation" - cpp.minimumSystemVersion: "10.6.8" + cpp.minimumOsxVersion: "10.6.8" } } 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 |
