generate_xml.sh: Replace < and > in error message
Replace < with < and > with > in ERRS to not broke created xml. Signed-off-by: stefan.raus <stefan.raus@analog.com>main
parent
bcf5abb2fe
commit
3c07861ee8
|
@ -26,6 +26,8 @@ echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $xmlFile
|
||||||
echo -e "<testsuite>" >> $xmlFile
|
echo -e "<testsuite>" >> $xmlFile
|
||||||
echo -e "\t<testcase name=\"${NAME}\" time=\"${DURATION}\" classname=\"component_tb\">" >> $xmlFile
|
echo -e "\t<testcase name=\"${NAME}\" time=\"${DURATION}\" classname=\"component_tb\">" >> $xmlFile
|
||||||
if [[ "$ERRS" ]]; then
|
if [[ "$ERRS" ]]; then
|
||||||
|
#replace < with < and > with > in ERRS to not broke created xml
|
||||||
|
ERRS=$(echo $ERRS | sed 's/</</g' | sed 's/>/>/g')
|
||||||
echo -e "\t\t<failure>\n\"$ERRS\"\n\t\t</failure>" >> $xmlFile
|
echo -e "\t\t<failure>\n\"$ERRS\"\n\t\t</failure>" >> $xmlFile
|
||||||
elif [[ "$SUCCESS" ]]; then
|
elif [[ "$SUCCESS" ]]; then
|
||||||
echo -e "\t\t<passed/>" >> $xmlFile
|
echo -e "\t\t<passed/>" >> $xmlFile
|
||||||
|
|
Loading…
Reference in New Issue