aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeeraj Kumar2010-08-12 15:19:04 +0000
committerNeeraj Kumar2010-08-12 15:19:04 +0000
commitf9005dd4b3c362ec4dedeace7d288a3da16d04e6 (patch)
tree55d69a29883a166cfcb23373c2e571ce41b3c677
parent4c3ea30e329be219fe916f633fb880f3cec83f92 (diff)
downloadscummvm-rg350-f9005dd4b3c362ec4dedeace7d288a3da16d04e6.tar.gz
scummvm-rg350-f9005dd4b3c362ec4dedeace7d288a3da16d04e6.tar.bz2
scummvm-rg350-f9005dd4b3c362ec4dedeace7d288a3da16d04e6.zip
TESTBED: display appropriate message at begining if game-data files are not found
svn-id: r52042
-rw-r--r--engines/testbed/config.cpp13
-rw-r--r--engines/testbed/fs.cpp4
-rw-r--r--engines/testbed/fs.h3
3 files changed, 14 insertions, 6 deletions
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index 88272eda7e..f64f1f34d7 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -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 @@ void TestbedConfigManager::selectTestsuites() {
// 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");
diff --git a/engines/testbed/fs.cpp b/engines/testbed/fs.cpp
index c98be8be12..2f6a697d8e 100644
--- a/engines/testbed/fs.cpp
+++ b/engines/testbed/fs.cpp
@@ -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 @@ FSTestSuite::FSTestSuite() {
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);
diff --git a/engines/testbed/fs.h b/engines/testbed/fs.h
index 8670b0b4da..3fa900e824 100644
--- a/engines/testbed/fs.h
+++ b/engines/testbed/fs.h
@@ -67,9 +67,10 @@ public:
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