blob: 89d35d71aefcce2236d278d927cf0813bdcc9871 [file] [log] [blame]
Mingjun Yangd448be22024-10-15 05:37:00 +00001# 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.
14class TestDiscoveryAgent:
15 """Test discovery agent."""
16
17 _AOSP_TRADEFED_PREBUILT_JAR_RELATIVE_PATH = (
18 "tools/tradefederation/prebuilts/filegroups/tradefed/"
19 )
20
21 def __init__(
22 self,
23 tradefed_args: list[str],
24 test_mapping_zip_path: str,
25 tradefed_jar_revelant_files_path: str = _AOSP_TRADEFED_PREBUILT_JAR_RELATIVE_PATH,
26 ):
27 self.tradefed_args = tradefed_args
28 self.test_mapping_zip_path = test_mapping_zip_path
29 self.tradefed_jar_relevant_files_path = tradefed_jar_revelant_files_path
30
31 def discover_test_zip_regexes(self) -> list[str]:
32 """Discover test zip regexes from TradeFed.
33
34 Returns:
35 A list of test zip regexes that TF is going to try to pull files from.
36 """
37 return []
38
39 def discover_test_modules(self) -> list[str]:
40 """Discover test modules from TradeFed.
41
42 Returns:
43 A list of test modules that TradeFed is going to execute based on the
44 TradeFed test args.
45 """
46 return []