mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[tests] modify load-path to find the parent directory
Find the parent directory programmatically.
This commit is contained in:
committed by
John Ralls
parent
d12ee9a4fc
commit
5c8af37901
@@ -26,7 +26,9 @@
|
||||
(run-test-proper)))
|
||||
|
||||
(define (coverage-test tester)
|
||||
(add-to-load-path "/home/chris/sources/gnucash/gnucash/report/business-reports")
|
||||
(let* ((currfile (dirname (current-filename)))
|
||||
(path (string-take currfile (string-rindex currfile #\/))))
|
||||
(add-to-load-path path))
|
||||
(call-with-values
|
||||
(lambda()
|
||||
(with-code-coverage tester))
|
||||
|
||||
@@ -50,11 +50,12 @@
|
||||
(run-test-proper)))
|
||||
|
||||
(define (coverage-test)
|
||||
(define %test-vm (make-vm))
|
||||
(add-to-load-path "/home/chris/sources/gnucash/gnucash/report/standard-reports")
|
||||
(let* ((currfile (dirname (current-filename)))
|
||||
(path (string-take currfile (string-rindex currfile #\/))))
|
||||
(add-to-load-path path))
|
||||
(call-with-values
|
||||
(lambda()
|
||||
(with-code-coverage %test-vm run-test-proper))
|
||||
(with-code-coverage run-test-proper))
|
||||
(lambda (data result)
|
||||
(let ((port (open-output-file "/tmp/lcov.info")))
|
||||
(coverage-data->lcov data port)
|
||||
|
||||
Reference in New Issue
Block a user