diff --git a/tools/auto-tester/src/TestRunner.cpp b/tools/auto-tester/src/TestRunner.cpp index cdf8aa5604..8b40b15260 100644 --- a/tools/auto-tester/src/TestRunner.cpp +++ b/tools/auto-tester/src/TestRunner.cpp @@ -155,6 +155,8 @@ void TestRunner::runInstaller() { } void TestRunner::installationComplete() { + verifyInstallationSucceeded(); + createSnapshotFolder(); updateStatusLabel("Running tests"); @@ -166,6 +168,21 @@ void TestRunner::installationComplete() { runInterfaceWithTestScript(); } +void TestRunner::verifyInstallationSucceeded() { + // Exit if the executables are missing. + // On Windows, the reason is probably that UAC has blocked the installation. This is treated as a critical error +#ifdef Q_OS_WIN + QFileInfo interfacExe(QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\""); + QFileInfo assignmentClientExe(QDir::toNativeSeparators(_installationFolder) + "\\assignment-client.exe\""); + QFileInfo domainServerExe(QDir::toNativeSeparators(_installationFolder) + "\\domain-server.exe\""); + + if (!interfacExe.exists() || !assignmentClientExe.exists() || !domainServerExe.exists()) { + QMessageBox::critical(0, "Installation of High Fidelity has failed", "Please verify that UAC has been disabled"); + exit(-1); + } +#endif +} + void TestRunner::saveExistingHighFidelityAppDataFolder() { QString dataDirectory{ "NOT FOUND" }; diff --git a/tools/auto-tester/src/TestRunner.h b/tools/auto-tester/src/TestRunner.h index 6d3d00f78b..2083053503 100644 --- a/tools/auto-tester/src/TestRunner.h +++ b/tools/auto-tester/src/TestRunner.h @@ -42,6 +42,7 @@ public: void installerDownloadComplete(); void runInstaller(); + void verifyInstallationSucceeded(); void saveExistingHighFidelityAppDataFolder(); void restoreHighFidelityAppDataFolder();