ART: Add slow-debug test in CommonRuntimeTest

Ensure that gtests run with slow flags enabled.

Bug: 35644369
Test: m test-art-host
Change-Id: I65f724befe8ccc87d9376bada6655998263327be
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 5a4a26a..f7d6a28 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -405,6 +405,8 @@
   options.push_back(std::make_pair(min_heap_string, nullptr));
   options.push_back(std::make_pair(max_heap_string, nullptr));
   options.push_back(std::make_pair("-XX:SlowDebug=true", nullptr));
+  static bool gSlowDebugTestFlag = false;
+  RegisterRuntimeDebugFlag(&gSlowDebugTestFlag);
 
   callbacks_.reset(new NoopCompilerCallbacks());
 
@@ -435,6 +437,9 @@
   java_lang_dex_file_ = boot_class_path_[0];
 
   FinalizeSetup();
+
+  // Ensure that we're really running with debug checks enabled.
+  CHECK(gSlowDebugTestFlag);
 }
 
 void CommonRuntimeTestImpl::FinalizeSetup() {