this repo has no description
at trunk 24 lines 675 B view raw
1// Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) 2#include "benchmark/benchmark.h" 3#include "gtest/gtest.h" 4 5extern std::string FLAGS_benchmark_filter; 6 7namespace py { 8namespace testing { 9extern const char* argv0; 10} // namespace testing 11} // namespace py 12 13int main(int argc, char* argv[]) { 14 // Run benchmarks instead of tests if there was a --benchmark_filter argument. 15 FLAGS_benchmark_filter.clear(); 16 benchmark::Initialize(&argc, argv); 17 if (!FLAGS_benchmark_filter.empty()) { 18 return (benchmark::RunSpecifiedBenchmarks() == 0); 19 } 20 21 py::testing::argv0 = argv[0]; 22 testing::InitGoogleTest(&argc, argv); 23 return RUN_ALL_TESTS(); 24}