summaryrefslogtreecommitdiffstats
path: root/src/oat_test.cc
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2011-11-16 16:44:11 -0500
committerJesse Wilson <jessewilson@google.com>2011-11-16 17:21:45 -0500
commit254db0ff7ea6509a1c2914b1d9532e2041a0c4c4 (patch)
tree2b76fd513207c6679a50a91638d95361e9a05ae6 /src/oat_test.cc
parent9b1a4f425711c26d0465d54a1cb95ec4a813322a (diff)
downloadart-254db0ff7ea6509a1c2914b1d9532e2041a0c4c4.zip
art-254db0ff7ea6509a1c2914b1d9532e2041a0c4c4.tar.gz
art-254db0ff7ea6509a1c2914b1d9532e2041a0c4c4.tar.bz2
Pass the classpath to dex2oat.
This makes it possible to run applications that have multiple dex files on the classpath. Change-Id: I15264a001a46ddb253e87f2739e6b9644348f1be
Diffstat (limited to 'src/oat_test.cc')
-rw-r--r--src/oat_test.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/oat_test.cc b/src/oat_test.cc
index e3186de..17a00e4 100644
--- a/src/oat_test.cc
+++ b/src/oat_test.cc
@@ -11,11 +11,12 @@ class OatTest : public CommonTest {};
TEST_F(OatTest, WriteRead) {
const bool compile = false; // DISABLED_ due to the time to compile libcore
+ ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
SirtRef<ClassLoader> class_loader(NULL);
if (compile) {
compiler_.reset(new Compiler(kThumb2, false));
- compiler_->CompileAll(class_loader.get());
+ compiler_->CompileAll(class_loader.get(), class_linker->GetBootClassPath());
}
ScratchFile tmp;
@@ -23,15 +24,13 @@ TEST_F(OatTest, WriteRead) {
ASSERT_TRUE(success);
if (compile) { // OatWriter strips the code, regenerate to compare
- compiler_->CompileAll(class_loader.get());
+ compiler_->CompileAll(class_loader.get(), class_linker->GetBootClassPath());
}
UniquePtr<OatFile> oat_file(OatFile::Open(std::string(tmp.GetFilename()), "", NULL));
ASSERT_TRUE(oat_file.get() != NULL);
const OatHeader& oat_header = oat_file->GetOatHeader();
ASSERT_EQ(1U, oat_header.GetDexFileCount());
- ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
-
const DexFile& dex_file = *java_lang_dex_file_.get();
const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file.GetLocation());
for (size_t i = 0; i < dex_file.NumClassDefs(); i++) {