// We should not override the options specified in the command line int parseInfodConfFile(infod_cmdline_t *opts) { conf_file_t cf; if(!(cf = cf_new(validVarNames))) { fprintf(stderr, "Error generating conf file object\n"); return 0; } printf("Parsing configuration file [%s]\n", opts->opt_confFile); if(access(opts->opt_confFile, R_OK) != 0) { fprintf(stderr, "Error: configuration files [%s] does not exists or is not readable\n", opts->opt_confFile); return 0; } if(!cf_parseFile(cf, opts->opt_confFile)) { fprintf(stderr, "Error parsing configuration file\n"); return 0; } conf_var_t ent; int intVal; if(cf_getVar(cf, "provider", &ent)) set_provider(ent.varValue); if(cf_getVar(cf, "myip", &ent)) set_my_ip(ent.varValue); if(cf_getVar(cf, "port", &ent)) { if(!getInt(ent.varValue, &intVal)) { fprintf(stderr, "Error: parameter port is not an integer\n"); return 0; } set_port(&intVal); } if(cf_getVar(cf, "maptype", &ent)) set_map_type(ent.varValue); if(cf_getVar(cf, "mapfile", &ent)) set_map_file(ent.varValue); if(cf_getVar(cf, "mapcmd", &ent)) set_map_cmd(ent.varValue); if(cf_getVar(cf, "timestep", &ent)) { if(!getInt(ent.varValue, &intVal)) { fprintf(stderr, "Error: parameter timestep is not an integer\n"); return 0; } set_time_step(&intVal); } if(cf_getVar(cf, "gossip-algo", &ent)) set_gossip_algo(ent.varValue); if(cf_getVar(cf, "wintype", &ent)) set_win_type(ent.varValue); if(cf_getVar(cf, "winparam", &ent)) set_win_param(ent.varValue); if(cf_getVar(cf, "avgage", &ent)) { if(!getInt(ent.varValue, &intVal)) { fprintf(stderr, "Error: parameter avgage is not an integer\n"); return 0; } set_avgage(&intVal); } if(cf_getVar(cf, "avgmax", &ent)) { if(!getInt(ent.varValue, &intVal)) { fprintf(stderr, "Error: parameter avgmax is not an integer\n"); return 0; } set_avgmax(&intVal); } if(cf_getVar(cf, "upto-entries", &ent)) { if(!getInt(ent.varValue, &intVal)) { fprintf(stderr, "Error: parameter upto-entries is not an integer\n"); return 0; } set_uptoentries(&intVal); } if(cf_getVar(cf, "watch-fs", &ent)) set_watch_fs(ent.varValue); if(cf_getVar(cf, "watch-net", &ent)) set_watch_net(ent.varValue); if(cf_getVar(cf, "info-file", &ent)) set_info_file(ent.varValue); if(cf_getVar(cf, "eco-file", &ent)) set_eco_file(ent.varValue); if(cf_getVar(cf, "proc-file", &ent)) set_proc_file(ent.varValue); if(cf_getVar(cf, "jmig-file", &ent)) set_jmig_file(ent.varValue); cf_free(cf); return 1; }
void FdoImportExportTest::setUp () { set_provider(); }
void FdoSchemaRollbackTest::setUp () { set_provider(); }
void ConnectTests::setUp () { set_provider(); }
void FdoSpatialContextTest::setUp () { set_provider(); }