diff options
author | 2022-09-13 14:14:16 +0100 | |
---|---|---|
committer | 2022-09-16 20:14:46 +0000 | |
commit | 1a8cc460546a3bf5f55acf46efb5073d5ed412d3 (patch) | |
tree | 24c2ffff1efae12e9f6f10c5a8df74b8ff7a2e0e /odrefresh/odrefresh_test.cc | |
parent | 4c9498e8f1c8ef8c54cfd7462e24a505690cdc10 (diff) |
odrefresh: Report dex2oat result for each stage.
This is the first step to improve odrefresh metrics collection. More CLs
will follow.
After the change, the metrics should tell:
- whether dex2oat is invoked or not
- whether dex2oat crashed or exited with a code
Partially cherry-picked from
commit fa152ba922a6301a10671d4684b75fe8cb2a2330
Bug: 246534524
Test: m test-art-host-gtest-art_runtime_tests
Test: atest ArtGtestsTargetChroot:OdRefreshTest
Merged-In: Id962a6e6a765371d290a836c51059d725c9250f3
Change-Id: I69ddf64552d4f2e51e111a40871890d41c88721d
Diffstat (limited to 'odrefresh/odrefresh_test.cc')
-rw-r--r-- | odrefresh/odrefresh_test.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/odrefresh/odrefresh_test.cc b/odrefresh/odrefresh_test.cc index d28c0d8942..cb6bee0a88 100644 --- a/odrefresh/odrefresh_test.cc +++ b/odrefresh/odrefresh_test.cc @@ -71,11 +71,10 @@ class MockExecUtils : public ExecUtils { public: // A workaround to avoid MOCK_METHOD on a method with an `std::string*` parameter, which will lead // to a conflict between gmock and android-base/logging.h (b/132668253). - int ExecAndReturnCode(const std::vector<std::string>& arg_vector, - int, - bool*, - std::string*) const override { - return DoExecAndReturnCode(arg_vector); + ExecResult ExecAndReturnResult(const std::vector<std::string>& arg_vector, + int, + std::string*) const override { + return {.status = ExecResult::kExited, .exit_code = DoExecAndReturnCode(arg_vector)}; } MOCK_METHOD(int, DoExecAndReturnCode, (const std::vector<std::string>& arg_vector), (const)); |