3 # for runtime reasons we split functional testings into N parts
4 # - use a define to check for missing tarfiles
7 ZTS_REPORT
="tests/test-runner/bin/zts-report.py"
11 echo -e $
* >> Summary.md
15 output
":bangbang: $* :bangbang:\n"
18 # this function generates the real summary
19 # - expects a logfile "log" in current directory
21 # we issued some error already
22 test ! -s log
&& return
24 # for overview and zts-report
25 cat log |
grep '^Test' > list
28 awk '/\[FAIL\]|\[KILLED\]/{ show=1; print; next; }
29 /\[SKIP\]|\[PASS\]/{ show=0; } show' log
> err
34 $ZTS_REPORT --no-maybes .
/list
>> Summary.md
37 # generate seperate error logfile
38 ERRLOGS
=$
((ERRLOGS
+1))
39 errfile
="err-$ERRLOGS.md"
40 echo -e "\n## $headline (debugging)\n" >> $errfile
41 echo "<details><summary>Error Listing - with dmesg and dbgmsg</summary><pre>" >> $errfile
42 dd if=err bs
=999k count
=1 >> $errfile
43 echo "</pre></details>" >> $errfile
45 output
"All tests passed :thumbsup:"
48 output
"<details><summary>Full Listing</summary><pre>"
49 cat list
>> Summary.md
50 output
"</pre></details>"
56 # check tarfiles and untar
57 function check_tarfile
() {
59 tar xf
"$1" || error
"Tarfile $1 returns some error"
61 error
"Tarfile $1 not found"
65 # check logfile and concatenate test results
66 function check_logfile
() {
70 error
"Logfile $1 not found"
75 function summarize_s
() {
77 output
"\n## $headline\n"
79 check_tarfile
"$2/sanity.tar"
80 check_logfile
"testfiles/log"
85 function summarize_f
() {
87 output
"\n## $headline\n"
89 for i
in $
(seq 1 $FUNCTIONAL_PARTS); do
90 tarfile
="$2/part$i.tar"
91 check_tarfile
"$tarfile"
92 check_logfile
"testfiles/log"
97 # https://docs.github.com/en/enterprise-server@3.6/actions/using-workflows/workflow-commands-for-github-actions#step-isolation-and-limits
98 # Job summaries are isolated between steps and each step is restricted to a maximum size of 1MiB.
99 # [ ] can not show all error findings here
100 # [x] split files into smaller ones and create additional steps
103 if [ ! -f Summary
/Summary.md
]; then
104 # first call, we do the default summary (~500k)
106 summarize_s
"Sanity Tests Ubuntu 20.04" Logs-20.04
-sanity
107 summarize_s
"Sanity Tests Ubuntu 22.04" Logs-22.04
-sanity
108 summarize_f
"Functional Tests Ubuntu 20.04" Logs-20.04
-functional
109 summarize_f
"Functional Tests Ubuntu 22.04" Logs-22.04
-functional
111 cat Summary.md
>> $GITHUB_STEP_SUMMARY
115 # here we get, when errors where returned in first call
116 test -f Summary
/err-
$1.md
&& cat Summary
/err-
$1.md
>> $GITHUB_STEP_SUMMARY