diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/dexopt_test.cc | 11 | ||||
| -rw-r--r-- | runtime/dexopt_test.h | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/runtime/dexopt_test.cc b/runtime/dexopt_test.cc index 7f697d1eb8..9c0ac8fc54 100644 --- a/runtime/dexopt_test.cc +++ b/runtime/dexopt_test.cc @@ -72,7 +72,8 @@ void DexoptTest::GenerateOatForTest(const std::string& dex_location, const std::string& oat_location, CompilerFilter::Filter filter, bool with_alternate_image, - const char* compilation_reason) { + const char* compilation_reason, + const std::vector<std::string>& extra_args) { std::string dalvik_cache = GetDalvikCache(GetInstructionSetString(kRuntimeISA)); std::string dalvik_cache_tmp = dalvik_cache + ".redirected"; @@ -101,6 +102,8 @@ void DexoptTest::GenerateOatForTest(const std::string& dex_location, args.push_back("--compilation-reason=" + std::string(compilation_reason)); } + args.insert(args.end(), extra_args.begin(), extra_args.end()); + std::string error_msg; ASSERT_TRUE(Dex2Oat(args, &error_msg)) << error_msg; @@ -136,12 +139,14 @@ void DexoptTest::GenerateOatForTest(const std::string& dex_location, void DexoptTest::GenerateOdexForTest(const std::string& dex_location, const std::string& odex_location, CompilerFilter::Filter filter, - const char* compilation_reason) { + const char* compilation_reason, + const std::vector<std::string>& extra_args) { GenerateOatForTest(dex_location, odex_location, filter, /*with_alternate_image=*/ false, - compilation_reason); + compilation_reason, + extra_args); } void DexoptTest::GenerateOatForTest(const char* dex_location, diff --git a/runtime/dexopt_test.h b/runtime/dexopt_test.h index efbdcbaa07..026fe55131 100644 --- a/runtime/dexopt_test.h +++ b/runtime/dexopt_test.h @@ -42,13 +42,15 @@ class DexoptTest : public Dex2oatEnvironmentTest { const std::string& oat_location, CompilerFilter::Filter filter, bool with_alternate_image, - const char* compilation_reason = nullptr); + const char* compilation_reason = nullptr, + const std::vector<std::string>& extra_args = {}); // Generate an odex file for the purposes of test. void GenerateOdexForTest(const std::string& dex_location, const std::string& odex_location, CompilerFilter::Filter filter, - const char* compilation_reason = nullptr); + const char* compilation_reason = nullptr, + const std::vector<std::string>& extra_args = {}); // Generate an oat file for the given dex location in its oat location (under // the dalvik cache). |