[PATCH 5/8] report: pass property value to _xunit_add_property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Change this helper to require the caller to pass the value as the second
parameter.  This prepares us to start reporting a lot more information
about a test run, not all of which are encoded as bash variables.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 common/report |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


diff --git a/common/report b/common/report
index b415a2641d..642e0426a6 100644
--- a/common/report
+++ b/common/report
@@ -24,9 +24,9 @@ encode_xml()
 _xunit_add_property()
 {
 	local name="$1"
-	local value="${!name}"
+	local value="$2"
 
-	if [ ! -z "$value" ]; then
+	if [ -n "$value" ]; then
 		echo -e "\t\t<property name=\"$name\" value=\"$value\"/>"
 	fi
 }
@@ -67,7 +67,7 @@ ENDL
 	# Properties
 	echo -e "\t<properties>" >> $REPORT_DIR/result.xml
 	for p in "${REPORT_ENV_LIST[@]}"; do
-		_xunit_add_property "$p"
+		_xunit_add_property "$p" "${!p}"
 	done | sort >> $REPORT_DIR/result.xml
 	echo -e "\t</properties>" >> $REPORT_DIR/result.xml
 	if [ -f $report ]; then




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux