OSDN Git Service

art: Try to fix parsed_options_test on the build server
authorIgor Murashkin <iam@google.com>
Thu, 5 Feb 2015 01:30:43 +0000 (17:30 -0800)
committerIgor Murashkin <iam@google.com>
Thu, 5 Feb 2015 01:32:05 +0000 (17:32 -0800)
(It works fine locally because environment variables are defined
differently)

Also some minor cleanup elsewhere pointed out in the previous code
review.

Change-Id: I80650d2be6ce467b838db85eb130a0020d7c1480

runtime/gc/collector_type.h
runtime/parsed_options_test.cc
runtime/runtime.cc

index 9c62097..9275e6d 100644 (file)
@@ -54,7 +54,7 @@ static constexpr CollectorType kCollectorTypeDefault =
 #elif ART_DEFAULT_GC_TYPE_IS_GSS
     kCollectorTypeGSS
 #else
-    gc::kCollectorTypeCMS
+    kCollectorTypeCMS
 #error "ART default GC type must be set"
 #endif
     ;  // NOLINT [whitespace/semicolon] [5]
index f68b632..79dc2fa 100644 (file)
 
 namespace art {
 
-class ParsedOptionsTest : public ::testing::Test {};
+class ParsedOptionsTest : public ::testing::Test {
+ public:
+  static void SetUpTestCase() {
+    CommonRuntimeTest::SetUpAndroidRoot();
+  }
+};
 
 TEST_F(ParsedOptionsTest, ParsedOptions) {
   void* test_vfprintf = reinterpret_cast<void*>(0xa);
index 4bb1741..549ef0e 100644 (file)
@@ -762,7 +762,7 @@ bool Runtime::Init(const RuntimeOptions& raw_options, bool ignore_unrecognized)
 
   verify_ = runtime_options.GetOrDefault(Opt::Verify);
 
-  if (runtime_options.Exists(Opt::Interpret)) {
+  if (runtime_options.GetOrDefault(Opt::Interpret)) {
     GetInstrumentation()->ForceInterpretOnly();
   }