mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Kills High Fidelity processes (which is a good thing in this context).
This commit is contained in:
parent
846e6f5d23
commit
06ad3903c4
2 changed files with 16 additions and 1 deletions
|
@ -36,6 +36,7 @@ void TestRunner::run() {
|
|||
void TestRunner::installerDownloadComplete() {
|
||||
runInstaller();
|
||||
createSnapshotFolder();
|
||||
killProcesses();
|
||||
|
||||
restoreHighFidelityAppDataFolder();
|
||||
}
|
||||
|
@ -46,8 +47,8 @@ void TestRunner::runInstaller() {
|
|||
QStringList arguments{ QStringList() << QString("/S") << QString("/D=") + QDir::toNativeSeparators(_tempFolder) };
|
||||
|
||||
QString installerFullPath = _tempFolder + "/" + INSTALLER_FILENAME;
|
||||
|
||||
QString commandLine = QDir::toNativeSeparators(installerFullPath + " /S /D=" + _tempFolder);
|
||||
|
||||
system(commandLine.toStdString().c_str());
|
||||
}
|
||||
|
||||
|
@ -98,4 +99,16 @@ void TestRunner::selectTemporaryFolder() {
|
|||
|
||||
void TestRunner::createSnapshotFolder() {
|
||||
QDir().mkdir(_tempFolder + "/" + SNAPSHOT_FOLDER_NAME);
|
||||
}
|
||||
void TestRunner::killProcesses() {
|
||||
killProcessByName("assignment-client.exe");
|
||||
killProcessByName("domain-server.exe");
|
||||
killProcessByName("server-console.exe");
|
||||
}
|
||||
|
||||
void TestRunner::killProcessByName(QString processName) {
|
||||
#ifdef Q_OS_WIN
|
||||
QString commandLine = "taskkill /im " + processName + " /f >nul";
|
||||
system(commandLine.toStdString().c_str());
|
||||
#endif
|
||||
}
|
|
@ -30,6 +30,8 @@ public:
|
|||
void restoreHighFidelityAppDataFolder();
|
||||
void selectTemporaryFolder();
|
||||
void createSnapshotFolder();
|
||||
void killProcesses();
|
||||
void killProcessByName(QString processName);
|
||||
|
||||
private:
|
||||
QDir _appDataFolder;
|
||||
|
|
Loading…
Reference in a new issue