mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[reports] don't offer individual coverage tests
because there's a new global coverage option in CMake
This commit is contained in:
parent
d8cdf23499
commit
699190db0b
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user