Zhuoyao Zhang | 9e103e9 | 2024-09-09 22:20:06 +0000 | [diff] [blame] | 1 | // Copyright 2024 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // Set of error prone rules to ensure code quality |
| 16 | // PackageLocation check requires the androidCompatible=false otherwise it does not do anything. |
| 17 | |
| 18 | package { |
| 19 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 20 | default_team: "trendy_team_adte", |
| 21 | } |
Zhuoyao Zhang | 5335955 | 2024-09-16 23:58:11 +0000 | [diff] [blame] | 22 | |
| 23 | python_library_host { |
Zhuoyao Zhang | 11986e8 | 2024-09-09 22:22:52 +0000 | [diff] [blame] | 24 | name: "edit_event_proto", |
| 25 | srcs: [ |
| 26 | "proto/edit_event.proto", |
| 27 | ], |
| 28 | proto: { |
| 29 | canonical_path_from_root: false, |
| 30 | }, |
| 31 | } |
| 32 | |
| 33 | python_library_host { |
Zhuoyao Zhang | 5335955 | 2024-09-16 23:58:11 +0000 | [diff] [blame] | 34 | name: "edit_monitor_lib", |
| 35 | pkg_path: "edit_monitor", |
| 36 | srcs: [ |
| 37 | "daemon_manager.py", |
Zhuoyao Zhang | bae5f72 | 2024-09-20 16:53:59 +0000 | [diff] [blame] | 38 | "edit_monitor.py", |
Zhuoyao Zhang | 3ca7cef | 2024-10-31 22:07:31 +0000 | [diff] [blame] | 39 | "utils.py", |
Zhuoyao Zhang | bae5f72 | 2024-09-20 16:53:59 +0000 | [diff] [blame] | 40 | ], |
| 41 | libs: [ |
| 42 | "asuite_cc_client", |
| 43 | "edit_event_proto", |
| 44 | "watchdog", |
Zhuoyao Zhang | 5335955 | 2024-09-16 23:58:11 +0000 | [diff] [blame] | 45 | ], |
| 46 | } |
| 47 | |
| 48 | python_test_host { |
| 49 | name: "daemon_manager_test", |
| 50 | main: "daemon_manager_test.py", |
| 51 | pkg_path: "edit_monitor", |
| 52 | srcs: [ |
| 53 | "daemon_manager_test.py", |
| 54 | ], |
| 55 | libs: [ |
| 56 | "edit_monitor_lib", |
| 57 | ], |
| 58 | test_options: { |
| 59 | unit_test: true, |
| 60 | }, |
| 61 | } |
Zhuoyao Zhang | d32bf9f | 2024-09-17 20:00:52 +0000 | [diff] [blame] | 62 | |
Zhuoyao Zhang | bae5f72 | 2024-09-20 16:53:59 +0000 | [diff] [blame] | 63 | python_test_host { |
| 64 | name: "edit_monitor_test", |
| 65 | main: "edit_monitor_test.py", |
| 66 | pkg_path: "edit_monitor", |
| 67 | srcs: [ |
| 68 | "edit_monitor_test.py", |
| 69 | ], |
| 70 | libs: [ |
| 71 | "edit_monitor_lib", |
| 72 | ], |
| 73 | test_options: { |
| 74 | unit_test: true, |
| 75 | }, |
| 76 | } |
| 77 | |
Zhuoyao Zhang | 7d4268f | 2024-10-21 17:41:47 +0000 | [diff] [blame] | 78 | python_test_host { |
Zhuoyao Zhang | 3ca7cef | 2024-10-31 22:07:31 +0000 | [diff] [blame] | 79 | name: "edit_monitor_utils_test", |
| 80 | main: "utils_test.py", |
| 81 | pkg_path: "edit_monitor", |
| 82 | srcs: [ |
| 83 | "utils_test.py", |
| 84 | ], |
| 85 | libs: [ |
| 86 | "edit_monitor_lib", |
| 87 | ], |
| 88 | test_options: { |
| 89 | unit_test: true, |
| 90 | }, |
| 91 | } |
| 92 | |
| 93 | python_test_host { |
Zhuoyao Zhang | 7d4268f | 2024-10-21 17:41:47 +0000 | [diff] [blame] | 94 | name: "edit_monitor_integration_test", |
| 95 | main: "edit_monitor_integration_test.py", |
| 96 | pkg_path: "testdata", |
| 97 | srcs: [ |
| 98 | "edit_monitor_integration_test.py", |
| 99 | ], |
| 100 | test_options: { |
| 101 | unit_test: true, |
| 102 | }, |
| 103 | data: [ |
| 104 | ":edit_monitor", |
| 105 | ], |
| 106 | } |
| 107 | |
Zhuoyao Zhang | d32bf9f | 2024-09-17 20:00:52 +0000 | [diff] [blame] | 108 | python_binary_host { |
| 109 | name: "edit_monitor", |
| 110 | pkg_path: "edit_monitor", |
| 111 | srcs: [ |
| 112 | "main.py", |
| 113 | ], |
| 114 | libs: [ |
| 115 | "edit_monitor_lib", |
| 116 | ], |
| 117 | main: "main.py", |
| 118 | } |