Skip to content

Commit e464f3d

Browse files
authored
Build preset in test report "copy run command" (#12798)
1 parent 1e172ec commit e464f3d

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/scripts/tests/generate-summary.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,22 @@ def render_testlist_html(rows, fn, build_preset):
284284
for current_status in status_for_history:
285285
status_test.get(current_status,[]).sort(key=lambda val: (-val.count_of_passed, val.full_name))
286286

287+
buid_preset_params = '--build unknown_build_type'
288+
if build_preset == 'release-asan' :
289+
buid_preset_params = '--build "release" --sanitize="address" -DDEBUGINFO_LINES_ONLY'
290+
elif build_preset == 'release-msan':
291+
buid_preset_params = '--build "release" --sanitize="memory" -DDEBUGINFO_LINES_ONLY'
292+
elif build_preset == 'release-tsan':
293+
buid_preset_params = '--build "release" --sanitize="thread" -DDEBUGINFO_LINES_ONLY'
294+
elif build_preset == 'relwithdebinfo':
295+
buid_preset_params = '--build "relwithdebinfo"'
296+
287297
content = env.get_template("summary.html").render(
288298
status_order=status_order,
289299
tests=status_test,
290300
has_any_log=has_any_log,
291301
history=history,
302+
build_preset=buid_preset_params
292303
)
293304

294305
with open(fn, "w") as fp:

.github/scripts/tests/templates/summary.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,14 @@
290290

291291
function copyTestNameToClipboard(text) {
292292
const full_name = text.trim();
293-
const pieces = /(.+)\/([^$]+)$/.exec(full_name);
293+
let pieces
294+
if (full_name.includes('.py.'))
295+
{
296+
pieces = /(.+)\/(.*py.*[^\/]+)$/.exec(full_name);
297+
} else
298+
{
299+
pieces = /(.+)\/([^$]+)$/.exec(full_name);
300+
}
294301

295302
if (!pieces) {
296303
console.error("Unable to split path/test name from %o", full_name);
@@ -306,7 +313,7 @@
306313
testName = namePieces[0] + '.' + namePieces[1] + '::' + namePieces.slice(2).join('::');
307314
}
308315

309-
const cmdArg = `./ya make -ttt --build relwithdebinfo -k -F '${testName}' ${path}`;
316+
const cmdArg = `./ya make -ttt {{ build_preset }} -F '${testName}' ${path}`;
310317

311318
console.log(cmdArg);
312319

0 commit comments

Comments
 (0)