Closed Bug 363828 Opened 18 years ago Closed 17 years ago

Code coverage.

Categories

(NSS :: Test, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.11.8

People

(Reporter: slavomir.katuscak+mozilla, Assigned: slavomir.katuscak+mozilla)

Details

Attachments

(1 file)

Need to implement code coverage of NSS tests.
If I want to measure coverage with TCOV tool, I need to compile code with -xprofile=tcov parameter. 

I haven't found any variable where I can set this parameter globally, so I use workaround from this patch where I added it to CC variable. I don't think this is the best way, but this is only way which works for me now. 

Is there any configuration file/variable where I can set this parameter and have all files compiled with it ? What should I modify to have the same for NSPR code ?
Slavo,

I thought we had other build options for Purify, but I didn't find anything either in coreconf. Your patch is correct and fine with me.
Comment on attachment 260451 [details] [diff] [review]
Adding -xprofile=tcov parameter.

Slavo, if you add -xprofile=tcov to OS_CFLAGS instead,
does it still work?
Wan-Teh, this is what I tried first, but it didn't work. After adding to CC it's OK. 
Comment on attachment 260451 [details] [diff] [review]
Adding -xprofile=tcov parameter.

I have already finished scripts to test code coverage (it's on Sun CVS server, because there are many Sun specific paths and settings), so I would like to close this bug.

There is no more progress, so please review this patch as + if you are OK with it or help me to find better solution. Thanks.
Attachment #260451 - Flags: superreview?(julien.pierre.boogz)
Attachment #260451 - Flags: review?(wtc)
Comment on attachment 260451 [details] [diff] [review]
Adding -xprofile=tcov parameter.

r=wtc.

If the C++ compiler supports this flag, it would be nice
to add this to the CCC variable, too.
Attachment #260451 - Flags: review?(wtc) → review+
Attachment #260451 - Flags: superreview?(julien.pierre.boogz) → superreview+
Trunk:
Checking in SunOS5.mk;
/cvsroot/mozilla/security/coreconf/SunOS5.mk,v  <--  SunOS5.mk
new revision: 1.24; previous revision: 1.23
done

Branch:
Checking in SunOS5.mk;
/cvsroot/mozilla/security/coreconf/SunOS5.mk,v  <--  SunOS5.mk
new revision: 1.21.2.3; previous revision: 1.21.2.2
done

To comment #6:
C++ supports this flag, added also to CCC.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.11.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: