post_process should allow asserting the content of commands in step |
||
Issue descriptionIn 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.
,
May 15 2017
That's awesome! Thanks for taking this bug.
,
May 16 2017
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 |
||
Comment 1 by iannucci@chromium.org
, May 15 2017Status: 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')