commit | bc8a2633c33ebfcb5895a73f3ba213b1faf845f8 | [log] [tgz] |
---|---|---|
author | Ted Pudlik <tpudlik@google.com> | Wed Sep 28 01:02:56 2022 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Sep 28 01:02:56 2022 +0000 |
tree | 1f7c7f5c318519723e789d63fb68d9809fa96ca9 | |
parent | 71a3266aa316744d980bf2a4eb3d4129923ce99f [diff] |
pw_unit_test: Provide TestMetadata to ResultDB This will result in nicer names in the TestResult panel. See https://bugs.chromium.org/p/chromium/issues/detail?id=1368387#c6 Bug: 247857184 Change-Id: I977a0c7c341bf415dc54cfc120d3a86d23470eeb Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/112315 Reviewed-by: Alexei Frolov <frolv@google.com> Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_unit_test/py/pw_unit_test/test_runner.py b/pw_unit_test/py/pw_unit_test/test_runner.py index 816790f..0d49ff9 100644 --- a/pw_unit_test/py/pw_unit_test/test_runner.py +++ b/pw_unit_test/py/pw_unit_test/test_runner.py
@@ -235,6 +235,13 @@ # like '1.1e-10', which is an invalid input for # google.protobuf.duration. "duration": "%.9fs" % test.duration_s, + "testMetadata": { + # Use the file path as the test name in the Milo UI. (If this is + # left unspecified, the UI will attempt to build a "good enough" + # name by truncating the testId. That produces less readable + # results.) + "name": test.file_path, + }, "summaryHtml": '<p><text-artifact artifact-id="artifact-content-in-request"></p>', "artifacts": {