]> git.mdlowis.com Git - projs/libcds.git/commitdiff
split coverage analysis into a separate rake task
authora bellenir <a@bellenir.com>
Tue, 2 Sep 2014 19:40:30 +0000 (19:40 +0000)
committera bellenir <a@bellenir.com>
Tue, 2 Sep 2014 19:40:30 +0000 (19:40 +0000)
Rakefile

index c62d83073a3749e2ced4277b7f256dcb475096da..cce88991a2a1cb9cf1e1dd16bab5a7136754ef8e 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -52,12 +52,15 @@ task :test do
     TestEnv.Program('build/test_libcds', Dir['source/**/*.c', 'tests/**/*.c'])
     TestEnv.process
     sh "build/test_libcds"
+end
+
+desc "Generate test coverage reports"
+task :coverage => [:test] do
     FileList['build/obj/test_source/**/*.gcno'].each do |gcno|
         obj  = gcno.ext('o')
         path = File.dirname(obj)
         gcov = File.basename(obj).ext('c.gcov')
-        sh *['gcov', '-abc', obj]
-        FileUtils.mv("./#{gcov}","#{path}/#{gcov}")
+        sh *['gcov', '-abc', obj] and FileUtils.mv("./#{gcov}","#{path}/#{gcov}")
     end
 end