diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-05-23 12:26:46 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-26 16:16:59 +0200 |
commit | 875f9ba4e7631a3c66e1edfc54f6b4ed6a42b841 (patch) | |
tree | 8ca26ea03d6b85b99f2ba4464850a4f319f81b43 /tests/auto | |
parent | 8917e0cecd80a5d673ac4a6d6586b472aa019d1b (diff) |
run rules on dependency-only products
This enables compound products that do not provide their own source
files but only consist of dependencies.
Task-number: QBS-277
Change-Id: I8e3fc5b5e3a85ca2c6fe4890dcd52d3a55cebfe2
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'tests/auto')
4 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/appWithoutSources/a.cpp b/tests/auto/blackbox/testdata/appWithoutSources/a.cpp new file mode 100644 index 000000000..bf7759e11 --- /dev/null +++ b/tests/auto/blackbox/testdata/appWithoutSources/a.cpp @@ -0,0 +1 @@ +int foo() { return 42; } diff --git a/tests/auto/blackbox/testdata/appWithoutSources/b.cpp b/tests/auto/blackbox/testdata/appWithoutSources/b.cpp new file mode 100644 index 000000000..76c93685d --- /dev/null +++ b/tests/auto/blackbox/testdata/appWithoutSources/b.cpp @@ -0,0 +1,10 @@ +#include <cstdio> + +int foo(); // defined in a.cpp + +int main() +{ + printf("The answer is %d.\n", foo()); + return 0; +} + diff --git a/tests/auto/blackbox/testdata/appWithoutSources/project.qbs b/tests/auto/blackbox/testdata/appWithoutSources/project.qbs new file mode 100644 index 000000000..983cc9bab --- /dev/null +++ b/tests/auto/blackbox/testdata/appWithoutSources/project.qbs @@ -0,0 +1,30 @@ +import qbs 1.0 + +Project { + StaticLibrary { + name: "a" + + Depends { name: "cpp" } + + files: [ + "a.cpp", + ] + } + + StaticLibrary { + name: "b" + + Depends { name: "a" } + Depends { name: "cpp" } + + files: [ + "b.cpp", + ] + } + + CppApplication { + name: "appWithoutSources" + Depends { name: "a" } + Depends { name: "b" } + } +} diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 2d7d9e5aa..86895c114 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -324,6 +324,9 @@ void TestBlackbox::build_project_data() QTest::newRow("simple probes") << QString("simpleProbe") << executableFilePath("MyApp"); + QTest::newRow("application without sources") + << QString("appWithoutSources") + << executableFilePath("appWithoutSources"); } void TestBlackbox::build_project() |