summaryrefslogtreecommitdiff
path: root/tests/auto/debugger
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-01-17 16:13:03 +0100
committerhjk <hjk121@nokiamail.com>2014-01-17 17:16:17 +0100
commit8b99e5532fcf51249ecfe44b19ca24642240caa2 (patch)
treec200a8c33a6bf6564bd05a7cd9b42d20065d299d /tests/auto/debugger
parent6954144251ce2e3ec28e3ba4f0fd56f244a899ac (diff)
downloadqt-creator-8b99e5532fcf51249ecfe44b19ca24642240caa2.tar.gz
Debugger: Add facility to run dumper test with DYLD_IMAGE_SUFFIX
Change-Id: I5f79436b61a3a04de9b7b669bece2204ac858edb Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'tests/auto/debugger')
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 64604e3d86..ee37bf7051 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -546,6 +546,7 @@ struct LldbVersion : VersionBase
struct ForceC {};
struct EigenProfile {};
+struct UseDebugImage {};
struct CoreProfile {};
struct CorePrivateProfile {};
@@ -557,7 +558,7 @@ struct DataBase
DataBase()
: useQt(false), useQHash(false),
forceC(false), engines(DumpTestGdbEngine | DumpTestCdbEngine | DumpTestLldbEngine),
- glibcxxDebug(false)
+ glibcxxDebug(false), useDebugImage(false)
{}
mutable bool useQt;
@@ -565,6 +566,7 @@ struct DataBase
mutable bool forceC;
mutable int engines;
mutable bool glibcxxDebug;
+ mutable bool useDebugImage;
mutable GdbVersion neededGdbVersion;
mutable LldbVersion neededLldbVersion;
mutable QtVersion neededQtVersion;
@@ -632,6 +634,12 @@ public:
return *this;
}
+ const Data &operator%(const UseDebugImage &) const
+ {
+ useDebugImage = true;
+ return *this;
+ }
+
const Data &operator%(const CoreProfile &) const
{
profileExtra +=
@@ -1122,8 +1130,12 @@ void tst_Dumpers::dumper()
t->input = cmds;
+ QProcessEnvironment env = m_env;
+ if (data.useDebugImage)
+ env.insert(QLatin1String("DYLD_IMAGE_SUFFIX"), QLatin1String("_debug"));
+
QProcess debugger;
- debugger.setProcessEnvironment(m_env);
+ debugger.setProcessEnvironment(env);
debugger.setWorkingDirectory(t->buildPath);
debugger.start(QString::fromLatin1(exe), args);
QVERIFY(debugger.waitForStarted());
@@ -3771,8 +3783,8 @@ void tst_Dumpers::dumper_data()
"var.setValue(ha);\n"
"QHostAddress ha1 = var.value<QHostAddress>();\n"
"unused(&ha1);\n")
- % CoreProfile()
- % Profile("QT += network\n")
+ % NetworkProfile()
+ % UseDebugImage()
% Check("ha", "\"127.0.0.1\"", "@QHostAddress")
% Check("ha.a", "2130706433", "@quint32")
% Check("ha.ipString", "\"127.0.0.1\"", "@QString")