Most logged items span more than one line, so be generous with extra
newlines.
Also, complain only about when host-local read access into the
docker device ist not possible, writing is generally done only
in the separately mounted places after re-mapping to host-local paths
in the host file system.
Change-Id: I5525749dfb880d4dc3547f86de43314567e92b4d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Still use the so-far hardcoded "/opt" and "/data" as default, i.e.
not the intended final setup which should at least pick up
the source and build dirs automatically.
Change-Id: If632f3f5a6e824a952938c97336df8ff58b39d67
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Essentially a kind of 'touch', to be used in the CMake file API.
Change-Id: Iaae62b441c0006b39d4bef5f06420e798c28c2a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Sprinkle a few QTC_ASSERT to make sure we are in a known
context.
Cmake's FileApiReader uses this before moving directories
as QFile::rename does not do anything if the target exists.
Change-Id: I555f99e81a9fe7d93ae66145eeebfa9d5880bc51
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We query the device with executables that may or may not exist.
So, expect the call to fail if the image does not contain the
respective executable in PATH.
Change-Id: Iff43879c72155de8a8a9276e26085d03ead61f2f
Reviewed-by: hjk <hjk@qt.io>
Trying to use /tmp on Windows ends up in a failing process call
as this directory usually does not exist.
Change-Id: I80a5e45c474d3fe6ff6f2ede67837722cb59078a
Reviewed-by: hjk <hjk@qt.io>
This ensures typical files created in the build process are
accessible and removable(!) by the user outside.
Downside is that some commands (e.g. whoami) won't work well
within the container as that user typically is not listed in
/etc/passwd etc. inside the container. Buildsteps requiring
them won't work until the container image is (re-)created with
this data in place.
In general, there seems to be no silver bullet for this problem.
An extensive discussion of pros and cons can be found at
https://jtreminio.com/blog/running-docker-containers-as-current-host-user
Change-Id: I0421e031324ffe3d64b9aeede289a43357c46e3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
On Windows this call takes way longer to write to the cidfile.
Beside this, read only from file if it could be opened to
silence some Qt internal warnings.
Change-Id: Iec5f631aaf871995c1903289d7a0a24abc2f8e05
Reviewed-by: hjk <hjk@qt.io>
Search in build device path instead of two hardcoded locations.
Change-Id: I91e047aa48eb6566353e3ba090070c2a00b3dd06
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Baby step on the path from hard coded to user defined.
Change-Id: I2536924c5ba07dadcbe3c94304d55db25f876987
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Some more visible logging since toolchain detection takes long.
Change-Id: I565a5b0051f485ddf18c2cb034283287d6185190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Even when the fallbacks via 'docker exec' work this will cause a
significant performance hit. Better inform the user.
Change-Id: If369dcc498bffa2ef422dab3e69325c4122b45ad
Reviewed-by: David Schulz <david.schulz@qt.io>
Kit and QtVersion for now, ToolChains seem to lack easy access.
Change-Id: I657cb075dd3b4f6fd8ebfd3d6d20b1cdd4dce831
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
While the original plan was to use more specific functions like
'isReadableFile' to cut down the number of accesses, it is
unrealistic to re-write all occurrences in reasonable time.
So make the basic building blocks accessible, too.
Change-Id: I2586ebd19e1e7ae2c884fd2a4180869421293e3a
Reviewed-by: David Schulz <david.schulz@qt.io>
For synchronous retrieval of the system environment of the device.
Change-Id: I057f9591866b72e37733d495a2a6b203fae91ac4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We need the on-device path in "docker exec", not the global version of it.
This was not visible earlier as some more places used local paths,
accidentally matching the on-device path.
Change-Id: If1d7e94d2cf0730e85e5a89972d7eaa309743fa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Device, Toolchain, and Qt; no Debugger, cmake, ...
Change-Id: Icca660aef62470dda638050fddb74fb1a3032af2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This reverts a bit of fe8fbf1a4a which was over-shooting API-wise.
Change-Id: Iac4c2b9fa550f7ec0b0aa8deea8c3fc6b6ddcfba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Enforces the use of {setE,e}nvironment for better control.
Change-Id: Iffd9ee4604a6735ee886ecc7623a58729ecd245a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use it to avoid IDevice interface clutter.
Change-Id: I4a04f04e2c343593d937a402060e56ef94fcabf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Container file system accesses are primarily done through the host
file system by prepending the appropriate path.
This is Linux-only, and only in case the volumes are mounted to
the same relative location in the container.
As a fallback, provide the functionality also via 'docker exec'.
This is, however, too slow to be used in the future.
Change-Id: I23185ae45184cb7b1de7c723a01ab96fe9c0801e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The "Docker Container" runconfig executes 'docker run <image>' without
further attributes, and "works" with docker's hello-world example image.
Change-Id: Ib9417d238ac0757db16be1fc21af40c81db02f05
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>