summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorJon Cairns <jon@joncairns.com>2015-09-10 14:24:25 +0100
committerJon Cairns <jon@joncairns.com>2015-09-10 14:24:25 +0100
commitcb474f13a8bd24dd3fed4bcb2626f59b0910a751 (patch)
treeb3347961fa31ca89c5d0afa32cb6d1fd36338606 /Rakefile
parent74cf9c04364e72afcc24468ca0be95376a44eb3b (diff)
downloadvdebug-cb474f13a8bd24dd3fed4bcb2626f59b0910a751.zip
Add code coverage for python tests, add another unit test
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 23139ab..f1ad60c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -20,7 +20,12 @@ namespace :test do
desc "Run unit tests"
task :unit do
- cmd = "python vdebugtests.py"
+ if ENV["COVERAGE"]
+ puts "Running unit tests with coverage (view output at ./htmlcov/index.html)"
+ cmd = "coverage run vdebugtests.py && coverage html --include=\"*/vdebug/*\""
+ else
+ cmd = "python vdebugtests.py"
+ end
puts cmd
system cmd
end