From c4c3f5585651bcdb46041f814f1dc15a591bd753 Mon Sep 17 00:00:00 2001 From: Jeff Quast Date: Mon, 24 Nov 2014 17:22:39 -0800 Subject: Fix awk: redirect in coverage_file --- tools/teamcity-coverage-report.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/teamcity-coverage-report.sh b/tools/teamcity-coverage-report.sh index 830a182..7a9840d 100755 --- a/tools/teamcity-coverage-report.sh +++ b/tools/teamcity-coverage-report.sh @@ -16,8 +16,8 @@ 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/{printf("%s",$2)}') -total_no_misses=$(awk '/TOTAL/{printf("%s",$3)}') +total_no_lines=$(awk '/TOTAL/{printf("%s",$2)}' < "${report_file}") +total_no_misses=$(awk '/TOTAL/{printf("%s",$3)}' < "${report_file}") 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}""'>']" -- cgit v1.2.1