diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-08-16 01:54:24 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-08-23 08:55:49 +0000 |
commit | 800eab6fc2ad4203bea4ab4eb2b20862c6edb2a2 (patch) | |
tree | f2d8fbf93416a0a7c67f2ca9b6fa9201bf8aa18b /tests/auto/blackbox/testdata/localDeployment | |
parent | ca1d2a7ffdabcb3de4477427d23b7d309ec33c02 (diff) |
Move all remaining manual tests into autotests
Most of these are easily automatable, and are more useful being run
automatically in every integration rather than manually, and probably
never. Adapt tests as necessary.
Change-Id: Ie158481ad8c45ad8d808feacd98c71972dc18900
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata/localDeployment')
-rw-r--r-- | tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs | 25 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/localDeployment/main.cpp | 43 |
2 files changed, 68 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs b/tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs new file mode 100644 index 000000000..9a230f16a --- /dev/null +++ b/tests/auto/blackbox/testdata/localDeployment/localDeployment.qbs @@ -0,0 +1,25 @@ +import qbs 1.0 + +Project { + Product { + type: ["application"] + consoleApplication: true + name: "HelloWorld" + destinationDirectory: "bin" + + Depends { name: "cpp" } + + Group { + fileTagsFilter: product.type + qbs.install: true + qbs.installDir: "bin" + } + + Group { + qbs.install: true + qbs.installDir: "share" + files: ['main.cpp'] + } + } +} + diff --git a/tests/auto/blackbox/testdata/localDeployment/main.cpp b/tests/auto/blackbox/testdata/localDeployment/main.cpp new file mode 100644 index 000000000..ea86f0baa --- /dev/null +++ b/tests/auto/blackbox/testdata/localDeployment/main.cpp @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <fstream> +#include <iostream> + +int main(int argc, char *argv[]) +{ + if (argc != 1) + return 1; + + std::string s = argv[0]; + std::ifstream in(s.substr(0, s.find_last_of("/")) + "/../share/main.cpp"); + std::string str((std::istreambuf_iterator<char>(in)), + std::istreambuf_iterator<char>()); + std::cout << str << std::endl; + return 0; +} |