Rename process.h back to qtcprocess.h
MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.
There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have
Simply use a name that doesn't conflict.
Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
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>
In case mktemp or mkfifo fails, the device shell script would
incorrectly print both success and failure messages.
Also cleaning State enum, removing unnecessary values.
Fixes possible crash if creation of master process fails.
Fixes: QTCREATORBUG-28928
Change-Id: I75fef54dc791b2b0a403bab19dab6813b62643ac
Reviewed-by: hjk <hjk@qt.io>
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>
Pass on stderr data and exit code to the caller, it's typically
in a better condition to handle errors.
Use it to notify the user about non-available 'find' arguments
and fix the fallback to ls-based operation.
Change-Id: I535535de2ffa09cad1dd6e9b07eb69f807dbae2f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
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>
The bundled "base64" tool of macos < 10.15 did not support
the "-d" option ( only -D ). We disable the tests running
on the local shell to keep them from failing.
Change-Id: I6af353869033ed15cefedc03e2562621d1ea9904
Reviewed-by: Eike Ziller <eike.ziller@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>
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>