Remove icu .dat file from Runtime module
Bug: 137009149
Bug: 130295968
Test: device boots
Test: m out/target/common/obj/JAVA_LIBRARIES/ahat-test-dump_intermediates/test-dump.hprof
Test: art/build/apex/runtests.sh fails due to bug 138103882
Test: art/tools/buildbot-build.sh
Test: m test-art-host-gtest
Change-Id: I0501fd6dd02dac3cf9780f5f1c0103e4b0475e1f
diff --git a/libartbase/base/common_art_test.cc b/libartbase/base/common_art_test.cc
index e2e85f2..da3320d 100644
--- a/libartbase/base/common_art_test.cc
+++ b/libartbase/base/common_art_test.cc
@@ -173,6 +173,17 @@
android_root_from_env = getenv("ANDROID_ROOT");
}
+ // Environment variable ANDROID_I18N_ROOT is set on the device, but not
+ // necessarily on the host. It needs to be set so that various libraries
+ // like libcore / icu4j / icu4c can find their data files.
+ const char* android_i18n_root_from_env = getenv("ANDROID_I18N_ROOT");
+ if (android_i18n_root_from_env == nullptr) {
+ // Use ${ANDROID_I18N_OUT}/com.android.i18n for ANDROID_I18N_ROOT.
+ std::string android_i18n_root = android_host_out_from_env;
+ android_i18n_root += "/com.android.i18n";
+ setenv("ANDROID_I18N_ROOT", android_i18n_root.c_str(), 1);
+ }
+
// Environment variable ANDROID_RUNTIME_ROOT is set on the device, but not
// necessarily on the host. It needs to be set so that various libraries
// like libcore / icu4j / icu4c can find their data files.