8323637: Capture hotspot replay files in GHA

Backport-of: c84c0ab52d5e08a693f7ad7d9a4772d8c1eeeaa8
This commit is contained in:
Aleksey Shipilev 2024-02-03 21:38:15 +00:00
parent 58d2ceb5dc
commit 4126c018b2
1 changed files with 16 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -44,8 +44,8 @@ for test in $failures $errors; do
base_path="$(echo "$test" | tr '#' '_')" base_path="$(echo "$test" | tr '#' '_')"
report_file="$report_dir/$base_path.jtr" report_file="$report_dir/$base_path.jtr"
hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true) hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
replay_files=$(ls $report_dir/$base_path/replay*.log 2> /dev/null || true)
echo "#### <a id="$anchor">$test" echo "#### <a id="$anchor">$test"
echo '<details><summary>View test results</summary>' echo '<details><summary>View test results</summary>'
echo '' echo ''
echo '```' echo '```'
@ -73,6 +73,20 @@ for test in $failures $errors; do
echo '' echo ''
fi fi
if [[ "$replay_files" != "" ]]; then
echo '<details><summary>View HotSpot replay file</summary>'
echo ''
for replay in $replay_files; do
echo '```'
echo "$replay:"
echo ''
cat "$replay"
echo '```'
done
echo '</details>'
echo ''
fi
done >> $GITHUB_STEP_SUMMARY done >> $GITHUB_STEP_SUMMARY
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github # With many failures, the summary can easily exceed 1024 kB, the limit set by Github