diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2016-08-16 17:00:59 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2016-08-17 07:58:13 +0000 |
commit | 2863f3b24d8ac94149781935e129a1a3b1e944d2 (patch) | |
tree | bc21fb86a5ebde46da3a2a7ccce86678d558c128 | |
parent | f1cdcf709192b678935cf6a368aaddcce00e958b (diff) |
Give debug info output file a proper path when using mingw
The file name ended in "undefined".
Change-Id: If3a081e166f5952a3028e05832b3fd628b9235cc
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
-rw-r--r-- | share/qbs/modules/cpp/windows-mingw.qbs | 1 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 19 |
2 files changed, 14 insertions, 6 deletions
diff --git a/share/qbs/modules/cpp/windows-mingw.qbs b/share/qbs/modules/cpp/windows-mingw.qbs index 932fe8684..f4152f9ee 100644 --- a/share/qbs/modules/cpp/windows-mingw.qbs +++ b/share/qbs/modules/cpp/windows-mingw.qbs @@ -42,6 +42,7 @@ GenericGCC { staticLibrarySuffix: ".a" dynamicLibrarySuffix: ".dll" executableSuffix: ".exe" + debugInfoSuffix: ".debug" imageFormat: "pe" windowsApiCharacterSet: "unicode" platformDefines: base.concat(WindowsUtils.characterSetDefines(windowsApiCharacterSet)) diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 60c77af50..8fd0075b3 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -1310,12 +1310,19 @@ void TestBlackbox::separateDebugInfo() .entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries).size(), 1); QVERIFY(regularFileExists(relativeProductBuildDir("bar5") + "/bar5.bundle.dwarf")); } else if (toolchain.contains("gcc")) { - QVERIFY(QFile::exists(relativeProductBuildDir("app1") + "/app1.debug")); - QVERIFY(!QFile::exists(relativeProductBuildDir("app2") + "/app2.debug")); - QVERIFY(QFile::exists(relativeProductBuildDir("foo1") + "/libfoo1.so.debug")); - QVERIFY(!QFile::exists(relativeProductBuildDir("foo2") + "/libfoo2.so.debug")); - QVERIFY(QFile::exists(relativeProductBuildDir("bar1") + "/libbar1.so.debug")); - QVERIFY(!QFile::exists(relativeProductBuildDir("bar2") + "/libbar2.so.debug")); + const QString exeSuffix = targetOS.contains("windows") ? ".exe" : ""; + const QString dllPrefix = targetOS.contains("windows") ? "" : "lib"; + const QString dllSuffix = targetOS.contains("windows") ? ".dll" : ".so"; + QVERIFY(QFile::exists(relativeProductBuildDir("app1") + "/app1" + exeSuffix + ".debug")); + QVERIFY(!QFile::exists(relativeProductBuildDir("app2") + "/app2" + exeSuffix + ".debug")); + QVERIFY(QFile::exists(relativeProductBuildDir("foo1") + + '/' + dllPrefix + "foo1" + dllSuffix + ".debug")); + QVERIFY(!QFile::exists(relativeProductBuildDir("foo2") + + '/' + "foo2" + dllSuffix + ".debug")); + QVERIFY(QFile::exists(relativeProductBuildDir("bar1") + + '/' + dllPrefix + "bar1" + dllSuffix + ".debug")); + QVERIFY(!QFile::exists(relativeProductBuildDir("bar2") + + '/' + dllPrefix + "bar2" + dllSuffix + ".debug")); } else if (toolchain.contains("msvc")) { QVERIFY(QFile::exists(relativeProductBuildDir("app1") + "/app1.pdb")); QVERIFY(QFile::exists(relativeProductBuildDir("foo1") + "/foo1.pdb")); |