Bug 117648

Summary: coverage data to json script
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: commit-queue, dpranke, glenn, slewis
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from APPLE-EWS-3 for win-future
none
Patch none

Description Alex Christensen 2013-06-14 12:00:58 PDT
I'm working on a coverage analysis tool which outputs 6MB of json data from 37MB of xml data for processing and eventually html reporting.
Comment 1 Alex Christensen 2013-06-14 12:04:47 PDT
Created attachment 204726 [details]
Patch
Comment 2 Stephanie Lewis 2013-06-17 14:57:50 PDT
Comment on attachment 204726 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=204726&action=review

A few minor comments, otherwise it looks good. Clean up the style a little and then r=me

> Tools/ChangeLog:7
> +

You should add a blurb about what the project is and what piece this is

> Tools/Scripts/generate-coverage-data:71
> +

spaces between concatenation operators

Usually add an error message after die.

i.e.
or die "Cannot open $file";

> Tools/Scripts/generate-coverage-data:73
> +open my $jsonFile, ">", "WebKitBuild/Coverage/".$resultName.".json" or die "error opening json file";

spaces

> Tools/Scripts/generate-coverage-data:74
> +print $jsonFile encode_json(parseGcovrOutput("WebKitBuild/Coverage/".$resultName.".xml"));

spaces

> Tools/Scripts/generate-coverage-data:89
> +    foreach my $packageName (keys %$packages) {

nit, I think this is usually written %{$packages}

> Tools/Scripts/generate-coverage-data:92
> +        # Perl's XML::Simple causes files to be here if there's only one child even though they're a layer deeper in the xml tree

Files to be where?  This comment confused me.

> Tools/Scripts/generate-coverage-data:153
> +        $line->{"condition-coverage"} =~ /\((.*)\/(.*)\)/;

should add a comment saying what this regex is looking for.

> Tools/Scripts/generate-coverage-data:156
> +        push(@$branchLines,int($line->{"number"}));

spaces between parameters
Comment 3 Alex Christensen 2013-06-17 15:44:55 PDT
Created attachment 204862 [details]
Patch
Comment 4 Build Bot 2013-06-17 21:49:45 PDT
Comment on attachment 204862 [details]
Patch

Attachment 204862 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/865284

New failing tests:
media/video-frame-accurate-seek.html
Comment 5 Build Bot 2013-06-17 21:49:48 PDT
Created attachment 204880 [details]
Archive of layout-test-results from APPLE-EWS-3 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: APPLE-EWS-3  Port: win-future  Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Comment 6 Alex Christensen 2013-06-18 16:48:30 PDT
Created attachment 204953 [details]
Patch
Comment 7 WebKit Commit Bot 2013-06-18 18:13:10 PDT
Comment on attachment 204953 [details]
Patch

Clearing flags on attachment: 204953

Committed r151711: <http://trac.webkit.org/changeset/151711>
Comment 8 WebKit Commit Bot 2013-06-18 18:13:12 PDT
All reviewed patches have been landed.  Closing bug.