Re-enable dex2oat_test copying dex test case for target
Also clean up some comments.
Bug: 70934104
Test: mm test-art-target-gtest-dex2oat_test -j64
Test: mm test-art-host-gtest-dex2oat_test -j64
Change-Id: I8b42848a85644e265ef7392c601757ee9ffa6157
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index 12cfd24..6d3658f 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -1850,23 +1850,25 @@
GenerateOdexForTest(dex_location,
odex_location,
CompilerFilter::Filter::kQuicken,
- { "--dump-timings", "--dm-file=" + dm_file.GetFilename() },
+ { "--dump-timings",
+ "--dm-file=" + dm_file.GetFilename(),
+ // Pass -Xuse-stderr-logger have dex2oat output in output_ on target.
+ "--runtime-arg",
+ "-Xuse-stderr-logger" },
true, // expect_success
false, // use_fd
[](const OatFile& o) {
CHECK(o.ContainsDexCode());
});
- if (!kIsTargetBuild) {
- // The output_ variable is not correctly set for target, TODO: investigate.
- std::istringstream iss(output_);
- std::string line;
- bool found_fast_verify = false;
- const std::string kFastVerifyString = "Fast Verify";
- while (std::getline(iss, line) && !found_fast_verify) {
- found_fast_verify = found_fast_verify || line.find(kFastVerifyString) != std::string::npos;
- }
- EXPECT_TRUE(found_fast_verify) << "Expected to find " << kFastVerifyString << "\n" << output_;
+ // Check the output for "Fast verify", this is printed from --dump-timings.
+ std::istringstream iss(output_);
+ std::string line;
+ bool found_fast_verify = false;
+ const std::string kFastVerifyString = "Fast Verify";
+ while (std::getline(iss, line) && !found_fast_verify) {
+ found_fast_verify = found_fast_verify || line.find(kFastVerifyString) != std::string::npos;
}
+ EXPECT_TRUE(found_fast_verify) << "Expected to find " << kFastVerifyString << "\n" << output_;
}
} // namespace art