зеркало из https://github.com/microsoft/CCF.git
Adding coverage to perf summary csv (#74)
This commit is contained in:
Родитель
35f73c5d60
Коммит
e3569d8559
|
@ -0,0 +1,20 @@
|
||||||
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
# Licensed under the Apache 2.0 License.
|
||||||
|
import time
|
||||||
|
import json
|
||||||
|
|
||||||
|
with open("coverage.json", "r") as file:
|
||||||
|
timestamp = str(int(time.time()))
|
||||||
|
data = json.load(file)["data"][0]
|
||||||
|
lines_covered = str(data["totals"]["lines"]["covered"])
|
||||||
|
lines_valid = str(data["totals"]["lines"]["count"])
|
||||||
|
|
||||||
|
with open("perf_summary.csv", "a") as f:
|
||||||
|
f.write(
|
||||||
|
timestamp
|
||||||
|
+ ","
|
||||||
|
+ lines_valid
|
||||||
|
+ ",Unit_Test_Coverage,0,0,0,"
|
||||||
|
+ lines_covered
|
||||||
|
+ ",0,0,0,0"
|
||||||
|
)
|
|
@ -20,4 +20,5 @@ llvm-cov-7 export -instr-profile coverage.profdata -format=text ds_test "${objec
|
||||||
mv cov_* coverage/
|
mv cov_* coverage/
|
||||||
|
|
||||||
python3.7 ../tests/coverage/cobertura_generator.py
|
python3.7 ../tests/coverage/cobertura_generator.py
|
||||||
python3.7 ../tests/coverage/style_html.py
|
python3.7 ../tests/coverage/style_html.py
|
||||||
|
python3.7 ../tests/coverage/add_perf_summary.py
|
Загрузка…
Ссылка в новой задаче