| 333 | } // namespace tflite |
| 334 | |
| 335 | int main(int argc, char** argv) { |
| 336 | ::testing::AddGlobalTestEnvironment(tflite::testing::archive_environment()); |
| 337 | |
| 338 | std::vector<tensorflow::Flag> flags = { |
| 339 | tensorflow::Flag( |
| 340 | "ignore_known_bugs", &tflite::testing::FLAGS_ignore_known_bugs, |
| 341 | "If a particular model is affected by a known bug, the " |
| 342 | "corresponding test should expect the outputs to not match."), |
| 343 | tensorflow::Flag( |
| 344 | "tar_file_path", tflite::testing::FLAGS_tar_file_path, |
| 345 | "Required (or zip_file_path): Location of the test tar file."), |
| 346 | tensorflow::Flag( |
| 347 | "zip_file_path", tflite::testing::FLAGS_zip_file_path, |
| 348 | "Required (or tar_file_path): Location of the test zip file."), |
| 349 | tensorflow::Flag("unzip_binary_path", |
| 350 | tflite::testing::FLAGS_unzip_binary_path, |
| 351 | "Location of a suitable unzip binary."), |
| 352 | tensorflow::Flag("tar_binary_path", |
| 353 | tflite::testing::FLAGS_tar_binary_path, |
| 354 | "Location of a suitable tar binary."), |
| 355 | tensorflow::Flag("use_nnapi", &tflite::testing::FLAGS_use_nnapi, |
| 356 | "Whether to enable the NNAPI delegate"), |
| 357 | tensorflow::Flag("ignore_unsupported_nnapi", |
| 358 | &tflite::testing::FLAGS_ignore_unsupported_nnapi, |
| 359 | "Don't fail tests just because delegation to NNAPI " |
| 360 | "is not possible")}; |
| 361 | bool success = tensorflow::Flags::Parse(&argc, argv, flags); |
| 362 | if (!success || (argc == 2 && !strcmp(argv[1], "--helpfull"))) { |
| 363 | fprintf(stderr, "%s", tensorflow::Flags::Usage(argv[0], flags).c_str()); |
| 364 | return 1; |
| 365 | } |
| 366 | |
| 367 | ::tflite::LogToStderr(); |
| 368 | // TODO(mikie): googletest arguments do not work - maybe the tensorflow flags |
| 369 | // parser removes them? |
| 370 | ::testing::InitGoogleTest(&argc, argv); |
| 371 | return RUN_ALL_TESTS(); |
| 372 | } |
nothing calls this directly
no test coverage detected