bool G_STT_Run_Fun(QString fun_name, int test_id, QString v1, QString v2, QString v3, QString v4, QString v5, QString v6, QString v7, QString v8, QString v9)
{
bool result = false;
TEST_FUN_INFO tfi = G_Test_Fun_Info[fun_name.toStdString()];
if(tfi.fun_name == fun_name.toStdString())
{
QString script=QString("%1.%2").arg(tfi.modle_name.c_str(),fun_name);
QScriptValueList args;
QScriptEngine * eng = G_STT_Interpreter[test_id];
args << test_id << v1<<v2<<v3<< v4<<v5<<v6<< v7<<v8<<v9;
QScriptValue cpp_fun = eng->evaluate(script);
qDebug()<<cpp_fun.toString();
QScriptValue value = cpp_fun.call(QScriptValue(), args);
if (G_STT_Interpreter[test_id]->hasUncaughtException()){
emit STT_Global::mw->signal_add_Log(test_id, G_STT_Interpreter[test_id]->uncaughtException().toString());
emit STT_Global::mw->signal_add_Log(test_id,G_STT_Interpreter[test_id]->uncaughtExceptionBacktrace().join("/n"));
qDebug()<<G_STT_Interpreter[test_id]->uncaughtException().toString();
qDebug()<<G_STT_Interpreter[test_id]->uncaughtExceptionBacktrace().join("/n");
return false;
}else{
result = value.toBool();
}
}
return result;
}
Ubuntu 环境下Gtk与QT编译环境安装与配置