diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-05 11:03:45 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-05 11:07:03 -0400 |
commit | d8b39b4cfb4c27ec80161dbf0901617e92ba15d4 (patch) | |
tree | 4e58723126c5224ca121f9acb0a4d56f967d0610 | |
parent | 235e410f63a4725bbc4466dbdef7d5f661793e84 (diff) | |
download | haskell-wip/testsuite-metrics.tar.gz |
testsuite: Allow whitespace before "Metric (in|de)crease"wip/testsuite-metrics
Several people have struggled with metric change annotations
in their commit messages not being recognized due to the fact that
GitLab's job log inserts a space at the beginning of each line. Teach
the regular expression to accept this whitespace.
-rw-r--r-- | testsuite/driver/perf_notes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py index 390d21a124..53b5019dab 100644 --- a/testsuite/driver/perf_notes.py +++ b/testsuite/driver/perf_notes.py @@ -212,7 +212,7 @@ def parse_allowed_perf_changes(commitMsg: str innerQstrList = r"(?:"+qstr+r"(?:"+s+r"?,"+s+r"?"+qstr+r")*)?" # Inside of a list of strings.gs.s.. qstrList = r"(?:\["+s+r"?"+innerQstrList+s+r"?\])" # A list of strings (using box brackets).. - exp = (r"^Metric" + exp = (r"^\s*Metric" +s+r"(Increase|Decrease)" +s+r"?("+qstr+r"|"+qstrList+r")?" # Metric or list of metrics.s.. +s+r"?(\(" + r"(?:[^')]|"+qstr+r")*" + r"\))?" # Options surrounded in parenthesis. (allow parenthases in quoted strings) |