Skip to content

Commit e57dd8b

Browse files
committed
Modify regex in memtest header
Specify 40-char hex, and allow - _ / . in branch name
1 parent 257fa7e commit e57dd8b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

log-files/index.html

+8-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ <h2>September 2023</h2>
2020
<a href="2023-09-27_16-39-40/index.html">2023-09-27_16-39-40</a>
2121
</td>
2222
<td>green</td>
23-
<td>unknown branch</td>
24-
<td>unknown commit</td>
23+
<td>memtest-summary</td>
24+
<td>
25+
<a href="https://github.com/Chaste/Chaste/commit/db1876898339369ee96312a3ef79cdb8f06222be">db1876898339369ee96312a3ef79cdb8f06222be</a>
26+
</td>
2527
</tr>
2628
<tr class="tr-green">
2729
<td>
@@ -122,8 +124,10 @@ <h2>September 2023</h2>
122124
<a href="2023-09-25_12-50-59/index.html">2023-09-25_12-50-59</a>
123125
</td>
124126
<td>green</td>
125-
<td>unknown branch</td>
126-
<td>unknown commit</td>
127+
<td>173/merge</td>
128+
<td>
129+
<a href="https://github.com/Chaste/Chaste/commit/48e11fed71d9a84049e3983e89622d90bad86913">48e11fed71d9a84049e3983e89622d90bad86913</a>
130+
</td>
127131
</tr>
128132
<tr class="tr-green">
129133
<td>

write_index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def write_index_file(list_of_logs: list[str]) -> None:
8888
unique_dates = sorted(list(unique_dates), reverse=True)
8989

9090
# Regex to find the branch name and commit hash for this memtest output
91-
header_pattern = r'<h2>Memtest output for commit <a href="https:\/\/github\.com\/Chaste\/Chaste\/commit\/(\w+)">\1<\/a> on branch (\w+)<\/h2>'
91+
header_pattern = r'([0-9a-fA-F]{40})">\1<\/a> on branch ([a-zA-Z0-9\-\_\/\.]+)<\/h2>'
9292
header_regex = re.compile(header_pattern)
9393

9494
# Regex to find the number of green, orange and red tests in a given file

0 commit comments

Comments
 (0)