Enabling tombstone transmit back to host
Test: Treehugger
Change-Id: Iedca1d0ae9f7082cd7b077cdc75d854a88edd247
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 71249ba..b838ee9 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,4 +1,9 @@
{
+ "postsubmit" : [
+ {
+ "name": "tombstone_transmit_tests"
+ }
+ ],
"presubmit": [
{
"name": "circqueue_test",
diff --git a/guest/Android.bp b/guest/Android.bp
index 6b2406c..95584bc 100644
--- a/guest/Android.bp
+++ b/guest/Android.bp
@@ -13,9 +13,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-subdirs = [
- "commands",
- "hals",
- "monitoring",
- "vsoc/lib",
-]
+subdirs = ["*"]
diff --git a/guest/monitoring/tombstone_transmit/Android.bp b/guest/monitoring/tombstone_transmit/Android.bp
index 243877e..891de90 100644
--- a/guest/monitoring/tombstone_transmit/Android.bp
+++ b/guest/monitoring/tombstone_transmit/Android.bp
@@ -16,7 +16,7 @@
cc_binary {
name: "tombstone_transmit",
srcs: [
- "main.cpp",
+ "tombstone_transmit.cpp",
],
static_libs: [
"libcuttlefish_fs_static",
@@ -32,3 +32,11 @@
],
defaults: ["cuttlefish_guest_product_only"],
}
+
+cc_binary {
+ name: "tombstone_producer",
+ srcs: [
+ "tombstone_producer.cpp",
+ ],
+ defaults: ["cuttlefish_guest_product_only"],
+}
diff --git a/guest/monitoring/tombstone_transmit/tombstone_producer.cpp b/guest/monitoring/tombstone_transmit/tombstone_producer.cpp
new file mode 100644
index 0000000..95d447d
--- /dev/null
+++ b/guest/monitoring/tombstone_transmit/tombstone_producer.cpp
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdlib.h>
+
+int __attribute__((noreturn)) main() {
+ abort();
+}
diff --git a/guest/monitoring/tombstone_transmit/main.cpp b/guest/monitoring/tombstone_transmit/tombstone_transmit.cpp
similarity index 100%
rename from guest/monitoring/tombstone_transmit/main.cpp
rename to guest/monitoring/tombstone_transmit/tombstone_transmit.cpp
diff --git a/host/commands/launch/flags.cc b/host/commands/launch/flags.cc
index 6c0867d..211e55c 100644
--- a/host/commands/launch/flags.cc
+++ b/host/commands/launch/flags.cc
@@ -200,7 +200,7 @@
"The (vsock) port for the configuration server");
DEFINE_int32(frames_vsock_port, vsoc::GetPerInstanceDefault(5580),
"The vsock port to receive frames from the guest on");
-DEFINE_bool(enable_tombstone_receiver, false, "Enables the tombstone logger on "
+DEFINE_bool(enable_tombstone_receiver, true, "Enables the tombstone logger on "
"both the guest and the host");
DEFINE_string(tombstone_receiver_binary,
vsoc::DefaultHostArtifactsPath("bin/tombstone_receiver"),