@@ -77,9 +77,40 @@ if [[ ! -z ${grep_reframe_failed} ]]; then
7777else
7878 # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report
7979 GP_success_full=' (?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*'
80- grep_reframe_success_full=$( grep -v " ^>> searching for " ${job_dir} /${job_out} | grep -Pzo " ${GP_success} " )
80+ # Grab the full ReFrame report, than cut the irrelevant parts
81+ # Note that the character limit for messages in github is around 65k, so cutting is important
82+ grep_reframe_success_full=$( \
83+ grep -v " ^>> searching for " ${job_dir} /${job_out} | \
84+ # Use -z
85+ grep -Pzo " ${GP_success_full} " | \
86+ # Replace null character with newline, to undo the -z option
87+ sed ' s/\x00/\n/g' | \
88+ # Remove the [ RUN ] lines from reframe, they are not very informative
89+ grep -v -P ' \[\s*RUN\s*]' | \
90+ # Remove the line '[----------] all spawned checks have finished'
91+ grep -v ' \[-*\]' | \
92+ # Remove the line '[==========] Finished on Mon Oct 7 21'
93+ grep -v ' \[=*\]' | \
94+ # Remove blank line(s) from the report
95+ grep -v ' ^$' | \
96+ # Remove warnings about the local spawner not supporting memory requests
97+ grep -v ' WARNING\: hooks\.req_memory_per_node does not support the scheduler you configured .local.*$' | \
98+ # Strip color coding characters
99+ sed ' s/\x1B\[[0-9;]*m//g' | \
100+ # Replace all newline characters with <br/>
101+ sed ' :a;N;$!ba;s/\n/<br\/>/g' | \
102+ # Replace % with %%. Use \%\% to interpret both %% as (non-special) characters
103+ sed ' s/\%/\%\%/g' \
104+ )
105+ # TODO (optional): we could impose a character limit here, and truncate if too long
106+ # (though we should do that before inserting the <br/> statements).
107+ # If we do, we should probably re-append the final summary, e.g.
108+ # [ PASSED ] Ran 10/10 test case(s) from 10 check(s) (0 failure(s), 0 skipped, 0 aborted)
109+ # so that that is always displayed
110+ # However, that's not implemented yet - let's see if this ever even becomes an issue
81111 grep_reframe_result=${grep_reframe_success_full}
82112fi
113+ echo " grep_reframe_result: ${grep_reframe_result} "
83114
84115echo " [TEST]" > ${job_test_result_file}
85116if [[ ${SLURM_OUTPUT_FOUND} -eq 0 ]]; then
0 commit comments