From 667dd5a66faac11ab90399d76992223c0fb96937 Mon Sep 17 00:00:00 2001 From: Jeff Quast Date: Mon, 24 Nov 2014 17:18:08 -0800 Subject: Fix TeamCity Service Message quoting --- tools/teamcity-coverage-report.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/teamcity-coverage-report.sh b/tools/teamcity-coverage-report.sh index 5610202..830a182 100755 --- a/tools/teamcity-coverage-report.sh +++ b/tools/teamcity-coverage-report.sh @@ -16,11 +16,11 @@ coverage report --rcfile=`dirname $0`/../.coveragerc > "${report_file}" 2>/dev/n # Report Code Coverage for TeamCity, using 'Service Messages', # https://confluence.jetbrains.com/display/TCD8/How+To...#HowTo...-ImportcoverageresultsinTeamCity # https://confluence.jetbrains.com/display/TCD8/Custom+Chart#CustomChart-DefaultStatisticsValuesProvidedbyTeamCity -total_no_lines=$(awk '/TOTAL/{print $2}') -total_no_misses=$(awk '/TOTAL/{print $3}') +total_no_lines=$(awk '/TOTAL/{printf("%s",$2)}') +total_no_misses=$(awk '/TOTAL/{printf("%s",$3)}') total_no_covered=$((${total_no_lines} - ${total_no_misses})) -echo "##teamcity[buildStatisticValue key='' value='<${total_no_lines}>']" -echo "##teamcity[buildStatisticValue key='' value='<${total_no_covered}>']" +echo "##teamcity[buildStatisticValue key='' value='""<${total_no_lines}"">']" +echo "##teamcity[buildStatisticValue key='' value='""<${total_no_covered}""'>']" # Display for human consumption and remove ascii file. cat "${report_file}" -- cgit v1.2.1