Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: third_party/pexpect/tools/teamcity-coverage-report.sh

Issue 1398903002: Add third_party/pexpect (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@end-to-end-test
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/bin/bash
2 # This is to be executed by each individual OS test. It only
3 # combines coverage files and reports locally to the given
4 # TeamCity build configuration.
5 set -e
6 set -o pipefail
7 [ -z ${TEMP} ] && TEMP=/tmp
8
9 # combine all .coverage* files,
10 coverage combine
11
12 # create ascii report,
13 report_file=$(mktemp $TEMP/coverage.XXXXX)
14 coverage report --rcfile=`dirname $0`/../.coveragerc > "${report_file}" 2>/dev/n ull
15
16 # Report Code Coverage for TeamCity, using 'Service Messages',
17 # https://confluence.jetbrains.com/display/TCD8/How+To...#HowTo...-Importcoverag eresultsinTeamCity
18 # https://confluence.jetbrains.com/display/TCD8/Custom+Chart#CustomChart-Default StatisticsValuesProvidedbyTeamCity
19 total_no_lines=$(awk '/TOTAL/{printf("%s",$2)}' < "${report_file}")
20 total_no_misses=$(awk '/TOTAL/{printf("%s",$3)}' < "${report_file}")
21 total_no_covered=$((${total_no_lines} - ${total_no_misses}))
22 echo "##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='""${tota l_no_lines}""']"
23 echo "##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='""${to tal_no_covered}""']"
24
25 # Display for human consumption and remove ascii file.
26 cat "${report_file}"
27 rm "${report_file}"
OLDNEW
« no previous file with comments | « third_party/pexpect/tools/display-terminalinfo.py ('k') | third_party/pexpect/tools/teamcity-runtests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698