summaryrefslogtreecommitdiffstats
path: root/tools/code_coverage
Commit message (Collapse)AuthorAgeFilesLines
* Fix code coverage for Windows.mad@google.com2010-08-032-8/+16
| | | | | | | | | BUG=0 TEST=Look at the code coverage dashboards... :-) Review URL: http://codereview.chromium.org/3077019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54844 0039d316-1c4b-4281-b951-d872f2087c98
* Restore previous dribbling-subprocess-output code for non-Windows.jrg@chromium.org2010-07-161-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | (Windows code adds buffering when used on POSIX adding uncomfortable delays in output). Windows code retained for use on Windows only. Add command line flag --dont-clear-coverage-data to facilitate tester use. Workflow: 1. compile for coverage 2. run chrome and do whatever 3. Run coverage script by hand; e.g. tools/code_coverage/coverage_posix.py --directory out/Debug --genhtml out/index.html --dont-clear-coverage-data The coverage_posix.py tool otherwise deletes all coverage data when it starts since it assumes it only wants coverage data generated by it's subprocesses. BUG=none TEST=coverage bots stay green; Anantha happier. Review URL: http://codereview.chromium.org/2870054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52713 0039d316-1c4b-4281-b951-d872f2087c98
* Solving an issue with subprocess.POpen on Windows.mad@google.com2010-07-091-18/+56
| | | | | | | | | | And also improving the coverage analysis speed by not generating useless xml, and also making that the timeout option is always of the right type and not cause exceptions later on. TEST=Run the coverage build. BUG=0 Review URL: http://codereview.chromium.org/2927001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51954 0039d316-1c4b-4281-b951-d872f2087c98
* Correct mcov execution cwd so it works from either makefiles (targetjrg@chromium.org2010-06-051-8/+26
| | | | | | | | | | | | | | coverage_run) or from buildbot. Kind of a hack but good enough for now. Make mcov path args into abs paths. Die with non-zero error code if coverage.info file not generated for clearer failure in buildbot. Review URL: http://codereview.chromium.org/2639005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48992 0039d316-1c4b-4281-b951-d872f2087c98
* chrome_tests.gypi: give better deps to make sure coverage_bundles.py ↵jrg@chromium.org2010-05-261-1/+1
| | | | | | | | | | generated more appropriately. coverage_posix.py: Properly catch syntax errors on eval'd files. Review URL: http://codereview.chromium.org/2259001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48246 0039d316-1c4b-4281-b951-d872f2087c98
* Fix process kill and "wait for death" on Windows.jrg@chromium.org2010-05-251-7/+8
| | | | | | | | http://build.chromium.org/buildbot/waterfall.fyi/builders/Win%20Coverage%20(dbg)/builds/3420/steps/Run%20Coverage%20Bundles/logs/stdio Review URL: http://codereview.chromium.org/2166007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48108 0039d316-1c4b-4281-b951-d872f2087c98
* Exclusion list for problematic tests.jrg@chromium.org2010-05-242-0/+73
| | | | | | Review URL: http://codereview.chromium.org/2154002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48091 0039d316-1c4b-4281-b951-d872f2087c98
* coverage: Ignore test failures and continue running other tests.thestig@chromium.org2010-05-241-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2083022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48073 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linux coverage directoryjrg@chromium.org2010-05-241-1/+1
| | | | | | Review URL: http://codereview.chromium.org/2174001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48060 0039d316-1c4b-4281-b951-d872f2087c98
* Handle buildbot directory naming issues.jrg@chromium.org2010-05-212-21/+131
| | | | | | | | | | Actually use our timeout code for running the unit tests (more reliable killing of children), and make the timeout smaller. Review URL: http://codereview.chromium.org/2084016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47930 0039d316-1c4b-4281-b951-d872f2087c98
* Split coverage into build and run phases in preparation for splittingjrg@chromium.org2010-05-182-2/+87
| | | | | | | | | | | | | | it into 2 distinct buildbot phases. Add changes to reduce size or increase speed of coverage builds. Add 'bundle files' mechanism to process_coverage.py to make the above split easier. Add unit test for said mechanism. TEST=build coverage on 10.6 and watch it work. Review URL: http://codereview.chromium.org/2121003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47496 0039d316-1c4b-4281-b951-d872f2087c98
* Kill subprocesses (e.g. unit tests) which appear to be hanging. Use ajrg@chromium.org2010-05-062-7/+210
| | | | | | | | | | | | | | | | | | | mechanism similar to buildbot (e.g. give up if no output from a subprocess within a few minutes). When SIGTERMed (e.g. by buildbot), make an effort to SIGTERM any running subprocess. Should make the coverage bots more resiliant against getting "stuck" (e.g. the "clean" stage won't fail because a running process prevents a directory from being empty). Added some unit tests for the coverage script. BUG=None TEST=Run the coverage script. Review URL: http://codereview.chromium.org/1957004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46538 0039d316-1c4b-4281-b951-d872f2087c98
* Hierarchy. Hierarchy. Hierarchy!!!avi@chromium.org2010-04-091-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1561020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44107 0039d316-1c4b-4281-b951-d872f2087c98
* New failure:jrg@chromium.org2010-02-261-1/+2
| | | | | | | | | | http://build.chromium.org/buildbot/waterfall.fyi/builders/Win%20Coverage%20(dbg)/builds/1517/steps/compile/logs/stdio Looks like .o's added in which need to be ignored. Review URL: http://codereview.chromium.org/661210 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40171 0039d316-1c4b-4281-b951-d872f2087c98
* Add resilience in croc to a failed build (e.g. 0 stats generated).jrg@chromium.org2010-02-262-0/+37
| | | | | | | | Makes a failure case suck less. Review URL: http://codereview.chromium.org/660142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40138 0039d316-1c4b-4281-b951-d872f2087c98
* coverage_posix.py: use proper root directory for Linux now thatjrg@chromium.org2009-12-311-4/+19
| | | | | | | | | | | compile paths are not absolute. genhtml: be more tolerant of "source file" names like "effective_tld_names_unittest2.gperf". Review URL: http://codereview.chromium.org/523031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35410 0039d316-1c4b-4281-b951-d872f2087c98
* Use Xvfb when running the tests.jrg@chromium.org2009-12-291-0/+63
| | | | | | | | | | | | | | Normal buildbot-run tests that need an X display connection (e.g. ui_tests) are executed by RunPythonCommandInBuildDir() from scripts/slave/slave_utils.py which takes care of this. However, we are currently running coverage_posix.py from within a build command which itself is not run a s a "python command in build dir". Thus, no Xvfb. TODO(jrg): transition coverage generation to a distinct buildbot step. Review URL: http://codereview.chromium.org/524007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35357 0039d316-1c4b-4281-b951-d872f2087c98
* Do not make test failures fatal (since it is so common.)jrg@chromium.org2009-12-291-2/+3
| | | | | | Review URL: http://codereview.chromium.org/522021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35348 0039d316-1c4b-4281-b951-d872f2087c98
* Current status:jrg@chromium.org2009-12-171-3/+10
| | | | | | | | | | | http://build.chromium.org/buildbot/waterfall.fyi/builders/XP%20Coverage%20%28dbg%29/builds/234/steps/compile/logs/stdio Compiles look fine, and processing looks fine, but when running the test the binary isn't found? Add more logging info to get better data. Review URL: http://codereview.chromium.org/504037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34800 0039d316-1c4b-4281-b951-d872f2087c98
* Now that we append to this file instead of clobbering it each timejrg@chromium.org2009-12-071-9/+8
| | | | | | | | | (since tests are run one at a time) we need to delete it before we begin on Windows. Review URL: http://codereview.chromium.org/460129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34019 0039d316-1c4b-4281-b951-d872f2087c98
* Modify windows code coverage pattern to dump info once per test andjrg@chromium.org2009-12-051-22/+34
| | | | | | | | concatenate instead of trying to collect all at once to avoid OOM problems. Review URL: http://codereview.chromium.org/460095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33916 0039d316-1c4b-4281-b951-d872f2087c98
* Turn off exclusions for windows coveragejrg@chromium.org2009-12-031-2/+4
| | | | | | Review URL: http://codereview.chromium.org/455040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33655 0039d316-1c4b-4281-b951-d872f2087c98
* Add hard-coded win paths so bb happy.jrg@chromium.org2009-12-031-0/+4
| | | | | | Review URL: http://codereview.chromium.org/465020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33651 0039d316-1c4b-4281-b951-d872f2087c98
* Fix coverage on the Mac.jrg@chromium.org2009-10-231-9/+32
| | | | | | | | Add extra unit test bundles (all platforms). Review URL: http://codereview.chromium.org/307032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29845 0039d316-1c4b-4281-b951-d872f2087c98
* Beginning of code coverage on Windows.jrg@chromium.org2009-07-071-23/+153
| | | | | | Review URL: http://codereview.chromium.org/155123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20045 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Linux code coverage.jrg@chromium.org2009-06-222-11/+4
| | | | | | Review URL: http://codereview.chromium.org/141016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18921 0039d316-1c4b-4281-b951-d872f2087c98
* Trying to re-land r17758 (http://codereview.chromium.org/118247) but with ↵kuchhal@chromium.org2009-06-091-3/+2
| | | | | | | | | | name installer_util_unittests instead of util_unittests. BUG=12849 Review URL: http://codereview.chromium.org/119322 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17916 0039d316-1c4b-4281-b951-d872f2087c98
* Add unit_tests (Chrome browser unit tests) to Mac/Linux coverage.jrg@chromium.org2009-06-051-24/+77
| | | | | | | | Minor fixes to coverage related scripts. Review URL: http://codereview.chromium.org/118298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17785 0039d316-1c4b-4281-b951-d872f2087c98
* Add example .croc file.rspangler@google.com2009-06-051-0/+222
| | | | | | Review URL: http://codereview.chromium.org/119209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17776 0039d316-1c4b-4281-b951-d872f2087c98
* Forgot the CSS file.rspangler@google.com2009-05-291-0/+124
| | | | | | Review URL: http://codereview.chromium.org/118034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17249 0039d316-1c4b-4281-b951-d872f2087c98
* Major refactoring of Croc.rspangler@google.com2009-05-295-220/+1215
| | | | | | | | | | | | Add support for scanning missing source files for executable lines. Add support for HTML output. Now reports percent coverage. BUG=none TEST=by hand on experimental buildbot Review URL: http://codereview.chromium.org/113980 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17141 0039d316-1c4b-4281-b951-d872f2087c98
* Add croc code coverage tool. (Same change as yesterday, but now made in therspangler@google.com2009-05-132-0/+1363
| | | | | | | | writable repository) Review URL: http://codereview.chromium.org/113346 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15974 0039d316-1c4b-4281-b951-d872f2087c98
* Code coverage improvements.jrg@chromium.org2009-04-301-11/+60
| | | | | | | | | | Code coverage now works for Linux. Unit tests to run passed from project to coverage_posix.py so deps are correct. Review URL: http://codereview.chromium.org/100189 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15016 0039d316-1c4b-4281-b951-d872f2087c98
* Minor tweaks to make coverage happier on OSX.jrg@chromium.org2009-04-161-14/+22
| | | | | | | | | See 1st post at (XXX internal URL removed XXX) Code coverage for base: 85% (!!!) Review URL: http://codereview.chromium.org/67235 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13880 0039d316-1c4b-4281-b951-d872f2087c98
* Start of code coverage for Mac.jrg@chromium.org2009-04-031-0/+120
| | | | | | | | | | | | | Only base_unittests included for now. Linux changes added as well but untested until Linux switches to gyp. Enable coverage with the following command: src/tools/gyp/gyp_dogfood -Dcoverage=1 src/build/all.gyp Review URL: http://codereview.chromium.org/56136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13068 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-052-47/+47
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a small bug with variable names.niranjan@google.com2008-11-201-2/+3
| | | | | | | | TBR=patrick@chromium.org Review URL: http://codereview.chromium.org/11530 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5776 0039d316-1c4b-4281-b951-d872f2087c98
* Added flags to the coverage script so that this can run locally and ↵niranjan@google.com2008-11-201-38/+62
| | | | | | | | developers can use the .coverage files inside their Visual Studio Team Tools. Also misc bug fixes. Review URL: http://codereview.chromium.org/11497 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5737 0039d316-1c4b-4281-b951-d872f2087c98
* Adding section to parse the lcov data and post the newace@chromium.org2008-10-301-2/+179
| | | | | | | coverage dataset to the code coverage dashboard. Review URL: http://codereview.chromium.org/8693 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4253 0039d316-1c4b-4281-b951-d872f2087c98
* Added CSV format output for process_coverage.py which will be used by the ↵niranjan@google.com2008-10-241-14/+42
| | | | | | | | code coverage dashboard to show a more accurate count of the actual code coverage. Also fixed a couple of bugs with this script. Review URL: http://codereview.chromium.org/7983 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3941 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a crash in the coverage script.niranjan@google.com2008-10-241-59/+99
| | | | | | | | The .coverage -> lcov converter tool ended up crashing the coverage script as it ran out of memory while processing a huge file (it threw an .Net 'Out of Memory' exception). I have now changed it to generate smaller intermediate LCOV files (one per test binary) and then consolidate them all into one large LCOV file. Review URL: http://codereview.chromium.org/8157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3938 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bugs with coverage.pyniranjan@google.com2008-10-171-39/+76
| | | | | | | | Fixed bugs with coverage.py and added the list of binaries to be instrumented and the tests to be run. Review URL: http://codereview.chromium.org/7469 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3537 0039d316-1c4b-4281-b951-d872f2087c98
* Wow, it's been a while since we cleaned EOL.maruel@google.com2008-09-252-502/+502
| | | | | | | | | | | | Ran dos2unix on *.cc, *.h, *.py and SCons*.* Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\*.cc Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\*.h Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\*.py Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\SCons*.* git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2611 0039d316-1c4b-4281-b951-d872f2087c98
* Moved over the test running part over to coverage.py and addressed comments ↵niranjan@google.com2008-09-181-10/+92
| | | | | | | | as per revision number 2823. Review URL: http://codereview.chromium.org/3139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2391 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed the case where VSPerfCmd was blocking rest of the script to proceed ↵niranjan@google.com2008-08-261-18/+34
| | | | | | and a few other minor fixes. Also added logging. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1410 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Initial check-in for the Coverage class. This checkin includes methods to ↵niranjan@google.com2008-08-141-0/+195
| | | | | | | | setup and teardown all that is needed measuring code coverage (instrumenting binaries, starting/stopping counters, etc). Next step is to modify the test runners to make use of this class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@909 0039d316-1c4b-4281-b951-d872f2087c98
* Initial checkin for the code coverage dashboard script.niranjan@google.com2008-08-121-0/+233
Script to process the code coverage data once the lcov files have been uploaded on the server. This will 'clean' the lcov file (Windows only) and then run genhtml to produce the HTML version of the code coverage at the dashboard. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@745 0039d316-1c4b-4281-b951-d872f2087c98