[Scummvm-cvs-logs] SF.net SVN: scummvm:[50590] scummvm/branches/gsoc2010-testbed/engines/ testbed

sud03r at users.sourceforge.net sud03r at users.sourceforge.net
Fri Jul 2 09:51:44 CEST 2010


Revision: 50590
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50590&view=rev
Author:   sud03r
Date:     2010-07-02 07:51:44 +0000 (Fri, 02 Jul 2010)

Log Message:
-----------
added processing of quit event

Modified Paths:
--------------
    scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp
    scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.h

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp	2010-07-02 06:44:42 UTC (rev 50589)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp	2010-07-02 07:51:44 UTC (rev 50590)
@@ -42,6 +42,7 @@
 Common::String Testsuite::_logDirectory = "";
 Common::String Testsuite::_logFilename = "";
 Common::WriteStream *Testsuite::_ws = 0;
+bool Testsuite::toQuit = false;
 
 void Testsuite::setLogDir(const char *dirname) {
 	_logDirectory = dirname;
@@ -208,6 +209,11 @@
 }
 	
 void Testsuite::execute() {
+	// Do nothing if meant to exit
+	if (toQuit) {
+		return;
+	}
+	
 	for (Common::Array<Test*>::iterator i = _testsToExecute.begin(); i != _testsToExecute.end(); ++i) {
 		if((*i)->isInteractive && !isSessionInteractive) {
 			logPrintf("Info! Skipping Test: %s, non-interactive environment is selected\n", ((*i)->featureName).c_str());
@@ -221,6 +227,11 @@
 		} else {
 			logPrintf("Result: Failed\n");
 		}
+		// Check if user wants to quit
+		if (Engine::shouldQuit()) {
+			toQuit = true;
+			return;
+		}
 	}
 	genReport();
 }

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.h
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.h	2010-07-02 06:44:42 UTC (rev 50589)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.h	2010-07-02 07:51:44 UTC (rev 50590)
@@ -139,6 +139,11 @@
 	 * Used by various tests to respond accordingly
 	 */
 	static bool isSessionInteractive;
+	
+	/**
+	 * Used from the code to decide if the engine needs to exit
+	 */
+	static bool	toQuit;
 
 private:
 	/**


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list