Go to the documentation of this file.
19 std::vector<std::string>
string_tokenize(
const std::string& src,
const char delim =
'.');
32 vout.
general(
m_vl,
"-------------------------------------------------\n");
34 vout.
general(
m_vl,
"-------------------------------------------------\n");
70 m_root_node(
"<top_level>"),
99 std::string jobname =
"<terminate>";
116 if (jobname ==
"<terminate>")
break;
141 vout.
detailed(
m_vl,
"TestManager::batch_recursive: arg=\"%s\"\n", arg.c_str());
157 std::string jobname =
"<terminate>";
176 for (
int i = 0; i < argc; ++i) {
177 vout.
detailed(
m_vl,
"TestManager::batch_recursive: argv[%d]=%s\n", i, argv[i]);
179 std::string arg = std::string(argv[i]);
193 std::string jobname =
"<terminate>";
232 }
else if (result == 0) {
248 if (p->
m_next.size() == 0) {
251 for (
size_t i = 0; i < p->
m_next.size(); ++i) {
261 if (!p)
return false;
266 if (p->
m_next.size() == 0) {
272 bool do_continue =
true;
277 for (
unsigned int i = 0; i < p->
m_next.size(); ++i) {
293 bool do_alltest =
false;
294 bool do_setprecision =
false;
302 if (buf[0] == 0)
return false;
310 do_setprecision =
true;
315 if (buf[0] ==
'u')
return true;
317 if (buf[0] ==
'q')
return false;
323 if ((choice >= 1) && (choice <=
int(p->
m_next.size())))
break;
332 }
else if (do_setprecision) {
338 if (!do_continue)
break;
358 int prec = atoi(buf);
359 if ((prec >= 1) && (prec <= 14)) {
374 if (v.size() == 0)
return p;
376 for (std::vector<std::string>::const_iterator r = v.begin(); r != v.end(); ++r) {
377 bool is_found =
false;
379 for (i = 0; i < p->
m_next.size(); ++i) {
380 if (p->
m_next[i]->m_name == (*r)) {
386 if (!is_found)
return 0;
400 if (v.size() == 0)
return p;
402 for (std::vector<std::string>::const_iterator r = v.begin(); r != v.end(); ++r) {
403 bool is_found =
false;
405 for (i = 0; i < p->
m_next.size(); ++i) {
406 if (p->
m_next[i]->m_name == (*r)) {
421 std::vector<Node *>::iterator iter = p->
m_next.begin();
422 for ( ; iter != p->
m_next.end(); ++iter) {
423 if (*r < (*iter)->m_name) {
427 p->
m_next.insert(iter, q);
442 if (argc == 0)
return p;
445 for (
int i = 0; i < argc; ++i) {
450 for (
size_t i = 0; i < p->
m_next.size(); ++i) {
451 if (p->
m_next[i]->m_name == argv[0]) {
468 if (!p->
m_prev)
return path;
470 if (path.length() > 0) {
556 if (p->
m_next.size() == 0) {
565 string prefix_next =
"";
568 }
else if (prefix ==
"") {
571 prefix_next = prefix +
"." + p->
m_name;
574 for (
size_t i = 0; i < p->
m_next.size(); ++i) {
592 if (p->
m_next.size() == 0) {
599 for (
size_t i = 0; i < p->
m_next.size(); ++i) {
608 std::vector<std::string> retv;
610 size_t npos = src.length();
615 size_t q = src.find(delim, p);
618 retv.push_back(src.substr(p));
622 retv.push_back(src.substr(p, q - p));
static TestManager * s_instance
const std::string test_name
Common parameter class: provides parameters as singleton.
static TestManager & Instance()
static int broadcast(int count, dcomplex *data, int sender)
broadcast array of dcomplex from sender.
static int self()
rank within small world.
void detailed(const char *format,...)
bool registerTest(const std::string &key, const Test_function func)
bool menu(const Node *p, const bool is_top=false)
static int sync_usleep()
synchronize within small world. (slow but no busy wait)
std::vector< Node * > m_next
std::vector< std::string > m_list_failure
void traverse(const Node *p, const std::string &indent="")
Node * find_node(Node *p, const std::vector< std::string > &v)
void batch(const std::string &arg)
std::vector< std::string > string_tokenize(const std::string &src, const char delim='.')
static const std::string class_name
int(* Test_function)(void)
static void CreateInstance()
void run_traversal(const Node *p)
std::string find_fullpath(const Node *p, const std::string &path="")
void skip(const std::string &test_name)
std::vector< std::string > m_list_skip
Bridge::VerboseLevel m_vl
void success(const std::string &test_name)
static bool is_primary()
check if the present node is primary in small communicator.
void batch_recursive(const std::string &arg="")
void failure(const std::string &test_name)
Node * append_key(Node *p, const std::vector< std::string > &v)
void interactive_master()
void list_traverse(const Node *p, const std::string &prefix)
TestManager class for managing and performing tests.
static const int default_precision
void general(const char *format,...)