Traffic annotation auditor and unittest updated

Desktop / Chromium - Ramin Halavati [chromium.org] - 12 September 2017 03:26 EDT

The following changes were done: 1- Auditor adds a list of OSes that actively use each annotation to annotations.xml, so that removing annotation from one OS and keeping it in another would not result in marking it deprecated. 2- A script is added to tools/traffic_anntotation/scripts, to call all scripts that update a give file when annotations.xml is modified, or to run unittests that ensure these files are up to date. 3- 'test-only' switch added to Auditor. When this switch is present, auditor only checks if annotations.xml is up to date and issues an error it if is not. When switch is not specified, annotations.xml may get updated and if so, the above mentioned script is called to update downstream files. 4- Auditor will prevent use of deprecated unique ids. 5- Unittest checks that annotations.xml is loadable and its content are
valid. 6- Unittest calls the script mentioned in (2) to test if downstream files are correctly updated.

Bug: 656607 Bug: 690323 Change-Id: I3cea4254dc4ff8bb2c31a8adc1ff5a7daf5006d7 Reviewed-on: https://chromium-review.googlesource.com/645088 Commit-Queue: Ramin Halavati

3c6304c Traffic annotation auditor and unittest updated.
tools/metrics/histograms/enums.xml | 5 +
tools/traffic_annotation/auditor/auditor_result.cc | 7 +
tools/traffic_annotation/auditor/auditor_result.h | 16 +-
.../auditor/traffic_annotation_auditor.cc | 33 +-
.../auditor/traffic_annotation_auditor.h | 9 +-
.../auditor/traffic_annotation_auditor_ui.cc | 67 +++-
.../auditor/traffic_annotation_auditor_unittest.cc | 34 +-
.../auditor/traffic_annotation_exporter.cc | 207 ++++++++---
.../auditor/traffic_annotation_exporter.h | 54 +--
tools/traffic_annotation/scripts/README.md | 7 +
.../scripts/annotations_xml_downstream_caller.py | 47 +++
tools/traffic_annotation/summary/README.md | 14 +-
tools/traffic_annotation/summary/annotations.xml | 385 +++++++++++----------
13 files changed, 575 insertions(+), 310 deletions(-)

Upstream: git.chromium.org


  • Share