LinuxDeviceTester: Avoid non-trivial global variables

Change-Id: I1c3cf646ecbd6619f7c5a6eb117a0aca43d78534
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-11-24 18:17:15 +01:00
parent b34fc8a420
commit 6dc1a1e98f

View File

@@ -49,42 +49,42 @@ public:
QList<TaskItem> m_extraTests; QList<TaskItem> m_extraTests;
}; };
const QStringList s_commandsToTest = {"base64",
"cat",
"chmod",
"cp",
"cut",
"dd",
"df",
"echo",
"eval",
"exit",
"kill",
"ls",
"mkdir",
"mkfifo",
"mktemp",
"mv",
"printf",
"read",
"readlink",
"rm",
"sed",
"sh",
"shift",
"stat",
"tail",
"test",
"trap",
"touch",
"which"};
// other possible commands (checked for qnx):
// "awk", "grep", "netstat", "print", "pidin", "sleep", "uname"
static const char s_echoContents[] = "Hello Remote World!"; static const char s_echoContents[] = "Hello Remote World!";
QStringList GenericLinuxDeviceTesterPrivate::commandsToTest() const QStringList GenericLinuxDeviceTesterPrivate::commandsToTest() const
{ {
static const QStringList s_commandsToTest = {"base64",
"cat",
"chmod",
"cp",
"cut",
"dd",
"df",
"echo",
"eval",
"exit",
"kill",
"ls",
"mkdir",
"mkfifo",
"mktemp",
"mv",
"printf",
"read",
"readlink",
"rm",
"sed",
"sh",
"shift",
"stat",
"tail",
"test",
"trap",
"touch",
"which"};
// other possible commands (checked for qnx):
// "awk", "grep", "netstat", "print", "pidin", "sleep", "uname"
QStringList commands = s_commandsToTest + m_extraCommands; QStringList commands = s_commandsToTest + m_extraCommands;
commands.removeDuplicates(); commands.removeDuplicates();
Utils::sort(commands); Utils::sort(commands);