New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 701055 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

post_process should allow asserting the content of commands in step

Project Member Reported by nedngu...@google.com, Mar 13 2017

Issue description

In https://chromium-review.googlesource.com/c/453740/, I want to assert the value of "--got-v8-revision" & "--got-webrtc-revision" flags in "benchmark Dashboard Upload" step. However, post_process currently doesn't support such assertion. 
 
Owner: iannucci@chromium.org
Status: Started (was: Untriaged)
It does. Now that I've added a boolean return value from check, this is succinctly expressed as:

  def assertFlagValue(check, steps_odict, step, flag, value):
    if check(step in steps_odict):
      # This turns cmd into (flag, value) pairs
      pairs = zip(steps_odict[step]['cmd'], steps_odict[step]['cmd'][1:])
      check((flag, value) in pairs)

  test += post_process(assertFlagValue, 
    'benchmark Dashboard Upload', '--got-webrtc-revision',
    '0f90628433546e61d9268596da93418c623137f4')
That's awesome! Thanks for taking this bug.
Status: Fixed (was: Started)
The CL to make check return the boolean value of the expression is landed, so you should be able to write a post_process function like the one above now.

Sign in to add a comment