diff --git a/src/libs/utils/deviceshell.cpp b/src/libs/utils/deviceshell.cpp index a4e0bf13c8d..807ac2c4bd5 100644 --- a/src/libs/utils/deviceshell.cpp +++ b/src/libs/utils/deviceshell.cpp @@ -53,7 +53,7 @@ namespace { * Once the process exits its exit code is send to stdout with the command-id and the type "R". * */ -const QLatin1String r_execScript = QLatin1String(R"( +const QLatin1String r_execScript = QLatin1String(R"SCRIPT( #!/bin/sh readAndMark() { @@ -133,7 +133,7 @@ cleanup() exit 1 } -if ! command -v base64 &> /dev/null +if [ -z "$(which base64)" ] then echo "base64 command could not be found" >&2 exit 1 @@ -149,7 +149,7 @@ while read -r id inData cmd; do fi execute $id $inData $cmd & done -)"); +)SCRIPT"); } // namespace diff --git a/tests/auto/utils/deviceshell/tst_deviceshell.cpp b/tests/auto/utils/deviceshell/tst_deviceshell.cpp index 40181b7d25e..8c68650504b 100644 --- a/tests/auto/utils/deviceshell/tst_deviceshell.cpp +++ b/tests/auto/utils/deviceshell/tst_deviceshell.cpp @@ -279,6 +279,6 @@ private slots: } }; -QTEST_MAIN(tst_DeviceShell) +QTEST_GUILESS_MAIN(tst_DeviceShell) #include "tst_deviceshell.moc" diff --git a/tests/manual/deviceshell/tst_deviceshell.cpp b/tests/manual/deviceshell/tst_deviceshell.cpp index f9ab9b4e8a3..df3e28dab9f 100644 --- a/tests/manual/deviceshell/tst_deviceshell.cpp +++ b/tests/manual/deviceshell/tst_deviceshell.cpp @@ -223,6 +223,6 @@ private slots: } }; -QTEST_MAIN(tst_DeviceShell) +QTEST_GUILESS_MAIN(tst_DeviceShell) #include "tst_deviceshell.moc"