[Scummvm-cvs-logs] SF.net SVN: scummvm:[52078] scummvm/branches/gsoc2010-testbed
sud03r at users.sourceforge.net
sud03r at users.sourceforge.net
Sat Aug 14 08:06:41 CEST 2010
Revision: 52078
http://scummvm.svn.sourceforge.net/scummvm/?rev=52078&view=rev
Author: sud03r
Date: 2010-08-14 06:06:41 +0000 (Sat, 14 Aug 2010)
Log Message:
-----------
TESTBED: some more refinements with handling Quit events in GUI
Modified Paths:
--------------
scummvm/branches/gsoc2010-testbed/dists/engine-data/create-testbed-data.sh
scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp
scummvm/branches/gsoc2010-testbed/engines/testbed/midi.cpp
scummvm/branches/gsoc2010-testbed/engines/testbed/testbed.cpp
scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp
Modified: scummvm/branches/gsoc2010-testbed/dists/engine-data/create-testbed-data.sh
===================================================================
--- scummvm/branches/gsoc2010-testbed/dists/engine-data/create-testbed-data.sh 2010-08-14 06:05:54 UTC (rev 52077)
+++ scummvm/branches/gsoc2010-testbed/dists/engine-data/create-testbed-data.sh 2010-08-14 06:06:41 UTC (rev 52078)
@@ -48,5 +48,5 @@
# move the audiocd data to newly created directory
cp -r testbed-audiocd-files testbed/audiocd-files
-
+mv testbed/audiocd-files/music.mid testbed/
echo "Game data created"
Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp 2010-08-14 06:05:54 UTC (rev 52077)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp 2010-08-14 06:06:41 UTC (rev 52078)
@@ -193,10 +193,8 @@
}
Common::SeekableReadStream *TestbedConfigManager::getConfigReadStream() {
- // Look for config file in game-path
- const Common::String &path = ConfMan.get("path");
- Common::FSDirectory gameRoot(path);
- Common::SeekableReadStream *rs = gameRoot.createReadStreamForMember(_configFileName);
+ // Look for config file using SearchMan
+ Common::SeekableReadStream *rs = SearchMan.createReadStreamForMember(_configFileName);
return rs;
}
@@ -231,6 +229,7 @@
Common::ConfigFile::SectionKeyList kList = i->getKeys();
if (!currTS) {
Testsuite::logPrintf("Warning! Error in config: Testsuite %s not found\n", i->name.c_str());
+ continue;
}
for (Common::ConfigFile::SectionKeyList::const_iterator j = kList.begin(); j != kList.end(); j++) {
@@ -295,8 +294,11 @@
}
Testsuite::logPrintf("Info! : Interactive tests are also being executed.\n");
-
+
if (Testsuite::handleInteractiveInput(prompt, "Proceed?", "Customize", kOptionRight)) {
+ if (Engine::shouldQuit()) {
+ return;
+ }
// Select testsuites using checkboxes
TestbedOptionsDialog tbd(_testsuiteList, this);
tbd.runModal();
Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/midi.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/midi.cpp 2010-08-14 06:05:54 UTC (rev 52077)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/midi.cpp 2010-08-14 06:06:41 UTC (rev 52078)
@@ -138,9 +138,9 @@
}
MidiTestSuite::MidiTestSuite() {
- if (SearchMan.hasFile("music.mid")) {
- addTest("MidiTests", &MidiTests::playMidiMusic);
- } else {
+ addTest("MidiTests", &MidiTests::playMidiMusic);
+ _isMidiDataFound = true;
+ if (!SearchMan.hasFile("music.mid")) {
// add some fallback test if filesystem loading failed
Testsuite::logPrintf("Warning! Midi: Sound data file music.mid not found\n");
_isMidiDataFound = false;
Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/testbed.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/testbed.cpp 2010-08-14 06:05:54 UTC (rev 52077)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/testbed.cpp 2010-08-14 06:06:41 UTC (rev 52078)
@@ -98,7 +98,12 @@
// Do not initialize graphics here
// However this is the place to specify all default directories
-
+ // Put game-data dir in search path
+ Common::FSNode gameRoot(ConfMan.get("path"));
+ if (gameRoot.exists()) {
+ SearchMan.addDirectory(gameRoot.getDisplayName(), gameRoot);
+ }
+
DebugMan.addDebugChannel(kTestbedLogOutput, "LOG", "Log of test results generated by testbed");
DebugMan.addDebugChannel(kTestbedEngineDebug, "Debug", "Engine-specific debug statements");
DebugMan.enableDebugChannel("LOG");
@@ -144,6 +149,9 @@
int numSuitesEnabled = cfMan.getNumSuitesEnabled();
for (iter = _testsuiteList.begin(); iter != _testsuiteList.end(); iter++) {
+ if (shouldQuit()) {
+ return;
+ }
(*iter)->reset();
if ((*iter)->isEnabled()) {
Testsuite::updateStats("Testsuite", (*iter)->getName(), count++, numSuitesEnabled, pt);
@@ -169,12 +177,12 @@
cfMan.selectTestsuites();
// Init logging
Testsuite::initLogging(true);
+ invokeTestsuites(cfMan);
// Check if user wanted to exit.
if (Engine::shouldQuit()) {
return Common::kNoError;
}
- invokeTestsuites(cfMan);
TestbedExitDialog tbDialog(_testsuiteList);
tbDialog.init();
tbDialog.run();
Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp 2010-08-14 06:05:54 UTC (rev 52077)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/testsuite.cpp 2010-08-14 06:06:41 UTC (rev 52078)
@@ -322,11 +322,6 @@
void Testsuite::execute() {
// Main Loop for a testsuite
- // Do nothing if meant to exit
- if (toQuit == kEngineQuit) {
- return;
- }
-
uint count = 0;
Common::Point pt = getDisplayRegionCoordinates();
pt.y += getLineSeparation();
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