| 249 | } // namespace arrow::fs |
| 250 | |
| 251 | int main(int argc, char** argv) { |
| 252 | std::stringstream ss; |
| 253 | ss << "Narrative test for S3. Needs an initialized empty bucket.\n"; |
| 254 | ss << "Usage: " << argv[0]; |
| 255 | gflags::SetUsageMessage(ss.str()); |
| 256 | gflags::ParseCommandLineFlags(&argc, &argv, true); |
| 257 | |
| 258 | if (FLAGS_clear + FLAGS_test + FLAGS_create != 1) { |
| 259 | ARROW_LOG(ERROR) << "Need exactly one of --test, --clear and --create"; |
| 260 | return 2; |
| 261 | } |
| 262 | if (FLAGS_bucket.empty()) { |
| 263 | ARROW_LOG(ERROR) << "--bucket is mandatory"; |
| 264 | return 2; |
| 265 | } |
| 266 | |
| 267 | arrow::fs::TestMain(argc, argv); |
| 268 | if (::testing::Test::HasFatalFailure() || ::testing::Test::HasNonfatalFailure()) { |
| 269 | return 1; |
| 270 | } else { |
| 271 | std::cout << "Ok" << std::endl; |
| 272 | return 0; |
| 273 | } |
| 274 | } |