From 5b6ae9c5427b32f5bacba592fc08e1f70009aee4 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 7 Feb 2014 18:21:01 +0100 Subject: Only compile the testsuite if INSPIRCD_ENABLE_TESTSUITE is defined --- src/testsuite.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/testsuite.cpp') diff --git a/src/testsuite.cpp b/src/testsuite.cpp index b27f6e18c..b57a21ab8 100644 --- a/src/testsuite.cpp +++ b/src/testsuite.cpp @@ -19,6 +19,8 @@ */ +#ifdef INSPIRCD_ENABLE_TESTSUITE + #include "inspircd.h" #include "testsuite.h" #include "threadengine.h" @@ -74,8 +76,12 @@ TestSuite::TestSuite() switch (choice) { case '1': - FOREACH_MOD(OnRunTestSuite, ()); + { + const ModuleManager::ModuleMap& mods = ServerInstance->Modules->GetModules(); + for (ModuleManager::ModuleMap::const_iterator i = mods.begin(); i != mods.end(); ++i) + i->second->OnRunTestSuite(); break; + } case '2': std::cout << "Enter module filename to load: "; std::cin >> modname; @@ -394,3 +400,4 @@ TestSuite::~TestSuite() std::cout << "\n\n*** END OF TEST SUITE ***\n"; } +#endif -- cgit v1.3.1-10-gc9f91