summaryrefslogtreecommitdiff
path: root/src/ChezScheme/mats/mat.ss
diff options
context:
space:
mode:
Diffstat (limited to 'src/ChezScheme/mats/mat.ss')
-rw-r--r--src/ChezScheme/mats/mat.ss29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/ChezScheme/mats/mat.ss b/src/ChezScheme/mats/mat.ss
index 8c660d2a75..73c6bd0238 100644
--- a/src/ChezScheme/mats/mat.ss
+++ b/src/ChezScheme/mats/mat.ss
@@ -230,19 +230,22 @@
(lambda (mat)
(unless (string? mat)
(errorf 'mat-file "~s is not a string" mat))
- (let ([ifn (format "~a.ms" mat)] [ofn (format "~a/~a.mo" dir mat)])
- (printf "matting ~a with output to ~a~%" ifn ofn)
- (delete-file ofn #f)
- (parameterize ([mat-output (open-output-file ofn)])
- (dynamic-wind
- (lambda () #f)
- (lambda ()
- (let ([go (lambda () (mat-load ifn))] [universe-ct (coverage-table)])
- (if universe-ct
- (let-values ([(ct . ignore) (with-profile-tracker go)])
- (store-coverage universe-ct ct (format "~a/~a.covout" dir mat)))
- (go))))
- (lambda () (close-output-port (mat-output)))))))))
+ (let ([ifn (format "~a.ms" mat)] [ofn (format "~a.mo" mat)])
+ (parameterize ([current-directory dir]
+ [source-directories (cons ".." (source-directories))]
+ [library-directories (cons ".." (library-directories))])
+ (printf "matting ~a with output to ~a/~a~%" ifn dir ofn)
+ (delete-file ofn #f)
+ (parameterize ([mat-output (open-output-file ofn)])
+ (dynamic-wind
+ (lambda () #f)
+ (lambda ()
+ (let ([go (lambda () (mat-load ifn))] [universe-ct (coverage-table)])
+ (if universe-ct
+ (let-values ([(ct . ignore) (with-profile-tracker go)])
+ (store-coverage universe-ct ct (format "~a.covout" mat)))
+ (go))))
+ (lambda () (close-output-port (mat-output))))))))))
(set! record-run-coverage
(lambda (covout th)