Home
last modified time | relevance | path

Searched refs:Path (Results 1 – 25 of 67) sorted by relevance

123

/tools/external_updater/
Dgit_utils.py20 from pathlib import Path
26 def fetch(proj_path: Path, remote_names: list[str]) -> None: argument
37 def add_remote(proj_path: Path, name: str, url: str) -> None: argument
49 def remove_remote(proj_path: Path, name: str) -> None: argument
55 def list_remotes(proj_path: Path) -> dict[str, str]: argument
75 def detect_default_branch(proj_path: Path, remote_name: str) -> str: argument
89 def get_sha_for_branch(proj_path: Path, branch: str): argument
96 def get_commits_ahead(proj_path: Path, branch: str, argument
108 def get_commit_time(proj_path: Path, commit: str) -> datetime.datetime: argument
116 def list_remote_branches(proj_path: Path, remote_name: str) -> list[str]: argument
[all …]
Dfileutils.py19 from pathlib import Path
33 def external_path() -> Path:
47 android_top = Path(os.environ.get("ANDROID_BUILD_TOP", os.getcwd()))
58 def get_absolute_project_path(proj_path: Path) -> Path: argument
66 def get_metadata_path(proj_path: Path) -> Path: argument
71 def get_relative_project_path(proj_path: Path) -> Path: argument
76 def canonicalize_project_path(proj_path: Path) -> Path: argument
101 def read_metadata(proj_path: Path) -> metadata_pb2.MetaData: argument
120 def write_metadata(proj_path: Path, metadata: metadata_pb2.MetaData, keep_date: bool) -> None: argument
Dtest_git_utils.py17 from pathlib import Path
25 def fixture_repo_tree(tmp_path: Path) -> Path: argument
33 def fixture_pore_tree(repo_tree: Path) -> Path: argument
39 def test_tree_uses_pore_fast_path(tmp_path: Path, mocker: MockerFixture) -> None: argument
48 def test_tree_uses_pore_identifies_pore_trees(pore_tree: Path, mocker: MockerFixture) -> None: argument
51 which_mock.return_value = Path("pore")
55 def test_tree_uses_pore_identifies_repo_trees(repo_tree: Path, mocker: MockerFixture) -> None: argument
58 which_mock.return_value = Path("pore")
Dupdater_utils.py21 from pathlib import Path
29 def create_updater(metadata: metadata_pb2.MetaData, proj_path: Path, argument
68 def run_post_update(source_dir: Path, target_dir: Path) -> None: argument
75 cmd: Sequence[str | Path] = ['bash', post_update_path, source_dir, target_dir]
133 def build(proj_path: Path) -> None: argument
Dexternal_updater.py34 from pathlib import Path
74 def build_updater(proj_path: Path) -> Tuple[Updater, metadata_pb2.MetaData]: argument
154 proj_path: Path, argument
198 updater = check_and_update(args, Path(path), update_lib)
204 results[str(fileutils.canonicalize_project_path(Path(path)))] = res
221 abs_paths = [fileutils.get_absolute_project_path(Path(path))
232 with Path(json_file).open('w') as res_file:
251 if not Path(path).name in excludes]
Dbase_updater.py16 from pathlib import Path
25 def __init__(self, proj_path: Path, old_url: metadata_pb2.URL, argument
60 def project_path(self) -> Path:
Dhashtags.py16 from pathlib import Path
18 def find_hashtag(proj_path: Path) -> str: argument
/tools/asuite/atest/bazel/runner/src/com/android/tradefed/testtype/bazel/
DBazelTest.java60 import java.nio.file.Path;
99 private final List<Path> mTemporaryPaths = new ArrayList<>();
100 private final List<Path> mLogFiles = new ArrayList<>();
103 private final Path mTemporaryDirectory;
106 private Path mRunTemporaryDirectory;
199 Path workspaceDirectory = resolveWorkspacePath(); in runTestsAndParseResults()
209 Path bepFile = createTemporaryFile("BEP_output"); in runTestsAndParseResults()
279 private ProcessBuilder createBazelCommand(Path workspaceDirectory, String tmpDirPrefix) in createBazelCommand()
282 Path javaTmpDir = createTemporaryDirectory("%s-java-tmp-out".formatted(tmpDirPrefix)); in createBazelCommand()
283 Path bazelTmpDir = createTemporaryDirectory("%s-bazel-tmp-out".formatted(tmpDirPrefix)); in createBazelCommand()
[all …]
/tools/asuite/atest/
Dbazel_mode.py46 from pathlib import Path
150 def get_bazel_workspace_dir() -> Path:
151 return Path(atest_utils.get_build_out_dir()).joinpath(_BAZEL_WORKSPACE_DIR)
158 src_root_path = Path(os.environ.get(constants.ANDROID_BUILD_TOP))
163 product_out_path=Path(
174 host_out_path=Path(os.environ.get(constants.ANDROID_HOST_OUT)),
175 build_out_dir=Path(atest_utils.get_build_out_dir()),
192 src_root_path: Path, argument
193 resource_root_path: Path, argument
194 product_out_path: Path, argument
[all …]
Datest_utils.py47 from pathlib import Path
64 DIST_OUT_DIR = Path(os.environ.get(constants.ANDROID_BUILD_TOP, os.getcwd())
119 ninja_file: Path
121 variable_file: Path
347 log_path = Path(get_build_out_dir()).joinpath('verbose.log.gz')
617 filename = Path(filename)
647 if not Path(check_file).is_file():
670 name = Path(f)
1045 if Path(jsonfile).is_file():
1068 atest_dir = Path(__file__).resolve().parent
[all …]
Dmodule_info.py30 from pathlib import Path
114 Path(index_dir) if index_dir else
115 Path(os.getenv(constants.ANDROID_HOST_OUT)).joinpath('indexes')
123 self.java_dep_path = Path(
125 self.cc_dep_path = Path(
127 self.merged_dep_path = Path(
130 self.mod_info_file_path = Path(module_file) if module_file else None
226 self.mod_info_file_path = Path(file_path)
235 if Path(file_path).name == _MODULE_INFO and not module_info_json:
265 dirname = Path(self.module_info_checksum).parent
[all …]
Datest_utils_unittest.py30 from pathlib import Path
459 json_file_path = Path(
465 json_file_path = Path(
473 json_file_path = Path(
482 repo_dir = Path(build_top.name).joinpath('.repo')
739 tmpbp = Path(temp_dir.name).joinpath('Android.bp')
755 tmpbp = Path(temp_dir.name).joinpath('Android.bp')
769 tmpbp = Path(temp_dir.name).joinpath('Android.mk')
805 shardable_tests_file = Path(atest_utils.get_misc_dir()).joinpath(
817 shardable_tests_file = Path(atest_utils.get_misc_dir()).joinpath(
[all …]
Dmodule_info_unittest.py29 from pathlib import Path
90 if not Path(path).is_dir():
91 Path(path).mkdir(parents=True)
93 self.json_file_path = Path(PRODUCT_OUT_DIR).joinpath(uc.JSON_FILE)
95 self.cc_dep_path = Path(SOONG_OUT_DIR).joinpath(uc.CC_DEP_FILE)
97 self.java_dep_path = Path(SOONG_OUT_DIR).joinpath(uc.JAVA_DEP_FILE)
98 self.merged_dep_path = Path(PRODUCT_OUT_DIR).joinpath(uc.MERGED_DEP_FILE)
346 search_from=Path(uc.TEST_DATA_DIR).joinpath('foo/bar/AmSlam/test')))
365 expected_filepath = Path(uc.TEST_DATA_DIR).joinpath(
371 expected_filepath = Path(uc.TEST_DATA_DIR).joinpath(
Dbazel_mode_unittest.py31 from pathlib import Path
58 self._src_root_path = Path('/src')
294 Path(workspace_generator.mod_info.mod_info_file_path).touch()
813 gen = self.create_workspace_generator(jdk_path=Path('jdk_src_root'))
834 jdk_path = Path('jdk_path')
845 gen = self.create_workspace_generator(jdk_path=Path('jdk_src_root'))
867 gen = self.create_workspace_generator(jdk_path=Path('jdk_src_root'))
1335 self.fs.create_file(Path('src/lib/AndroidTest.xml'), contents='')
1613 self.workspace_out_path = Path('/workspace_out_path')
1682 parent_path = Path('parent')
[all …]
/tools/asuite/atest/bazel/runner/tests/src/com/android/tradefed/testtype/bazel/
DBazelTestTest.java70 import java.nio.file.Path;
91 private Path mBazelTempPath;
172 public void writeSingleTestOutputs(Path outputsDir, String testName) in malformedProtoResults_runFails()
177 Path outputFile = outputsDir.resolve("proto-results"); in malformedProtoResults_runFails()
197 public void writeSingleTestResultEvent(File outputsZipFile, Path bepFile) in malformedBepFile_runFails()
467 public Path createLogFile(String testName, Path logDir) throws IOException { in multipleTestsRun_reportsAllResults()
468 Path logFile = logDir.resolve(testName); in multipleTestsRun_reportsAllResults()
510 public void writeSingleTestResultEvent(File outputsZipFile, Path bepFile) in reportCachedTestResultsDisabled_cachedTestResultNotReported()
633 private static List<Path> listDirContents(Path dir) throws IOException {
634 try (Stream<Path> fileStream = Files.list(dir)) {
[all …]
/tools/asuite/atest/bazel/reporter/javatests/com/android/tradefed/result/
DBazelExitCodeResultReporterTest.java36 import java.nio.file.Path;
51 Path exitCodeFile = createExitCodeFilePath(); in writeNoTestsFoundExitCode_noTestsRun()
62 Path exitCodeFile = createExitCodeFilePath(); in writeRunFailureExitCode_runFailed()
76 Path exitCodeFile = createExitCodeFilePath(); in writeSuccessExitCode_allTestsPassed()
91 Path exitCodeFile = createExitCodeFilePath(); in writeTestsFailedExitCode_oneTestFailed()
107 Path exitCodeFile = createExitCodeFilePath(); in writeRunFailureExitCode_bothRunFailedAndTestFailed()
129 Path exitCodeFile = createExitCodeFilePath(); in writeRunFailureExitCode_noTestsAndRunFailed()
147 private static void assertFileContentsEquals(String expected, Path filePath) in assertFileContentsEquals()
152 private Path createExitCodeFilePath() { in createExitCodeFilePath()
156 private BazelExitCodeResultReporter createReporter(Path path) throws Exception { in createReporter()
DBazelXmlResultReporterTest.java42 import java.nio.file.Path;
61 Path xmlFile = createXmlFilePath(); in writeResultPassed_testPassed()
76 Path xmlFile = createXmlFilePath(); in writeStackTrace_testFailed()
92 Path xmlFile = createXmlFilePath(); in noWriteTestCase_testIgnored()
108 Path xmlFile = createXmlFilePath(); in writeTestCaseResultIncomplete_runFailed()
122 Path xmlFile = createXmlFilePath(); in writeSkipped_testAssumptionFailure()
138 Path xmlFile = createXmlFilePath(); in writeTestCount_multipleTests()
173 private static StringSubject assertThatFileContents(Path filePath) throws IOException { in assertThatFileContents()
178 Path filePath, String tagName, String attributeName, String attributeValue) in assertXmlFileContainsTagWithAttribute()
194 private Path createXmlFilePath() { in createXmlFilePath()
[all …]
/tools/asuite/atest/integration_tests/
Dresult_compare_test.py31 from pathlib import Path
38 self.src_root_path = Path(os.environ['ANDROID_BUILD_TOP'])
39 self.out_dir_path = Path(tempfile.mkdtemp())
87 ) -> Path:
95 result_file_path = Path(
136 def parse_standard_result(result_file: Path) -> Dict[str, str]: argument
152 def parse_bazel_result(result_file: Path) -> Dict[str, str]: argument
Dbazel_mode_test.py30 from pathlib import Path
50 self.src_root_path = Path(os.environ['ANDROID_BUILD_TOP'])
54 self.out_dir_path = Path(tempfile.mkdtemp())
229 ) -> Tuple[Path, Path]:
256 ) -> Tuple[Path, Path]:
282 ) -> Tuple[Path, Path]:
/tools/asuite/atest/coverage/com/android/jacocolcov/
DJacocoToLcovConverter.java42 import java.nio.file.Path;
138 private SetMultimap<String, Path> sourceFiles;
156 void indexSourcePath(final Path path) throws IOException { in indexSourcePath()
157 try (Stream<Path> stream = Files.walk(path)) { in indexSourcePath()
174 void loadExecFile(final Path execFile) throws IOException { in loadExecFile()
197 void loadClassFile(final Path classFile) throws IOException { in loadClassFile()
213 void write(final Path outputFile) throws IOException { in write()
319 for (Path path : sourceFiles.get(key)) { in findSourceFileMatching()
/tools/treble/hacksaw/mount/
Dsystem.go53 mountList = append(mountList, mount.Path)
60 Path string member
73 Path: fields[1],
/tools/repohooks/tools/
Dclang-format_unittest.py19 from pathlib import Path
25 DIR = Path(__file__).resolve().parent
41 tempdir = Path(tempdir)
/tools/aadevtools/dev/
Dchange_report.py240 rp = pathlib.Path(subdir_dircmp.right)
241 lp = pathlib.Path(subdir_dircmp.left)
265 file_path = pathlib.Path(adir, file)
293 old_file_path = pathlib.Path(dircmp.left, file)
294 new_file_path = pathlib.Path(dircmp.right, file)
/tools/asuite/atest/logstorage/
Datest_gcp_utils_unittest.py23 from pathlib import Path
124 Path(not_upload_file).touch()
133 Path(fake_cred_file).touch()
/tools/asuite/atest/test_runners/
Droboleaf_test_runner_unittest.py24 from pathlib import Path
162 module_map_location = Path(unittest_constants.TEST_DATA_DIR).joinpath(
187 module_map_location = Path(unittest_constants.TEST_DATA_DIR).joinpath(

123