diff options
-rw-r--r-- | build/Android.gtest.mk | 5 | ||||
-rw-r--r-- | runtime/dex_method_iterator_test.cc | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk index 8753868..2951350 100644 --- a/build/Android.gtest.mk +++ b/build/Android.gtest.mk @@ -61,10 +61,9 @@ ART_GTEST_transaction_test_DEX_DEPS := Transaction # The elf writer test has dependencies on core.oat. ART_GTEST_elf_writer_test_HOST_DEPS := $(HOST_CORE_IMAGE_default_no-pic_64) $(HOST_CORE_IMAGE_default_no-pic_32) ART_GTEST_elf_writer_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_default_no-pic_64) $(TARGET_CORE_IMAGE_default_no-pic_32) -ART_GTEST_jni_internal_test_TARGET_DEPS := $(TARGET_CORE_DEX_FILES) -ART_GTEST_proxy_test_TARGET_DEPS := $(TARGET_CORE_DEX_FILES) + +# TODO: document why this is needed. ART_GTEST_proxy_test_HOST_DEPS := $(HOST_CORE_IMAGE_default_no-pic_64) $(HOST_CORE_IMAGE_default_no-pic_32) -ART_GTEST_dex_method_iterator_test_TARGET_DEPS := $(TARGET_CORE_DEX_FILES) # The path for which all the source files are relative, not actually the current directory. LOCAL_PATH := art diff --git a/runtime/dex_method_iterator_test.cc b/runtime/dex_method_iterator_test.cc index c6f333f..2681ad0 100644 --- a/runtime/dex_method_iterator_test.cc +++ b/runtime/dex_method_iterator_test.cc @@ -18,6 +18,7 @@ #include "base/stl_util.h" #include "common_runtime_test.h" +#include "oat_file.h" #include "scoped_thread_state_change.h" #include "thread-inl.h" @@ -29,9 +30,9 @@ class DexMethodIteratorTest : public CommonRuntimeTest { TEST_F(DexMethodIteratorTest, Basic) { ScopedObjectAccess soa(Thread::Current()); std::vector<const DexFile*> dex_files; - const char* jars[] = { "core-libart", "conscrypt", "okhttp", "core-junit", "bouncycastle" }; - for (size_t i = 0; i < 5; ++i) { - dex_files.push_back(LoadExpectSingleDexFile(GetDexFileName(jars[i]).c_str())); + CHECK_NE(boot_class_path_.size(), 0U); + for (size_t i = 0; i < boot_class_path_.size(); ++i) { + dex_files.push_back(boot_class_path_[i]); } DexMethodIterator it(dex_files); while (it.HasNext()) { @@ -43,7 +44,6 @@ TEST_F(DexMethodIteratorTest, Basic) { } it.Next(); } - STLDeleteElements(&dex_files); } } // namespace art |