From: Darrick J. Wong Date: Wed, 15 Mar 2023 00:53:10 +0000 (-0700) Subject: report: encode the kernel log as a separate xml element X-Git-Tag: v2023.03.26~8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=396d221df719435d16dcb569b18ce392efdcdffd;p=xfstests-dev.git report: encode the kernel log as a separate xml element Record the .dmesg file in a new element instead of multiplexing it with . This means that the xml report can now capture kernel log and bad golden output. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- diff --git a/common/report b/common/report index eb169175..2e595931 100644 --- a/common/report +++ b/common/report @@ -137,15 +137,14 @@ _xunit_make_testcase_report() printf ']]>\n' >>$report echo -e "\t\t" >> $report fi - if [ -n "$quiet" ]; then - : - elif [ -f "$dmesg_file" ]; then - echo -e "\t\t" >> $report + if [ -z "$quiet" -a -f "$dmesg_file" ]; then + echo -e "\t\t" >> $report printf '>$report cat "$dmesg_file" | tr -dc '[:print:][:space:]' | encode_cdata >>$report printf ']]>\n' >>$report - echo -e "\t\t" >> $report - elif [ -s "$outbad_file" ]; then + echo -e "\t\t" >> $report + fi + if [ -z "$quiet" -a -s "$outbad_file" ]; then echo -e "\t\t" >> $report printf '>$report $diff "$out_src" "$outbad_file" | encode_cdata >>$report diff --git a/doc/xunit.xsd b/doc/xunit.xsd index 3ed72f2f..d287eaf5 100644 --- a/doc/xunit.xsd +++ b/doc/xunit.xsd @@ -131,7 +131,7 @@ - + Data that was written to the .full log file while the test was executed. @@ -144,7 +144,17 @@ - Kernel log or data that was compared to the golden output file after the test was executed. + Data that was compared to the golden output file after the test was executed. + + + + + + + + + + Kernel log recorded while the test was executed.