| Index: runtime/vm/service_test.cc
|
| diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
|
| index 7cef50b1726abbffe333a0568bb30cddbf5cc606..d98b4cc079075958330656772de9c3ae3b050302 100644
|
| --- a/runtime/vm/service_test.cc
|
| +++ b/runtime/vm/service_test.cc
|
| @@ -13,6 +13,7 @@
|
| #include "vm/object_id_ring.h"
|
| #include "vm/os.h"
|
| #include "vm/port.h"
|
| +#include "vm/profiler.h"
|
| #include "vm/safepoint.h"
|
| #include "vm/service.h"
|
| #include "vm/unit_test.h"
|
| @@ -725,7 +726,15 @@ TEST_CASE(Service_EmbedderIsolateHandler) {
|
| // TODO(zra): Remove when tests are ready to enable.
|
| #if !defined(TARGET_ARCH_ARM64)
|
|
|
| +static void EnableProfiler() {
|
| + if (!FLAG_profiler) {
|
| + FLAG_profiler = true;
|
| + Profiler::InitOnce();
|
| + }
|
| +}
|
| +
|
| TEST_CASE(Service_Profile) {
|
| + EnableProfiler();
|
| const char* kScript =
|
| "var port;\n" // Set to our mock port by C++.
|
| "\n"
|
|
|