Commit c2b5e645 authored by unknown's avatar unknown

Update atrt to use new names of binaries


ndb/test/run-test/main.cpp:
  1) Updated names of binaries
  2) Use NDB_CONNECTSTRING
parent 1c89ea1f
......@@ -446,11 +446,14 @@ setup_config(atrt_config& config){
}
}
BaseString connect_string;
for(size_t i = 0; i<hosts.size(); i++){
BaseString & tmp = hosts[i];
atrt_host * host = find(tmp, config.m_hosts);
BaseString & dir = host->m_base_dir;
const int index = config.m_processes.size() + 1;
atrt_process proc;
proc.m_index = index;
proc.m_host = host;
......@@ -458,8 +461,8 @@ setup_config(atrt_config& config){
proc.m_proc.m_type = "temporary";
proc.m_proc.m_owner = "atrt";
proc.m_proc.m_group = "group";
proc.m_proc.m_cwd.assign(host->m_base_dir).append("/run/");
proc.m_proc.m_env.assign("LD_LIBRARY_PATH=").append(host->m_base_dir).append("/lib");
proc.m_proc.m_cwd.assign(dir).append("/run/");
proc.m_proc.m_env.assfmt("LD_LIBRARY_PATH=%s/lib/mysql", dir.c_str());
proc.m_proc.m_stdout = "log.out";
proc.m_proc.m_stderr = "2>&1";
proc.m_proc.m_runas = proc.m_host->m_user;
......@@ -468,16 +471,18 @@ setup_config(atrt_config& config){
proc.m_ndb_mgm_port = g_default_base_port;
if(split1[0] == "mgm"){
proc.m_type = atrt_process::NDB_MGM;
proc.m_proc.m_name.assfmt("%d-%s", index, "ndb_mgm");
proc.m_proc.m_path.assign(host->m_base_dir).append("/bin/mgmtsrvr");
proc.m_proc.m_name.assfmt("%d-%s", index, "ndb_mgmd");
proc.m_proc.m_path.assign(dir).append("/libexec/ndb_mgmd");
proc.m_proc.m_args = "-n -c initconfig.txt";
proc.m_proc.m_cwd.appfmt("%d.ndb_mgm", index);
proc.m_proc.m_cwd.appfmt("%d.ndb_mgmd", index);
connect_string.appfmt(";host=%s:%d",
proc.m_hostname.c_str(), proc.m_ndb_mgm_port);
} else if(split1[0] == "ndb"){
proc.m_type = atrt_process::NDB_DB;
proc.m_proc.m_name.assfmt("%d-%s", index, "ndb_db");
proc.m_proc.m_path.assign(host->m_base_dir).append("/bin/ndb");
proc.m_proc.m_name.assfmt("%d-%s", index, "ndbd");
proc.m_proc.m_path.assign(dir).append("/libexec/ndbd");
proc.m_proc.m_args = "-i -n";
proc.m_proc.m_cwd.appfmt("%d.ndb_db", index);
proc.m_proc.m_cwd.appfmt("%d.ndbd", index);
} else if(split1[0] == "api"){
proc.m_type = atrt_process::NDB_API;
proc.m_proc.m_name.assfmt("%d-%s", index, "ndb_api");
......@@ -493,6 +498,12 @@ setup_config(atrt_config& config){
}
config.m_processes.push_back(proc);
}
// Setup connect string
for(size_t i = 0; i<config.m_processes.size(); i++){
config.m_processes[i].m_proc.m_env.appfmt(" NDB_CONNECTSTRING=nodeid=%d%s",
i+1, connect_string.c_str());
}
}
end:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment