std::string script = getServer()->getBuiltinLuaPath() + DIR_DELIM + "init.lua";
if (!loadScript(script)) {
- errorstream << "execution of async base environment failed!"
- << std::endl;
- abort();
+ FATAL_ERROR("execution of async base environment failed!");
}
int error_handler = PUSH_ERROR_HANDLER(L);
lua_getglobal(L, "core");
if (lua_isnil(L, -1)) {
- errorstream << "Unable to find core within async environment!";
- abort();
+ FATAL_ERROR("Unable to find core within async environment!");
}
// Main loop
lua_getfield(L, -1, "job_processor");
if (lua_isnil(L, -1)) {
- errorstream << "Unable to get async job processor!" << std::endl;
- abort();
+ FATAL_ERROR("Unable to get async job processor!");
}
luaL_checktype(L, -1, LUA_TFUNCTION);
//// run_tests
////
-void run_tests()
+bool run_tests()
{
DSTACK(FUNCTION_NAME);
<< "++++++++++++++++++++++++++++++++++++++++"
<< "++++++++++++++++++++++++++++++++++++++++" << std::endl;
- if (num_modules_failed)
- abort();
+ return num_modules_failed;
}
////