Merge lp:~patrick-crews/drizzle-automation/drizzle-automation-lcov17 into lp:drizzle-automation

Proposed by Patrick Crews
Status: Merged
Merged at revision: not available
Proposed branch: lp:~patrick-crews/drizzle-automation/drizzle-automation-lcov17
Merge into: lp:drizzle-automation
Diff against target: 22 lines (+11/-1)
1 file modified
drizzle/automation/lcov/run.py (+11/-1)
To merge this branch: bzr merge lp:~patrick-crews/drizzle-automation/drizzle-automation-lcov17
Reviewer Review Type Date Requested Status
Jay Pipes Approve
Review via email: mp+17423@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Patrick Crews (patrick-crews) wrote :

Added changes to drizzle/automation/lcov/run.py (starting ~line 280) that will add a flag to the genhtml call to add function-level coverage to the generated html reports. Will run as usual otherwise.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Sweet. Merging in now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'drizzle/automation/lcov/run.py'
--- drizzle/automation/lcov/run.py 2010-01-14 17:33:28 +0000
+++ drizzle/automation/lcov/run.py 2010-01-14 21:55:17 +0000
@@ -277,7 +277,17 @@
277 # Produce HTML coverage reports277 # Produce HTML coverage reports
278 logging.info("Producing LCOV HTML coverage reports.")278 logging.info("Producing LCOV HTML coverage reports.")
279279
280 (retcode, output)= commands.getstatusoutput("genhtml -o %s %s" % (output_dir, output_file))280 # Check lcov version. If it is >= 1.7, we want to have function-level coverage
281 # We do a quick check of the version number
282 # At the time of this code, lcov verno output is of the form: lcov: LCOV version 1.7
283 lcov_version = float(commands.getoutput("lcov --version").split()[-1])
284 if lcov_version >= 1.7:
285 function_string = "--function-coverage"
286 else:
287 function_string = ""
288 genhtml_cmd = "genhtml %s -o %s %s" %(function_string, output_dir, output_file)
289
290 (retcode, output)= commands.getstatusoutput(genhtml_cmd)
281 if not retcode == 0:291 if not retcode == 0:
282 logging.error("Failed to generate LCOV HTML coverage report. Got error %s after running %s" % (output, cmd))292 logging.error("Failed to generate LCOV HTML coverage report. Got error %s after running %s" % (output, cmd))
283 sys.exit(1)293 sys.exit(1)

Subscribers

People subscribed via source and target branches