diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-03-14 15:24:09 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-03-14 16:31:51 +0100 |
commit | ae6392f90d7a1de97262d934e0150cc53ea32451 (patch) | |
tree | 1bef1e06dd379c2dd425421286fdc22c9e75b227 /tests | |
parent | fe1048e5b31504d525482c6fcf0298afdea6bda9 (diff) |
fix library dependency order
Autotest from the bug report added.
Task-number: QBS-524
Change-Id: I2ef3485db749424339a2ea96900e49fa5d1363d4
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/a1.cpp | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/a2.cpp | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/b.cpp | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/c.cpp | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/d.cpp | 9 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/dep.qbs | 68 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/e.cpp | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/staticLibDeps/main.cpp | 10 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 3 |
9 files changed, 125 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/staticLibDeps/a1.cpp b/tests/auto/blackbox/testdata/staticLibDeps/a1.cpp new file mode 100644 index 000000000..862d76783 --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/a1.cpp @@ -0,0 +1,7 @@ +#include <iostream> + +void a1() +{ + std::cout << "a1" << std::endl; +} + diff --git a/tests/auto/blackbox/testdata/staticLibDeps/a2.cpp b/tests/auto/blackbox/testdata/staticLibDeps/a2.cpp new file mode 100644 index 000000000..d1f41731c --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/a2.cpp @@ -0,0 +1,7 @@ +#include <iostream> + +void a2() +{ + std::cout << "a2" << std::endl; +} + diff --git a/tests/auto/blackbox/testdata/staticLibDeps/b.cpp b/tests/auto/blackbox/testdata/staticLibDeps/b.cpp new file mode 100644 index 000000000..a88cc9d90 --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/b.cpp @@ -0,0 +1,7 @@ +void a1(); + +void b() +{ + a1(); +} + diff --git a/tests/auto/blackbox/testdata/staticLibDeps/c.cpp b/tests/auto/blackbox/testdata/staticLibDeps/c.cpp new file mode 100644 index 000000000..264db582a --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/c.cpp @@ -0,0 +1,7 @@ +void a2(); + +void c() +{ + a2(); +} + diff --git a/tests/auto/blackbox/testdata/staticLibDeps/d.cpp b/tests/auto/blackbox/testdata/staticLibDeps/d.cpp new file mode 100644 index 000000000..a7a2b9f85 --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/d.cpp @@ -0,0 +1,9 @@ +void b(); +void c(); + +void d() +{ + b(); + c(); +} + diff --git a/tests/auto/blackbox/testdata/staticLibDeps/dep.qbs b/tests/auto/blackbox/testdata/staticLibDeps/dep.qbs new file mode 100644 index 000000000..06d79a32f --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/dep.qbs @@ -0,0 +1,68 @@ +import qbs 1.0 + +Project { + StaticLibrary { + name: "a" + + Depends { name: "cpp" } + + files: [ + "a1.cpp", + "a2.cpp", + ] + } + StaticLibrary { + name: "b" + + Depends { name: "cpp" } + + Depends { name: "a" } + + files: [ + "b.cpp", + ] + } + StaticLibrary { + name: "c" + + Depends { name: "cpp" } + + Depends { name: "a" } + + files: [ + "c.cpp", + ] + } + StaticLibrary { + name: "d" + + Depends { name: "cpp" } + + Depends { name: "b" } + Depends { name: "c" } + + files: [ + "d.cpp", + ] + } + StaticLibrary { + name: "e" + + Depends { name: "cpp" } + + Depends { name: "d" } + + files: [ + "e.cpp", + ] + } + CppApplication { + name: "staticLibDeps" + + Depends { name: "e" } + + files: [ + "main.cpp", + ] + } +} diff --git a/tests/auto/blackbox/testdata/staticLibDeps/e.cpp b/tests/auto/blackbox/testdata/staticLibDeps/e.cpp new file mode 100644 index 000000000..af7d24682 --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/e.cpp @@ -0,0 +1,7 @@ +void d(); + +void e() +{ + d(); +} + diff --git a/tests/auto/blackbox/testdata/staticLibDeps/main.cpp b/tests/auto/blackbox/testdata/staticLibDeps/main.cpp new file mode 100644 index 000000000..3753dd5cb --- /dev/null +++ b/tests/auto/blackbox/testdata/staticLibDeps/main.cpp @@ -0,0 +1,10 @@ +#include <cstdlib> + +void e(); + +int main() +{ + e(); + return EXIT_SUCCESS; +} + diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index db0928e4d..76f9d6b6a 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -302,6 +302,9 @@ void TestBlackbox::build_project_data() QTest::newRow("source files with the same base name but different extensions") << QString("sameBaseName") << QString(HostOsInfo::appendExecutableSuffix(buildDir + "/basename")); + QTest::newRow("static library dependencies") + << QString("staticLibDeps") + << QString(HostOsInfo::appendExecutableSuffix(buildDir + "/staticLibDeps")); } void TestBlackbox::build_project() |