Start edit monitor only when the feature is enabled
Check the env variable to determine whether the edit monitor feature is
enabled and only start the edit monitor if it is enabled, otherwise exit
directly. This helps to roll out the feature gradually.
Test: atest edit_monitor_utils_test atest daemon_manager_test
Bug: 365617369
Change-Id: I03fb494e1f62712efaf0bb05de8859e0118702bf
diff --git a/tools/edit_monitor/Android.bp b/tools/edit_monitor/Android.bp
index e613563..b8ac5bf 100644
--- a/tools/edit_monitor/Android.bp
+++ b/tools/edit_monitor/Android.bp
@@ -36,6 +36,7 @@
srcs: [
"daemon_manager.py",
"edit_monitor.py",
+ "utils.py",
],
libs: [
"asuite_cc_client",
@@ -75,6 +76,21 @@
}
python_test_host {
+ name: "edit_monitor_utils_test",
+ main: "utils_test.py",
+ pkg_path: "edit_monitor",
+ srcs: [
+ "utils_test.py",
+ ],
+ libs: [
+ "edit_monitor_lib",
+ ],
+ test_options: {
+ unit_test: true,
+ },
+}
+
+python_test_host {
name: "edit_monitor_integration_test",
main: "edit_monitor_integration_test.py",
pkg_path: "testdata",