]> granicus.if.org Git - check/commitdiff
test_xml_output: do not use -n with echo
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 31 Dec 2013 20:39:33 +0000 (20:39 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 31 Dec 2013 20:39:33 +0000 (20:39 +0000)
On some systems (e.g. OSX) a script will use the built-in version
of echo, which does not support arguments. Instead of getting no
newline, instead there is an extra "-n" in the output.

Without the -n, everything works as expected.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@982 64e312b2-a51f-0410-8e61-82d0ca0eb02a

tests/test_xml_output.sh

index 766c9770ba896a31bd7c5d83c4853837122db082..bae4b87630b467b90cb015adcbedf27544e93b5f 100755 (executable)
@@ -162,7 +162,7 @@ if [ x"${expected_duration_count}" != x"${actual_duration_count}" ]; then
 fi
 
 for duration in `grep "\<duration\>" ${OUTPUT_FILE} | cut -d ">" -f 2 | cut -d "<" -f 1`; do
-int_duration=`echo -n $duration | cut -d "." -f 1`
+int_duration=`echo $duration | cut -d "." -f 1`
 if [ "${int_duration}" -ne "-1" ] && [ "${int_duration}" -gt "${CK_DEFAULT_TIMEOUT}" ]; then
     echo "Problem with duration ${duration}; is not valid. Should be -1 or in [0, ${CK_DEFAULT_TIMEOUT}]"
     exit 1