Fix error propagation from dex2oat command execution in tests.

There's no magic to report assertion errors just by creating
::testing::AssertionFailure objects - they have to be returned and
checked. Fix that by using Result wrappers.

Add the libgmock dependency to art_dex2oat_tests_defaults, because it's
necessary for the macros in android-base/result-gmock.h but libbase
doesn't pull it in.

#codehealth

Test: atest art_standalone_dex2oat_cts_tests \
            art_standalone_dex2oat_tests
Bug: 360737799
Change-Id: I3ca73c5ee625ff09329bb36272d3a654c719768f
5 files changed