summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2015-02-04 17:30:43 -0800
committerIgor Murashkin <iam@google.com>2015-02-04 17:32:05 -0800
commiteb6c7c23a8065af665e71f3408980bacd8ecc529 (patch)
treeb1eda7fb58ca02d9539c27774ef2bb044b9369f0
parentedf45678f133ce51d7aff43be68d9be3936ffca2 (diff)
downloadandroid_art-eb6c7c23a8065af665e71f3408980bacd8ecc529.tar.gz
android_art-eb6c7c23a8065af665e71f3408980bacd8ecc529.tar.bz2
android_art-eb6c7c23a8065af665e71f3408980bacd8ecc529.zip
art: Try to fix parsed_options_test on the build server
(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
-rw-r--r--runtime/gc/collector_type.h2
-rw-r--r--runtime/parsed_options_test.cc7
-rw-r--r--runtime/runtime.cc2
3 files changed, 8 insertions, 3 deletions
diff --git a/runtime/gc/collector_type.h b/runtime/gc/collector_type.h
index 9c620977c6..9275e6d932 100644
--- a/runtime/gc/collector_type.h
+++ b/runtime/gc/collector_type.h
@@ -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]
diff --git a/runtime/parsed_options_test.cc b/runtime/parsed_options_test.cc
index f68b6329c4..79dc2fa626 100644
--- a/runtime/parsed_options_test.cc
+++ b/runtime/parsed_options_test.cc
@@ -22,7 +22,12 @@
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);
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 4bb17413db..549ef0e2cd 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -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();
}