| 202 | BOOST_CONSTEXPR_OR_CONST int ERR_UNKNOWN = 64; |
| 203 | |
| 204 | int main(int argc, char** argv) { |
| 205 | cout.precision(19); |
| 206 | |
| 207 | string testDir = boost::filesystem::system_complete(argv[0]).parent_path().parent_path().parent_path().string(); |
| 208 | string caPath = testDir + "/keys/CA.pem"; |
| 209 | string certPath = testDir + "/keys/client.crt"; |
| 210 | string keyPath = testDir + "/keys/client.key"; |
| 211 | |
| 212 | #if _WIN32 |
| 213 | transport::TWinsockSingleton::create(); |
| 214 | #endif |
| 215 | string host = "localhost"; |
| 216 | int port = 9090; |
| 217 | int numTests = 1; |
| 218 | bool ssl = false; |
| 219 | bool zlib = false; |
| 220 | string transport_type = "buffered"; |
| 221 | string protocol_type = "binary"; |
| 222 | string domain_socket = ""; |
| 223 | bool abstract_namespace = false; |
| 224 | bool noinsane = false; |
| 225 | |
| 226 | int return_code = 0; |
| 227 | |
| 228 | boost::program_options::options_description desc("Allowed options"); |
| 229 | desc.add_options() |
| 230 | ("help,h", "produce help message") |
| 231 | ("host", |
| 232 | boost::program_options::value<string>(&host)->default_value(host), |
| 233 | "Host to connect") |
| 234 | ("port", |
| 235 | boost::program_options::value<int>(&port)->default_value(port), |
| 236 | "Port number to connect") |
| 237 | ("domain-socket", |
| 238 | boost::program_options::value<string>(&domain_socket)->default_value(domain_socket), |
| 239 | "Domain Socket (e.g. /tmp/ThriftTest.thrift), instead of host and port") |
| 240 | ("abstract-namespace", |
| 241 | "Look for the domain socket in the Abstract Namespace" |
| 242 | " (no connection with filesystem pathnames)") |
| 243 | ("transport", |
| 244 | boost::program_options::value<string>(&transport_type)->default_value(transport_type), |
| 245 | "Transport: buffered, framed, http, evhttp, zlib") |
| 246 | ("protocol", |
| 247 | boost::program_options::value<string>(&protocol_type)->default_value(protocol_type), |
| 248 | "Protocol: binary, compact, header, json, multi, multic, multih, multij") |
| 249 | ("ssl", |
| 250 | "Encrypted Transport using SSL") |
| 251 | ("zlib", |
| 252 | "Wrap Transport with Zlib") |
| 253 | ("testloops,n", |
| 254 | boost::program_options::value<int>(&numTests)->default_value(numTests), |
| 255 | "Number of Tests") |
| 256 | ("noinsane", |
| 257 | "Do not run insanity test"); |
| 258 | |
| 259 | boost::program_options::variables_map vm; |
| 260 | boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm); |
| 261 | boost::program_options::notify(vm); |
nothing calls this directly
no test coverage detected