test_main.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*************************************************************************
  2. * Copyright (C) [2019] by Cambricon, Inc. All rights reserved
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  13. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  15. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  18. * THE SOFTWARE.
  19. *************************************************************************/
  20. #include <gflags/gflags.h>
  21. #include "gtest/gtest.h"
  22. #include "cnstream_logging.hpp"
  23. #include "test_base.hpp"
  24. int main(int argc, char **argv) {
  25. cnstream::InitCNStreamLogging(GetExePath().c_str());
  26. testing::InitGoogleTest(&argc, argv);
  27. ::gflags::ParseCommandLineFlags(&argc, &argv, false);
  28. // FLAGS_alsologtostderr = true;
  29. int ret = RUN_ALL_TESTS();
  30. cnstream::ShutdownCNStreamLogging();
  31. return ret;
  32. }