From 7400a5466a04f9a274d262c5cb1fd35ff496839a Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Thu, 9 Jul 2020 13:40:57 +0100 Subject: Fixes for gtests in eng-prod Bug: 147817558 Test: art/art-host-gtest on forrest Change-Id: I0ecfbc81fe6998d4c8c69ce6fbeb35bdd5908b55 --- libartbase/base/file_utils_test.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libartbase/base/file_utils_test.cc') diff --git a/libartbase/base/file_utils_test.cc b/libartbase/base/file_utils_test.cc index 85c110465f..313754e5a6 100644 --- a/libartbase/base/file_utils_test.cc +++ b/libartbase/base/file_utils_test.cc @@ -58,7 +58,9 @@ TEST_F(FileUtilsTest, GetSystemImageFilename) { GetSystemImageFilename("/system/framework/boot.art", InstructionSet::kArm).c_str()); } -TEST_F(FileUtilsTest, GetAndroidRootSafe) { +// TODO(dsrbecky): b/160885380: This test is failing in eng-prod because libartbase +// is loaded from different path (under testcases). +TEST_F(FileUtilsTest, DISABLED_GetAndroidRootSafe) { std::string error_msg; // We don't expect null returns for most cases, so don't check and let std::string crash. @@ -78,6 +80,7 @@ TEST_F(FileUtilsTest, GetAndroidRootSafe) { // Set a bogus value for ANDROID_ROOT. This should be an error. ASSERT_EQ(0, setenv("ANDROID_ROOT", "/this/is/obviously/bogus", /* overwrite */ 1)); EXPECT_EQ(GetAndroidRootSafe(&error_msg), ""); + error_msg = ""; // Inferring the Android Root from the location of libartbase only works on host. if (!kIsTargetBuild) { -- cgit v1.2.3-59-g8ed1b