mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-21 05:42:14 +00:00
23 lines
512 B
Python
Executable File
23 lines
512 B
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import sys
|
|
|
|
|
|
def main():
|
|
total_coverage_path = sys.argv[1]
|
|
new_coverage_path = sys.argv[2]
|
|
|
|
with open(total_coverage_path, 'rb') as f:
|
|
total_coverage = f.read()
|
|
|
|
with open(new_coverage_path, 'rb') as f:
|
|
new_coverage = f.read()
|
|
|
|
updated_total_coverage = bytes(max(a, b) for a, b in zip(total_coverage, new_coverage))
|
|
|
|
with open(total_coverage_path, 'wb') as f:
|
|
f.write(updated_total_coverage)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main() |