From fff6751d0ae61837f08874bce5ad04c4b9536894 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 6 May 2010 14:02:59 +0100 Subject: Check for existance of sis file parameter to runonphone Previously, it would skip over a non existant sis file - which could cause invalid test results if a previous version of the sis was already installed. Now, it checks if the file exists and exits with an error message if asked to install a sis file that doesn't exist. Task-number: QTBUG-9290 Reviewed-by: Miikka Heikkinen --- tools/runonphone/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 37e4548..885d029 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -102,6 +102,10 @@ int main(int argc, char *argv[]) else if (arg == "--sis" || arg == "-s") { CHECK_PARAMETER_EXISTS sisFile = it.next(); + if (!QFileInfo(sisFile).exists()) { + errstream << "Sis file (" << sisFile << ") doesn't exist" << endl; + return 1; + } } else if (arg == "--download" || arg == "-d") { CHECK_PARAMETER_EXISTS -- cgit v0.12