summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2014-11-24 17:18:08 -0800
committerJeff Quast <contact@jeffquast.com>2014-11-24 17:18:08 -0800
commit667dd5a66faac11ab90399d76992223c0fb96937 (patch)
treea9fae042301d391e15bf345c3ae39dffe384ed14
parent70cc564c8fb7213cd928ccc1d75b50225d55d202 (diff)
downloadpexpect-667dd5a66faac11ab90399d76992223c0fb96937.tar.gz
Fix TeamCity Service Message quoting
-rwxr-xr-xtools/teamcity-coverage-report.sh8
1 files 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='<CodeCoverageAbsLTotal>' value='<${total_no_lines}>']"
-echo "##teamcity[buildStatisticValue key='<CodeCoverageAbsLCovered>' value='<${total_no_covered}>']"
+echo "##teamcity[buildStatisticValue key='<CodeCoverageAbsLTotal>' value='""<${total_no_lines}"">']"
+echo "##teamcity[buildStatisticValue key='<CodeCoverageAbsLCovered>' value='""<${total_no_covered}""'>']"
# Display for human consumption and remove ascii file.
cat "${report_file}"