ensure symlinked shells don't break the tests

This commit is contained in:
Christoph Cullmann
2025-07-31 17:36:34 +02:00
parent 1ef93078d9
commit 3bb5fb0e1b

View File

@@ -133,7 +133,11 @@ void TerminalInterfaceTest::testTerminalInterface()
QFile procExeTarget(QStringLiteral("/proc/%1/exe").arg(terminalProcessId));
if (procExeTarget.exists()) {
QCOMPARE(procExeTarget.symLinkTarget(), defaultExePath.trimmed());
const auto procExeTargetNormalized = QFileInfo(procExeTarget.symLinkTarget()).canonicalFilePath();
const auto defaultExePathNormalized = QFileInfo(defaultExePath.trimmed()).canonicalFilePath();
QVERIFY(!procExeTargetNormalized.isEmpty());
QVERIFY(!defaultExePathNormalized.isEmpty());
QCOMPARE(procExeTargetNormalized, defaultExePathNormalized);
}
#endif