Skip to content

Commit

Permalink
pass back gtest error code along with gtest output
Browse files Browse the repository at this point in the history
  • Loading branch information
adstraw committed May 10, 2022
1 parent 69c56ce commit 772d7ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 46 deletions.
8 changes: 6 additions & 2 deletions tests/cpp-runtime/hexagon/run_unit_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ TVM_REGISTER_GLOBAL("hexagon.run_unit_tests").set_body([](TVMArgs args, TVMRetVa
testing::TestEventListeners& listeners = testing::UnitTest::GetInstance()->listeners();
listeners.Append(gprinter);

RUN_ALL_TESTS();
*rv = gprinter->GetOutput();
int gtest_error_code = RUN_ALL_TESTS();
std::string gtest_output = gprinter->GetOutput();
std::stringstream gtest_error_code_and_output;
gtest_error_code_and_output << gtest_error_code << std::endl;
gtest_error_code_and_output << gtest_output;
*rv = gtest_error_code_and_output.str();
delete gprinter;
});

Expand Down
44 changes: 0 additions & 44 deletions tests/python/contrib/test_hexagon/test_hexagon_unit_tests.py

This file was deleted.

0 comments on commit 772d7ce

Please sign in to comment.