]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/coverage.py
scheme coverage generation fixes.
[lilypond.git] / buildscripts / coverage.py
index a06a943d14feb91c8e6c2eb0b263b9b345c0c4d9..0b3b2b7aafa1f431ed8112dccfa95936c35cd728 100644 (file)
@@ -75,10 +75,14 @@ class Chunk:
 class SchemeChunk (Chunk):
     def uncovered_score (self):
         text = self.text ()
-        if (text.startswith  ('(define')
+        if (text.startswith  ('(define ')
             and not text.startswith ('(define (')):
             return 0
 
+        if (text.startswith  ('(define-public ')
+            and not text.startswith ('(define-public (')):
+            return 0
+
         return len ([l for (c,n,l) in self.lines() if (c == 0)]) 
 
 def read_gcov (f):
@@ -140,7 +144,7 @@ def get_scm_chunks (ls, file):
         
     last_c = -1
     for (cov_count, line_number, line) in ls:
-        if line.startswith ('(define'):
+        if line.startswith ('('):
             new_chunk ()
             last_c = -1