cvm coverage files not getting updated for coverage enabled swc

13 views
Skip to first unread message

Dman

unread,
Aug 19, 2010, 4:25:57 PM8/19/10
to Flexcover Discussion Group
When I run coverage enabled swc files via another swf (with the swc
"merged into code"), the coverage data in the cvm file is not getting
updated. Is there something additional I need to do to get coverage
results updated?

Thanks.

Clint Modien

unread,
Aug 19, 2010, 4:46:34 PM8/19/10
to flexcover-...@googlegroups.com, Flexcover Discussion Group
how are you invoking the compiler?

Sent from my iPhone

> --
> You received this message because you are subscribed to the Google Groups "Flexcover Discussion Group" group.
> To post to this group, send email to flexcover-...@googlegroups.com.
> To unsubscribe from this group, send email to flexcover-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/flexcover-discussion?hl=en.
>

Dman

unread,
Aug 19, 2010, 4:55:35 PM8/19/10
to Flexcover Discussion Group
I'm able to build the coverage enabled swc just fine. When I do this
it outputs a swc and cvm file (with the same name) as expected.
However, when I include this swc in a swf and then run the swf, I
don't get any coverage data. I'm not coverage enabling the swf, I'm
just building it as normal in Flash Builder 4, except for including
the coverage enabled swc.

Clint Modien

unread,
Aug 19, 2010, 5:10:45 PM8/19/10
to flexcover-...@googlegroups.com
Can you set coverage=true for the swf you're compiling?

Also... flash builder does incremental compiles.  The cvm file it emits on an incremental compile will only contain a subset of all the classes in the project.

Dman

unread,
Aug 19, 2010, 6:16:58 PM8/19/10
to Flexcover Discussion Group
If I enable coverage of the swf, then I get coverage results just for
the swf, but not for the swc.

-Demian

Clint Modien

unread,
Aug 19, 2010, 7:38:14 PM8/19/10
to flexcover-...@googlegroups.com
Try removing the swc from your project... and then linking in the source code to the swc into your project instead of compiling in the swc.

Dman

unread,
Aug 19, 2010, 7:52:14 PM8/19/10
to Flexcover Discussion Group
It would be nice to understand what the problem is, but this sounds
like a good workaround. If I don't get any direct solutions, I'll
look into this - (I hesitate because it requires some re-structuring
of a multi-step ant build config).
Thanks for the help.

joseph.b...@gmail.com

unread,
Aug 19, 2010, 7:57:50 PM8/19/10
to flexcover-...@googlegroups.com
Jumping in -- have you enabled coverage when compiling both swc and swf, and loaded both cvm files into the reporter?

...J
... . . . joe

Dman

unread,
Aug 19, 2010, 8:46:32 PM8/19/10
to Flexcover Discussion Group
If the cvm file is created at compile time, doesn't that mean that
coverage is enabled?
I've loaded both cvm files (separately). I get coverage results for
the swf, but not for the swc (that's compiled into the swf).

The swf is built in FB4. The swc is built via an ant build script.
Besides modifying the Flex SDK, is there a compiler parameter that
needs to be set in my ant build script?

Thanks.

joseph.b...@gmail.com

unread,
Aug 19, 2010, 9:20:21 PM8/19/10
to flexcover-...@googlegroups.com
You need to set compc's coverage compilation option to true to enable coverage, even if you're using the modified Flex SDK otherwise the code won't be instrumented (even if the .cvm file gets written out). The switch is required so that you don't have to flip between SDKs just to turn coverage on and off.

This can be done either with the coverage switch on the command line or in a flex-config.xml file.

Dman

unread,
Aug 19, 2010, 9:45:51 PM8/19/10
to Flexcover Discussion Group
Well, that sounds just too obvious :). I've kicked off a build and
should know if this does the trick in the morning.

Thanks for the help.

Dman

unread,
Aug 20, 2010, 6:06:11 PM8/20/10
to Flexcover Discussion Group
Adding the coverage switch in the build script did the trick. Thanks
again for your help.
Reply all
Reply to author
Forward
0 new messages