diff options
author | Neeraj Kumar | 2010-07-01 12:30:56 +0000 |
---|---|---|
committer | Neeraj Kumar | 2010-07-01 12:30:56 +0000 |
commit | 9a4bd4220fa000159cb300b2f66301b7150d0bd7 (patch) | |
tree | 53ee2184c017cbf5e98d4ab21ce39f5ff12d6090 /engines/testbed/testsuite.cpp | |
parent | 68d691bc3e5ee711daad2979c7db325c16e4c1f0 (diff) | |
download | scummvm-rg350-9a4bd4220fa000159cb300b2f66301b7150d0bd7.tar.gz scummvm-rg350-9a4bd4220fa000159cb300b2f66301b7150d0bd7.tar.bz2 scummvm-rg350-9a4bd4220fa000159cb300b2f66301b7150d0bd7.zip |
testbed now keeps a list of executed testsuites
svn-id: r50545
Diffstat (limited to 'engines/testbed/testsuite.cpp')
-rw-r--r-- | engines/testbed/testsuite.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp index 488f3e0a8c..e1e39dbfeb 100644 --- a/engines/testbed/testsuite.cpp +++ b/engines/testbed/testsuite.cpp @@ -36,7 +36,7 @@ namespace Testbed { // Static public variable of Testsuite -bool Testsuite::isInteractive = true; +bool Testsuite::isSessionInteractive = true; // Static private variable of Testsuite Common::String Testsuite::_logDirectory = ""; @@ -113,6 +113,8 @@ void Testsuite::logDetailedPrintf(const char *fmt, ...) { Testsuite::Testsuite() { _numTestsPassed = 0; _numTestsExecuted = 0; + // Initially all testsuites are disabled, enable them by calling enableTestSuite(name, true) + _isTsEnabled = false; } Testsuite::~Testsuite() { @@ -200,13 +202,17 @@ void Testsuite::clearScreen(bool flag) { g_system->updateScreen(); } -void Testsuite::addTest(const Common::String &name, InvokingFunction f) { - Test* featureTest = new Test(name, f); +void Testsuite::addTest(const Common::String &name, InvokingFunction f, bool isInteractive) { + Test* featureTest = new Test(name, f, isInteractive); _testsToExecute.push_back(featureTest); } void Testsuite::execute() { 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()); + continue; + } logPrintf("Info! Executing Test: %s\n", ((*i)->featureName).c_str()); _numTestsExecuted++; if ((*i)->driver()) { |