summaryrefslogtreecommitdiffstats
path: root/runtime/utils_test.cc
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-02-10 23:48:36 -0800
committerBrian Carlstrom <bdc@google.com>2014-02-24 14:24:12 -0800
commit6449c62e40ef3a9bb75f664f922555affb532ee4 (patch)
tree2f1b2120bd648c95dea32b68c8e168e42c8e24fd /runtime/utils_test.cc
parent3fcf18e25241253f23efbeebe77b2a4c4a7c54d3 (diff)
downloadart-6449c62e40ef3a9bb75f664f922555affb532ee4.zip
art-6449c62e40ef3a9bb75f664f922555affb532ee4.tar.gz
art-6449c62e40ef3a9bb75f664f922555affb532ee4.tar.bz2
Create CompilerOptions
Package up most compiler related options in CompilerOptions. Details include: - Includes compiler filter, method thresholds, SEA IR mode. - Excludes those needed during Runtime::Init such as CompilerCallbacks and VerificationResults. - Pass CompilerOptions to CompilerDriver. - Remove CompilerOptions from Runtime. - Add ability to pass options for app and image dex2oat to runtime via -Xcompiler-option and -Ximage-compiler-option respectively. Other - Replace 2x CompilerCallbacks implementations with one. - Factor out execv code for use by both image and oat generation. - More OatFile error_msg reporting. - DCHECK for SuspendAll found trying to run valgrind. Change-Id: Iecb57da907be0c856d00c3cd634b5042a229e620
Diffstat (limited to 'runtime/utils_test.cc')
-rw-r--r--runtime/utils_test.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/utils_test.cc b/runtime/utils_test.cc
index b43177b..ff65e47 100644
--- a/runtime/utils_test.cc
+++ b/runtime/utils_test.cc
@@ -349,4 +349,26 @@ TEST_F(UtilsTest, GetDalvikCacheFilenameOrDie) {
CheckGetDalvikCacheFilenameOrDie("/system/framework/boot.art", "system@framework@boot.art");
}
+TEST_F(UtilsTest, ExecSuccess) {
+ std::vector<std::string> command;
+ if (kIsTargetBuild) {
+ command.push_back("/system/bin/id");
+ } else {
+ command.push_back("/usr/bin/id");
+ }
+ std::string error_msg;
+ EXPECT_TRUE(Exec(command, &error_msg));
+ EXPECT_EQ(0U, error_msg.size()) << error_msg;
+}
+
+// TODO: Disabled due to hang tearing down CommonTest.
+// Renable after splitting into RuntimeTest and CompilerTest.
+TEST_F(UtilsTest, DISABLED_ExecError) {
+ std::vector<std::string> command;
+ command.push_back("bogus");
+ std::string error_msg;
+ EXPECT_FALSE(Exec(command, &error_msg));
+ EXPECT_NE(0U, error_msg.size());
+}
+
} // namespace art