diff --git a/src/plugins/remotelinux/filesystemaccess_test.cpp b/src/plugins/remotelinux/filesystemaccess_test.cpp index 37b7b0da8ab..cb0cf3b83ee 100644 --- a/src/plugins/remotelinux/filesystemaccess_test.cpp +++ b/src/plugins/remotelinux/filesystemaccess_test.cpp @@ -241,7 +241,7 @@ void FileSystemAccessTest::testFileTransfer() QVERIFY2(dirForFilesToDownload.isValid(), qPrintable(dirForFilesToDownload.errorString())); QVERIFY2(dir2ForFilesToDownload.isValid(), qPrintable(dirForFilesToDownload.errorString())); static const auto getRemoteFilePath = [this](const QString &localFileName) { - return m_device->filePath(QString("/tmp/").append(localFileName).append(".upload")); + return m_device->filePath(QString("/tmp/foo/bar/").append(localFileName).append(".upload")); }; FilesToTransfer filesToUpload; std::srand(QDateTime::currentDateTime().toSecsSinceEpoch()); @@ -277,11 +277,11 @@ void FileSystemAccessTest::testFileTransfer() getRemoteFilePath(bigFileName)}; fileTransfer.setFilesToTransfer(filesToUpload); - QString jobError; + ProcessResultData result; QEventLoop loop; - connect(&fileTransfer, &FileTransfer::done, [&jobError, &loop] + connect(&fileTransfer, &FileTransfer::done, [&result, &loop] (const ProcessResultData &resultData) { - jobError = resultData.m_errorString; + result = resultData; loop.quit(); }); QTimer timer; @@ -293,7 +293,10 @@ void FileSystemAccessTest::testFileTransfer() loop.exec(); QVERIFY(timer.isActive()); timer.stop(); - QVERIFY2(jobError.isEmpty(), qPrintable(jobError)); + QCOMPARE(result.m_exitStatus, QProcess::NormalExit); + QVERIFY2(result.m_errorString.isEmpty(), qPrintable(result.m_errorString)); + QCOMPARE(result.m_exitCode, 0); + QCOMPARE(result.m_error, QProcess::UnknownError); } } // Internal