X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/6b5e09540e9392a7015fae1ad3b01b0973600ff2..ab9eee5d7f1fbe7a3fe6229d4a78136efb14371b:/rsm_tester.cc?ds=sidebyside diff --git a/rsm_tester.cc b/rsm_tester.cc index 469aea2..42aaebe 100644 --- a/rsm_tester.cc +++ b/rsm_tester.cc @@ -2,27 +2,24 @@ // RSM test client // -#include "types.h" -#include "rsm_protocol.h" -#include "rsmtest_client.h" - -char log_thread_prefix = 't'; +#include "include/types.h" +#include "include/rsm_protocol.h" +#include "include/rsmtest_client.h" int main(int argc, char *argv[]) { + global = new t4_state('t'); if(argc != 4){ - LOG_NONMEMBER("Usage: " << argv[0] << " [host:]port [partition] arg"); + LOG_NONMEMBER << "Usage: " << argv[0] << " [host:]port [partition] arg"; return 1; } rsmtest_client *lc = new rsmtest_client(argv[1]); string command(argv[2]); - if (command == "partition") { - cout << "net_repair returned " << lc->net_repair(stoi(argv[3])); - } else if (command == "breakpoint") { - int b = stoi(argv[3]); - cout << "breakpoint " << b << " returned " << lc->breakpoint(b); - } else { - LOG_NONMEMBER("Unknown command " << argv[2]); - } + if (command == "partition") + LOG_NONMEMBER << "net_repair returned " << lc->net_repair(std::stoi(argv[3])); + else if (command == "breakpoint") + LOG_NONMEMBER << "breakpoint " << argv[3] << " returned " << lc->breakpoint(std::stoi(argv[3])); + else + LOG_NONMEMBER << "Unknown command " << argv[2]; return 0; }