]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Merge with master
[lilypond.git] / scm / lily.scm
index e98897fca850ecb62ae1d66f9757de634c61843b..bc4a48f7a9c0bd9a2e55219fe9396370d8da012f 100644 (file)
@@ -71,6 +71,7 @@ on errors, and print a stack trace.")
              (strict-infinity-checking #f "If yes, crash on encountering Inf/NaN.")
              (separate-log-files #f "Output to FILE.log per file.")
              (trace-memory-frequency #f "Record Scheme cell usage this many times per second, and dump to file.")
+             (trace-scheme-coverage #f "Record coverage of Scheme files") 
              (ttf-verbosity 0
                             "how much verbosity for TTF font embedding?")
              (show-available-fonts #f
@@ -108,6 +109,7 @@ on errors, and print a stack trace.")
             (srfi srfi-14)
             (scm clip-region)
             (scm memory-trace)
+            (scm coverage)
             )
 
 ;; my display
@@ -122,13 +124,20 @@ on errors, and print a stack trace.")
 ;;; debugging evaluator is slower.  This should
 ;;; have a more sensible default.
 
-(if (ly:get-option 'verbose)
+(if (or (ly:get-option 'verbose)
+       (ly:get-option 'trace-memory-frequencency)
+       (ly:get-option 'trace-scheme-coverage)
+       )
     (begin
       (ly:set-option 'protected-scheme-parsing #f)
       (debug-enable 'debug)
       (debug-enable 'backtrace)
       (read-enable 'positions)))
 
+
+(if (ly:get-option 'trace-scheme-coverage)
+    (coverage:enable))
+
 (define-public tex-backend?
   (member (ly:output-backend) '("texstr" "tex")))
 
@@ -617,6 +626,12 @@ The syntax is the same as `define*-public'."
 
   
   (let ((failed (lilypond-all files)))
+    (if (ly:get-option 'trace-scheme-coverage)
+       (begin
+         (coverage:show-all (lambda (f) (string-contains f "lilypond"))
+                            )))
+         
+    
     (if (pair? failed)
        (begin
          (ly:error (_ "failed files: ~S") (string-join failed))