Skip to content

Commit

Permalink
[wpt] Include revision in wptreport
Browse files Browse the repository at this point in the history
In this change, `run_wpt_tests` manually adds the commit hash of the
upstream repo in wptreports uploaded to wpt.fyi. The `revision` field
was missing after we stopped using a checked-in version
(crrev.com/c/3842699).

Bug: 1355911
Change-Id: I6c82a97750c64f1d3ff7fbc950200c13c7dbf927
Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel
Test: From outside chromium/src, run:
Test: run_wpt_tests.py -t Default badging/badge-success.https.html \
Test: --log-wptreport --use-upstream-wpt
Test: jq .run_info.revision out/Default/wpt_reports_chrome.json
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3867910
Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1041728}
NOKEYCHECK=True
GitOrigin-RevId: d14fe93531aa2ee6aa78e30e36a92e12e5aacf9e
  • Loading branch information
jonathan-j-lee authored and copybara-github committed Aug 31, 2022
1 parent 313c5b4 commit fc3227e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blink/tools/blinkpy/common/checkout/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ def current_branch(self):
return ''
return self._branch_from_ref(ref)

def current_revision(self):
"""Return the commit hash of HEAD."""
return self.run(['rev-parse', 'HEAD']).strip()

def _upstream_branch(self):
current_branch = self.current_branch()
return self._branch_from_ref(
Expand Down

0 comments on commit fc3227e

Please sign in to comment.