diff options
Diffstat (limited to 'engines/testbed/testbed.cpp')
-rw-r--r-- | engines/testbed/testbed.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp index 51ff43a293..e538c7f20c 100644 --- a/engines/testbed/testbed.cpp +++ b/engines/testbed/testbed.cpp @@ -98,7 +98,12 @@ TestbedEngine::TestbedEngine(OSystem *syst) // 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 @@ void TestbedEngine::invokeTestsuites(TestbedConfigManager &cfMan) { 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 @@ Common::Error TestbedEngine::run() { 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(); |