summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux/filesystemaccess_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}Jarek Kobus2023-05-041-1/+1
| | | | | | | | Follows QtcProcess -> Process rename. Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Rename QtcProcess -> ProcessJarek Kobus2023-05-041-1/+1
| | | | | | | | Task-number: QTCREATORBUG-29102 Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Tasking::Streamer: Rename Streamer into FileStreamerTaskJarek Kobus2023-05-031-6/+6
| | | | | | | | Rename FileStreamerAdapter into FileStreamerTaskAdapter. Task-number: QTCREATORBUG-29102 Change-Id: I8e8b773116a4c7203531341074b7c8efcef4f5f8 Reviewed-by: hjk <hjk@qt.io>
* RemoteLinux: Honor working directory setting againhjk2023-04-211-0/+16
| | | | | | Fixes: QTCREATORBUG-28900 Change-Id: I163877a749f378b2aa7579c1985e58f8a9d87e2c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* FilePath: Integrate FileStreamerManager for async i-faceJarek Kobus2023-03-071-97/+0
| | | | | | Change-Id: I3371471e3c23b86a62b5e4056b343941ab46e191 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Utils: Introduce FileStreamerManagerJarek Kobus2023-03-031-3/+121
| | | | | | | To be used for FilePath::async[Copy/Read/Write]() methods. Change-Id: Ie34e600f8d65eae10b41893e15685afe19ce2a46 Reviewed-by: hjk <hjk@qt.io>
* Utils: Introduce FileStreamerJarek Kobus2023-03-031-5/+350
| | | | | | | | | | | The class is responsible for asynchronous read / write of file contents. The file may be local or remote. It's also able to do an asynchronous copy of files between different devices. Change-Id: I65e4325b6b7f98bfc17286c9a72b0018db472a16 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Utils: Use an enum indication the possible abort of an dir iterationhjk2023-01-261-2/+2
| | | | | | | | The bool is not really clear. Change-Id: I4ce6412736aec6b1853fd53d4e535ad045748350 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* RemoteLinux: Pass context object to lambda connectionsJarek Kobus2022-12-081-1/+1
| | | | | | Change-Id: I025c588e7d32be0f940b74acf9421965073cff5c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Merge remote-tracking branch 'origin/8.0'Eike Ziller2022-09-191-5/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf src/libs/utils/fileutils.cpp src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp src/plugins/qmldesigner/designercore/include/abstractview.h src/plugins/qmldesigner/designercore/include/nodemetainfo.h src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp src/plugins/qmldesigner/designercore/model/model_p.h src/plugins/remotelinux/linuxdevice.cpp tests/auto/utils/fileutils/tst_fileutils.cpp Change-Id: I26a21e2523d3d725fdb8c548a531cdbdaeaeca20
| * testFileTransfer(): Cleanup remote after successful transferJarek Kobus2022-09-141-0/+5
| | | | | | | | | | | | Change-Id: I770149f69a7ff4c897ad495794b60accddbd67e9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * testFileTransfer(): Add more checksJarek Kobus2022-09-131-5/+8
| | | | | | | | | | | | | | | | Make the target path more nested. Task-number: QTCREATORBUG-28151 Change-Id: Iae0660294d873e82e3fef0cbf2411f7c22ef526f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | FilePath: Return optional bytearray for file contentsEike Ziller2022-09-121-3/+3
| | | | | | | | | | | | | | For differentiating between "error" and "empty file". Change-Id: I2c019ceac625e7be3180afa4d47ae3a24df91c1d Reviewed-by: hjk <hjk@qt.io>
* | Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
|/ | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* RemoteLinux: Change the displayed names to 'Remote' instead of 'Generic'Adam Treat2022-06-241-1/+1
| | | | | | Change-Id: I0e6edd24f10c69caf376379e1cec05bf90da9579 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Move FileTransfer into ProjectExplorer pluginJarek Kobus2022-05-301-2/+3
| | | | | | | Make it ready for providing implementations for other devices. Change-Id: I14eaf167a7b2c1189f4d23f2e9f556204295b9b3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Get rid of Ssh libJarek Kobus2022-05-231-2/+1
| | | | | | | | Move the rest to ProjectExplorer plugin. Change-Id: Id2f022359e7e01728779228ea1f7f0b05a81c8e4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Ssh: Rename SshConnectionParameters into SshParametersJarek Kobus2022-05-231-8/+9
| | | | | | | | | | Move it to its own header. Get rid of SshConnection and SshConnectionManager, as they are not used anymore. Change-Id: I52fe20d7816ea57e7a7158ab2ae9565d50a76e21 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Add FileTransfer testJarek Kobus2022-05-231-11/+96
| | | | | Change-Id: I0e71a20823bd50e73f1b642c5183a3626d993e35 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix FileSystemAccessTest::testFileActions() flakinessJarek Kobus2022-03-181-7/+49
| | | | | | | | | | | | | | | | | Always add " > /dev/null 2>&1" infix so that the output of e.g. "rm" command, when failed, is redirected to dev/null. Enclose the input data in runInShell() with quotation marks and escape all the characters in passed data accordingly. Pass the "-e" option to echo in order to turn on the escaping mode. Add a new test for testCreateRemoteFile(). Change-Id: I7db07b57035242279cac7dd77a80ac6dd05bfb1f Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* RemoteLinux: Avoid unexpected password dialog in testsChristian Stenger2022-03-161-16/+31
| | | | | | | | | | Make the test depend on environment variables and give some hint how to run the test correctly. Beside this make the test work on Windows and share the setup with ssh unit test. Change-Id: I6bbf1ec863449512646ca2c51d13fec537beedbc Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Remove IDeviceFactory::setCanCreatehjk2022-02-041-1/+0
| | | | | | | | | | | | | That's implicit now by using setCreator() The Android case looks odd as this is (and was) effectively static information at startup. This will be addressed in a follow-up patch, for now keep it functionally equivalent. Change-Id: I4e6082f88dcd21379186340189acb581caef172a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Use a lambda for DeviceFactory::create()hjk2022-01-261-13/+11
| | | | | | | | Somewhat slimmer interface on the user code side and follows existing practice. Change-Id: I20ed8f5a00591265d32ea9ce93e1f1bbc76d2437 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Wrap various file system iteration flags and filtershjk2022-01-261-2/+1
| | | | | | | | | | | ... into a single class. This makes passing them around as a whole easier, and opens a path to have "generic" filters in form of a lambda or such. Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Introduce IDevice::bytesAvailable()Jarek Kobus2022-01-051-0/+7
| | | | | | | It's going to replace RemoteLinuxCheckForFreeDiskSpaceService. Change-Id: If8c30a57b9013387c69412f12102bcd4d41a88b5 Reviewed-by: hjk <hjk@qt.io>
* RemoteLinux: Move test actions to special test dirArtem Sokolovskii2022-01-051-14/+27
| | | | | Change-Id: I9be4a1e7de1ae1accc507109bcf5f3b6188a8925 Reviewed-by: hjk <hjk@qt.io>
* RemoteLinux: Implement some of the remote file APIhjk2022-01-041-0/+141
Implementation of remote file API for correct FilePath work with RemoteLinux. Added tests for this functionality Run ssh shell in separate thread. The linux device instance keeps its own thread for running SshRemoteProcess. In this way all calls to filepath interface of linux device coming from different threads are executed in one thread (SshRemoteProcess is reentrant, but not thread safe). The redirection to the device thread is done by invoking SshRemoteProcess' methods through BlockingQueuedConnection. Done-by: Artem Sokolovskii Change-Id: Id8756738d3a4597f175c8ef000c148d0c8536eeb Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>