summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2004-06-02 13:11:10 +0200
committerunknown <joreland@mysql.com>2004-06-02 13:11:10 +0200
commitc2b5e64526324fb8ddc9ba99ddc180e8dc267ca3 (patch)
tree034339a9e2d9fcaa78bb32a93100ed8ac2fd9f06 /ndb
parent1c89ea1f15744a7a3e5ca18a283f5d67177242c7 (diff)
downloadmariadb-git-c2b5e64526324fb8ddc9ba99ddc180e8dc267ca3.tar.gz
Update atrt to use new names of binaries
ndb/test/run-test/main.cpp: 1) Updated names of binaries 2) Use NDB_CONNECTSTRING
Diffstat (limited to 'ndb')
-rw-r--r--ndb/test/run-test/main.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/ndb/test/run-test/main.cpp b/ndb/test/run-test/main.cpp
index eb8a626dc2b..a042bfa4c88 100644
--- a/ndb/test/run-test/main.cpp
+++ b/ndb/test/run-test/main.cpp
@@ -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: