summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2020-06-14 21:26:55 +0200
committerMilian Wolff <milian.wolff@kdab.com>2020-06-15 13:11:58 +0000
commita944d9b8f9180b06b9b1c1b81ad0586707d13afe (patch)
tree343dce55b1a4a5e0c4f1dbdef63a61ab7fd3a4a6
parent32be1f61f86f48280658adf7e3ca9d00be4b9a60 (diff)
Fix TestPerfData::testTracingData when run with older Qt
While building the hotspot AppImage, the test is failing as the expected messages where not found. Indeed, the format is slightly different: PerfUnwind::ErrorCode(MissingElfFile): Could not find ELF file ... Fix this by using a regex substring match instead. Change-Id: Ida4696014e2b631760fb7b5f4a41d8cae1040762 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--tests/auto/perfdata/tst_perfdata.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/perfdata/tst_perfdata.cpp b/tests/auto/perfdata/tst_perfdata.cpp
index bb81d1a..a29a677 100644
--- a/tests/auto/perfdata/tst_perfdata.cpp
+++ b/tests/auto/perfdata/tst_perfdata.cpp
@@ -118,29 +118,29 @@ void TestPerfData::testTracingData()
PerfUnwind unwind(&output, ":/", QString(), QString(), QString(), stats);
if (!stats) {
QTest::ignoreMessage(QtWarningMsg,
- "PerfUnwind::MissingElfFile: Could not find ELF file for "
+ QRegularExpression(QRegularExpression::escape("Could not find ELF file for "
"/home/ulf/dev/untitled1-Qt_5_9_1_gcc_64-Profile/untitled1. "
- "This can break stack unwinding and lead to missing symbols.");
+ "This can break stack unwinding and lead to missing symbols.")));
QTest::ignoreMessage(QtWarningMsg,
- "PerfUnwind::MissingElfFile: Could not find ELF file for "
+ QRegularExpression(QRegularExpression::escape("Could not find ELF file for "
"/lib/x86_64-linux-gnu/ld-2.24.so. "
- "This can break stack unwinding and lead to missing symbols.");
+ "This can break stack unwinding and lead to missing symbols.")));
QTest::ignoreMessage(QtWarningMsg,
- "PerfUnwind::MissingElfFile: Could not find ELF file for "
+ QRegularExpression(QRegularExpression::escape("Could not find ELF file for "
"/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22. "
- "This can break stack unwinding and lead to missing symbols.");
+ "This can break stack unwinding and lead to missing symbols.")));
QTest::ignoreMessage(QtWarningMsg,
- "PerfUnwind::MissingElfFile: Could not find ELF file for "
+ QRegularExpression(QRegularExpression::escape("Could not find ELF file for "
"/lib/x86_64-linux-gnu/libm-2.24.so. "
- "This can break stack unwinding and lead to missing symbols.");
+ "This can break stack unwinding and lead to missing symbols.")));
QTest::ignoreMessage(QtWarningMsg,
- "PerfUnwind::MissingElfFile: Could not find ELF file for "
+ QRegularExpression(QRegularExpression::escape("Could not find ELF file for "
"/lib/x86_64-linux-gnu/libgcc_s.so.1. "
- "This can break stack unwinding and lead to missing symbols.");
+ "This can break stack unwinding and lead to missing symbols.")));
QTest::ignoreMessage(QtWarningMsg,
- "PerfUnwind::MissingElfFile: Could not find ELF file for "
+ QRegularExpression(QRegularExpression::escape("Could not find ELF file for "
"/lib/x86_64-linux-gnu/libc-2.24.so. "
- "This can break stack unwinding and lead to missing symbols.");
+ "This can break stack unwinding and lead to missing symbols.")));
}
process(&unwind, &input);