summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-03-14 17:53:15 -0700
committerZorro Lang <zlang@kernel.org>2023-03-26 22:05:51 +0800
commit9c54fea5f5f9a142f8ae90c0d0210efd0f048ec9 (patch)
treea1ce059c1e282df8bb6ddd55964ceed77c8b4170 /common
parent396d221df719435d16dcb569b18ce392efdcdffd (diff)
report: sort properties by name
When we're generating a junit xml report, always sort the properties by name. This makes it easier for humans to find a particular property. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'common')
-rw-r--r--common/report4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/report b/common/report
index 2e595931..3ec2d881 100644
--- a/common/report
+++ b/common/report
@@ -32,7 +32,7 @@ _xunit_add_property()
local value="${!name}"
if [ ! -z "$value" ]; then
- echo -e "\t\t<property name=\"$name\" value=\"$value\"/>" >> $REPORT_DIR/result.xml
+ echo -e "\t\t<property name=\"$name\" value=\"$value\"/>"
fi
}
_xunit_make_section_report()
@@ -77,7 +77,7 @@ ENDL
echo -e "\t<properties>" >> $REPORT_DIR/result.xml
for p in "${REPORT_ENV_LIST[@]}"; do
_xunit_add_property "$p"
- done
+ done | sort >> $REPORT_DIR/result.xml
echo -e "\t</properties>" >> $REPORT_DIR/result.xml
if [ -f $report ]; then
cat $report >> $REPORT_DIR/result.xml