diff --git a/gnucash/report/reports/standard/test/test-invoice.scm b/gnucash/report/reports/standard/test/test-invoice.scm index d7e04e3f876..ba9451506c8 100644 --- a/gnucash/report/reports/standard/test/test-invoice.scm +++ b/gnucash/report/reports/standard/test/test-invoice.scm @@ -10,8 +10,6 @@ (use-modules (tests srfi64-extras)) (use-modules (sxml simple)) (use-modules (sxml xpath)) -(use-modules (system vm coverage)) -(use-modules (system vm vm)) (define uuid-list (list (cons 'invoice "5123a759ceb9483abf2182d01c140e8d") @@ -21,23 +19,6 @@ (setlocale LC_ALL "C") (define (run-test) - (if #f - (coverage-test run-test-proper) - (run-test-proper))) - -(define (coverage-test tester) - (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)) - (lambda (data result) - (let ((port (open-output-file "/tmp/lcov.info"))) - (coverage-data->lcov data port) - (close port))))) - -(define (run-test-proper) (test-runner-factory gnc:test-runner) (test-begin "test-invoice.scm") (inv-tests 'invoice) diff --git a/gnucash/report/reports/standard/test/test-new-owner-report.scm b/gnucash/report/reports/standard/test/test-new-owner-report.scm index e0acfd97747..5a7d54172f8 100644 --- a/gnucash/report/reports/standard/test/test-new-owner-report.scm +++ b/gnucash/report/reports/standard/test/test-new-owner-report.scm @@ -12,31 +12,12 @@ (use-modules (tests srfi64-extras)) (use-modules (sxml simple)) (use-modules (sxml xpath)) -(use-modules (system vm coverage)) -(use-modules (system vm vm)) (define uuid "c146317be32e4948a561ec7fc89d15c1") (setlocale LC_ALL "C") (define (run-test) - (if #f - (coverage-test run-test-proper) - (run-test-proper))) - -(define (coverage-test tester) - (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)) - (lambda (data result) - (let ((port (open-output-file "/tmp/lcov.info"))) - (coverage-data->lcov data port) - (close port))))) - -(define (run-test-proper) (let ((saved-format (qof-date-format-get))) (qof-date-format-set QOF-DATE-FORMAT-ISO) (test-runner-factory gnc:test-runner) diff --git a/gnucash/report/reports/standard/test/test-owner-report.scm b/gnucash/report/reports/standard/test/test-owner-report.scm index 5ebd3f1be2c..005b022e82b 100644 --- a/gnucash/report/reports/standard/test/test-owner-report.scm +++ b/gnucash/report/reports/standard/test/test-owner-report.scm @@ -10,35 +10,16 @@ (use-modules (tests srfi64-extras)) (use-modules (sxml simple)) (use-modules (sxml xpath)) -(use-modules (system vm coverage)) -(use-modules (system vm vm)) (define uuid-list (list (cons 'customer-new "c146317be32e4948a561ec7fc89d15c1"))) (setlocale LC_ALL "C") -(define (run-test) - (if #f - (coverage-test run-test-proper) - (run-test-proper))) - -(define (coverage-test tester) - (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)) - (lambda (data result) - (let ((port (open-output-file "/tmp/lcov.info"))) - (coverage-data->lcov data port) - (close port))))) - (define (teardown) (gnc-clear-current-session)) -(define (run-test-proper) +(define (run-test) (let ((saved-format (qof-date-format-get))) (qof-date-format-set QOF-DATE-FORMAT-ISO) (test-runner-factory gnc:test-runner) diff --git a/gnucash/report/reports/standard/test/test-portfolios.scm b/gnucash/report/reports/standard/test/test-portfolios.scm index f7535450308..1c0fe108c23 100644 --- a/gnucash/report/reports/standard/test/test-portfolios.scm +++ b/gnucash/report/reports/standard/test/test-portfolios.scm @@ -10,8 +10,6 @@ (use-modules (tests srfi64-extras)) (use-modules (sxml simple)) (use-modules (sxml xpath)) -(use-modules (system vm coverage)) -(use-modules (system vm vm)) ;; This is implementation testing for both the Portfolio and the ;; Advanced Portfolio Report. @@ -23,21 +21,6 @@ (setlocale LC_ALL "C") (define (run-test) - (if #f - (coverage-test) - (run-test-proper))) - -(define (coverage-test) - (let ((currfile (dirname (current-filename)))) - (add-to-load-path (string-take currfile (string-rindex currfile #\/)))) - (call-with-values - (lambda () (with-code-coverage run-test-proper)) - (lambda (data result) - (let ((port (open-output-file "/tmp/lcov.info"))) - (coverage-data->lcov data port) - (close port))))) - -(define (run-test-proper) (test-runner-factory gnc:test-runner) (test-begin "test-portfolios.scm") (null-test "portfolio" portfolio-uuid) diff --git a/gnucash/report/reports/standard/test/test-transaction.scm b/gnucash/report/reports/standard/test/test-transaction.scm index 100692ea6ab..214d5548958 100644 --- a/gnucash/report/reports/standard/test/test-transaction.scm +++ b/gnucash/report/reports/standard/test/test-transaction.scm @@ -10,8 +10,6 @@ (use-modules (tests srfi64-extras)) (use-modules (sxml simple)) (use-modules (sxml xpath)) -(use-modules (system vm coverage)) -(use-modules (system vm vm)) ;; Guide to the test-transaction.scm @@ -28,16 +26,6 @@ ;; (options->sxml) which in turn generates the transaction report, and ;; dumps the output at /tmp/test-trep-*.html for review. -;; For coverage analysis, please amend (run-test) (if #f ...) to (if -;; #t ...) and this will run (coverage-test) instead, which will -;; generate the coverage report in /tmp/lcov.info -- the latter can be -;; converted to an html report using genhtml from -;; http://ltp.sourceforge.net/coverage/lcov.php - -;; Please note the with-code-coverage has changed guile-2.0 to 2.2 -;; which does not require specifying the VM; I have no experience -;; running in guile 2.2 and cannot confirm syntax. - ;; copied from transaction.scm (define trep-uuid "2fe3b9833af044abb929a88d5a59620f") (define reconcile-uuid "e45218c6d76f11e7b5ef0800277ef320") @@ -46,23 +34,6 @@ (setlocale LC_ALL "C") (define (run-test) - (if #f - (coverage-test) - (run-test-proper))) - -(define (coverage-test) - (let* ((currfile (dirname (current-filename))) - (path (string-take currfile (string-rindex currfile #\/)))) - (add-to-load-path path)) - (call-with-values - (lambda() - (with-code-coverage run-test-proper)) - (lambda (data result) - (let ((port (open-output-file "/tmp/lcov.info"))) - (coverage-data->lcov data port) - (close port))))) - -(define (run-test-proper) (test-runner-factory gnc:test-runner) (test-begin "transaction.scm") (null-test) diff --git a/gnucash/report/test/test-commodity-utils.scm b/gnucash/report/test/test-commodity-utils.scm index a8e609906e5..11166f3cfe8 100644 --- a/gnucash/report/test/test-commodity-utils.scm +++ b/gnucash/report/test/test-commodity-utils.scm @@ -30,11 +30,10 @@ (use-modules (sw_engine)) (use-modules (sw_app_utils)) (use-modules (gnucash report)) -(use-modules (system vm coverage)) (setlocale LC_ALL "C") -(define (run-test-proper) +(define (run-test) (test-runner-factory gnc:test-runner) (test-begin "commodity-utils") ;; Tests go here @@ -50,23 +49,6 @@ (test-weighted-average) (test-end "commodity-utils")) -(define (coverage-test) - (let* ((currfile (dirname (current-filename))) - (path (string-take currfile (string-rindex currfile #\/)))) - (add-to-load-path path)) - (call-with-values - (lambda() - (with-code-coverage run-test-proper)) - (lambda (data result) - (let ((port (open-output-file "/tmp/lcov.info"))) - (coverage-data->lcov data port) - (close port))))) - -(define (run-test) - (if #f ;switch to #t to run coverage - (coverage-test) - (run-test-proper))) - (define test-accounts (list "Root" (list (cons 'type ACCT-TYPE-ROOT)) (list "Assets"(list (cons 'type ACCT-TYPE-ASSET)) diff --git a/gnucash/report/test/test-report-html.scm b/gnucash/report/test/test-report-html.scm index c4f1faa5942..1ab073727c0 100644 --- a/gnucash/report/test/test-report-html.scm +++ b/gnucash/report/test/test-report-html.scm @@ -13,26 +13,8 @@ (use-modules (tests test-engine-extras)) (use-modules (tests test-report-extras)) (use-modules (tests srfi64-extras)) -(use-modules (system vm coverage)) - -(define (coverage-test) - (let* ((currfile (dirname (current-filename))) - (path (string-take currfile (string-rindex currfile #\/)))) - (add-to-load-path path)) - (call-with-values - (lambda() - (with-code-coverage run-test-proper)) - (lambda (data result) - (let ((port (open-output-file "/tmp/lcov.info"))) - (coverage-data->lcov data port) - (close port))))) (define (run-test) - (if #f - (coverage-test) - (run-test-proper))) - -(define (run-test-proper) (test-runner-factory gnc:test-runner) (test-begin "Testing/Temporary/test-report-html") ;; if (test-runner-factory gnc:test-runner) is commented out, this