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

sud03r at users.sourceforge.net sud03r at users.sourceforge.net
Thu Aug 12 17:19:04 CEST 2010


Revision: 52042
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52042&view=rev
Author:   sud03r
Date:     2010-08-12 15:19:04 +0000 (Thu, 12 Aug 2010)

Log Message:
-----------
TESTBED: display appropriate message at begining if game-data files are not found

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

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp	2010-08-12 14:47:25 UTC (rev 52041)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp	2010-08-12 15:19:04 UTC (rev 52042)
@@ -22,11 +22,13 @@
  * $Id$
  */
 
-#include "common/fs.h"
 #include "common/stream.h"
 #include "common/config-manager.h"
+
 #include "engines/engine.h"
+
 #include "testbed/config.h"
+#include "testbed/fs.h"
 
 namespace Testbed {
 
@@ -283,7 +285,14 @@
 	// Testsuite::isSessionInteractive = false;
 	Common::String prompt("Welcome to the ScummVM testbed!\n"
 						"It is a framework to test the various ScummVM subsystems namely GFX, Sound, FS, events etc.\n"
-						"If you see this, it means interactive tests would run on this system :)");
+						"If you see this, it means interactive tests would run on this system :)\n");
+	
+	if (!FSTestSuite::isGameDataFound()) {
+		prompt += "\nSeems like Game data files are not configured properly.\n"
+		"Create Game data files using script ./create-testbed-data.sh in dists/engine-data\n"
+		"Next, Configure the game path in launcher / command-line.\n"
+		"Currently a few testsuites namely FS/AudioCD/MIDI would be disabled\n";
+	}
 
 	Testsuite::logPrintf("Info! : Interactive tests are also being executed.\n");
 	

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/fs.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/fs.cpp	2010-08-12 14:47:25 UTC (rev 52041)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/fs.cpp	2010-08-12 15:19:04 UTC (rev 52042)
@@ -30,6 +30,7 @@
 
 namespace Testbed {
 
+bool FSTestSuite::_isGameDataFound = true;
 /**
  * This test does the following:
  * 1) acquires the game-data path
@@ -186,9 +187,6 @@
 		logPrintf("WARNING! : Game Data not found. Skipping FS tests\n");
 		_isGameDataFound = false;
 		Testsuite::enable(false);
-	} else {
-		_isGameDataFound = true;
-		Testsuite::enable(true);
 	}
 	addTest("ReadingFile", &FStests::testReadFile, false);
 	addTest("WritingFile", &FStests::testWriteFile, false);

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/fs.h
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/fs.h	2010-08-12 14:47:25 UTC (rev 52041)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/fs.h	2010-08-12 15:19:04 UTC (rev 52042)
@@ -67,9 +67,10 @@
 		return "File system tests (Navigation, Read/Write)";
 	}
 	void enable(bool flag);
+	static bool isGameDataFound() { return _isGameDataFound; }
 
 private:
-	bool _isGameDataFound;
+	static bool _isGameDataFound;
 };
 
 } // End of namespace Testbed


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