From b2331dd5f6c16b1927661fda00411e3cca36a2d7 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 10 Mar 2022 10:18:35 +0100 Subject: [PATCH] Fix paths to subprocesses when test is run from other directory Now it's possible to run the test outside of directory where the test is located. Change-Id: I2a2c693d382917ac7b84488c8ccf161538b58238 Reviewed-by: hjk Reviewed-by: Eike Ziller --- tests/auto/utils/qtcprocess/tst_qtcprocess.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp b/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp index d006f9495ed..9987781c9cc 100644 --- a/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp +++ b/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp @@ -105,7 +105,8 @@ static CommandLine subCommandLine() { QStringList args = QCoreApplication::arguments(); const QString binary = args.takeFirst(); - return CommandLine(FilePath::fromString(binary), args); + const FilePath filePath = FilePath::fromString(QDir::currentPath()).resolvePath(binary); + return CommandLine(filePath, args); } class SubCreatorConfig