If no base64 is installed on the target, the shell script
cannot work. Previously this would lead to the shell functions
being unavailable.
This change adds a fallback path. In case no base64 is found,
the shell will create a process for each run request instead.
This is much slower than the shell script, but acceptable as
a fallback.
Change-Id: I70591d7e610c4e1c3c258a8e4bef354221d05cb9
Reviewed-by: hjk <hjk@qt.io>
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>
When writing to stdout and stderr from two processes, their output could become
interleaved. To work around that, we write stdout and stderr to different files
and later combine them together in the shell script.
Since tst_deviceshell tests could run for a long time if /usr folder
is too big, added a check that first tests the runtime once.
Since we currently only support linux containers, limit the tests to
only run if the container platform is linux as well.
Change-Id: I4b313596cdf9acc839d54d7cc77c66fd53ac23bf
Reviewed-by: hjk <hjk@qt.io>
When outputting a commands stdout / stderr / exitcode,
the shell was free to interlace different outputs.
This could trip the parsing of the output, leading
to the shell missing the exit code of a command.
When that happened, the caller might wait indefinitely
for a result that would never come.
To workaround, the shell script now writes each command output
to a temporary file first, which is then written to stdout
by a single subshell, that way guaranteeing that the output
of multiple commands will not interleave
Change-Id: I9d8e7e788f5922c612ff533e5ba063f61a22aa8c
Reviewed-by: hjk <hjk@qt.io>
Don't connect to QtcProcess::errorOccurred() signal, as it's going
to be removed soon. Rely on done() signal instead.
Change-Id: I28260f8eb77911a23de80512881cf7220f1bc1fc
Reviewed-by: hjk <hjk@qt.io>
On (debian based) linux the "command -v base64" did fail to find
the base64 exectuable. Instead we now use "which".
Change-Id: I9b57527d93952b08bcb9abc7484a7e6891aa664c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Execute a script directly on remote side instead.
Storing it always into /tmp/shell.sh may potentially break
when 2 or more shells are being started for one device at
the same time.
Change-Id: I2b8c94ef531fa4916383355a312421a3a18bfcad
Reviewed-by: hjk <hjk@qt.io>
Previously the runInShell and outputForRunInShell methods were
exclusively processed single threaded, meaning all calls
were processed sequentially. With the multiplexed
helper script we can now run multiple processes simultaneously.
( see tst_manual_deviceshell )
Additionally the new script allows us to capture both
stdout and stderr from commands which was not possible previously.
Change-Id: I52f4fb46d872dc274edb9c11872d2f6543741b34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
It's a result of a team work consisting of yellow triangle and me.
Change-Id: I8b4812766da70e0785ae71bf0cb71357379e2514
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>