!2829 Fix fdopen usage in urunner coverage.py

Merge pull request !2829 from dsilakov/coverage_fix
This commit is contained in:
openharmony_ci 2024-11-15 13:24:19 +00:00 committed by Gitee
commit 77c3a97607
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -113,7 +113,7 @@ class LlvmCov:
def make_profdata_list_file(self) -> None:
results = self.do_find(self.coverage_dir.profdata_dir, '*.profdata')
with os.fdopen(os.open(self.coverage_dir.profdata_files_list_file, os.O_APPEND | os.O_CREAT, 0o755),
with os.fdopen(os.open(self.coverage_dir.profdata_files_list_file, os.O_WRONLY | os.O_CREAT, 0o755),
"a", encoding="utf-8") as the_file:
for i in results:
the_file.write(str(i) + '\n')