diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2016-02-04 11:39:57 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2016-02-04 14:22:34 +0100 |
commit | 51206112b9680165b880d75fe2f0be5878e25d37 (patch) | |
tree | df049d1f2bed1bd5bb034d7f582b08e4eeb3bfd0 | |
parent | 906565ff43fa09895ae0b194f09c72e1636ec029 (diff) |
Remove useless reports:
- report1.html was meant to carry the logs, but they are now in
report0.html too
- report*.xml are useless as long as our Jenkins does not have the
Summary Display plugin, which is able to parse XML
- rename report0.html into report.html
Change-Id: I234a4f1c1d4c28eb13ef1363748cba1c1bfa559c
-rwxr-xr-x | compare_jobs.sh | 109 |
1 files changed, 1 insertions, 108 deletions
diff --git a/compare_jobs.sh b/compare_jobs.sh index dfeb139..4226712 100755 --- a/compare_jobs.sh +++ b/compare_jobs.sh @@ -17,21 +17,6 @@ trap "rm -f ${tmptargets}" 0 1 2 3 5 9 13 15 rm -f ${tmptargets} -function xml_report_print_row -{ - local target=${1?} - local color=${2?} - local message=${3?} - local log_url=BUILD_URL/artifact/artifacts/logs/diff-${target}.txt - cat <<EOF -<tr> - <td>${target}</td> - <td fontattribute="bold" bgcolor="${color}">${message}</td> - <td><![CDATA[<a href="$log_url">log for ${target}</a>]]></td> -</tr> -EOF -} - function html_report_print_row { local target=${1?} @@ -46,18 +31,6 @@ function html_report_print_row EOF } -function xml_report_print_header -{ - cat <<EOF -<section name="Results comparison ${ref_logs} vs ${new_logs}"><table> - <tr> - <td fontattribute="bold" width="120" align="center">Target</td> - <td fontattribute="bold" width="120" align="center">Status</td> - <td fontattribute="bold" width="120" align="center">Log</td> -</tr> -EOF -} - # Should be called for all HTML documents (e.g. report, log, ...) function html_doc_print_header { @@ -86,13 +59,6 @@ function html_report_print_header EOF } -function xml_report_print_footer -{ - cat <<EOF -</table></section> -EOF -} - # Should be called for all HTML documents (e.g. report, log, ...) function html_doc_print_footer { @@ -109,59 +75,6 @@ function html_report_print_footer EOF } -function xml_log_print_field -{ - local target=${1?} - local log=${2?} - cat <<EOF - <field name="${target}"> - <![CDATA[ -EOF -cat $log -cat <<EOF - ]]></field> -EOF -} - -function html_log_print_field -{ - local target=${1?} - local log=${2?} - cat <<EOF - <p>${target}</p> -EOF -cat $log -cat <<EOF -EOF -} - -function xml_log_print_header -{ - cat <<EOF -<section name="Logs"> -EOF -} - -function html_log_print_header -{ - cat <<EOF -<h1>Logs</h1> -EOF -} - -function xml_log_print_footer -{ - cat <<EOF -</section> -EOF -} - -function html_log_print_footer -{ - cat <<EOF -EOF -} - # For the time being, we expect different jobs to store their results # in similar directories. @@ -182,21 +95,11 @@ if [ -s ${tmptargets} ]; then fi rm -f ${tmptargets} -XML_REPORT=${mydir}/report0.xml -HTML_REPORT=${mydir}/report0.html -rm -f ${XML_REPORT} ${XML_REPORT}.part +HTML_REPORT=${mydir}/report.html rm -f ${HTML_REPORT} ${HTML_REPORT}.part -XML_LOG=${mydir}/report1.xml -HTML_LOG=${mydir}/report1.html -rm -f ${XML_LOG} ${XML_LOG}.part -rm -f ${HTML_LOG} ${HTML_LOG}.part -xml_report_print_header > ${XML_REPORT}.part html_doc_print_header > ${HTML_REPORT}.part html_report_print_header >> ${HTML_REPORT}.part -xml_log_print_header > ${XML_LOG}.part -html_doc_print_header > ${HTML_LOG}.part -html_log_print_header >> ${HTML_LOG}.part # Gather all diffs, to concatenate them to the main report difflog=${mydir}/alldiffs.txt @@ -267,18 +170,12 @@ do esac ${failed} && status=1 - xml_report_print_row "${buildtarget}" "$color" "$message" >> $XML_REPORT.part html_report_print_row "${buildtarget}" "$class" "$message" >> $HTML_REPORT.part - xml_log_print_field "${buildtarget}" ${mylog} >> $XML_LOG.part - html_log_print_field "${buildtarget}" ${mylog} >> $HTML_LOG.part cat ${mylog} >> ${difflog} done -xml_report_print_footer >> ${XML_REPORT}.part html_report_print_footer >> ${HTML_REPORT}.part -xml_log_print_footer >> ${XML_LOG}.part -html_log_print_footer >> ${HTML_LOG}.part echo "<pre>" >> ${HTML_REPORT}.part cat ${difflog} >> ${HTML_REPORT}.part @@ -286,11 +183,7 @@ rm -f ${difflog} echo "</pre>" >> ${HTML_REPORT}.part html_doc_print_footer >> ${HTML_REPORT}.part -html_doc_print_footer >> ${HTML_LOG}.part -mv ${XML_REPORT}.part ${XML_REPORT} mv ${HTML_REPORT}.part ${HTML_REPORT} -mv ${XML_LOG}.part ${XML_LOG} -mv ${HTML_LOG}.part ${HTML_LOG} exit ${status} |