From e22b3f24c6c7185220b9bc3a5fcd9df8c9552e95 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Wed, 2 Jun 2004 13:11:10 +0200 Subject: [PATCH] Update atrt to use new names of binaries --- ndb/test/run-test/main.cpp | 27 +++++++++++++++++++-------- 1 file 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; im_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