mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Partial merge of Chris Lam's maint-stress-tests into maint.
Merges he commits that aren't the stress-test.
This commit is contained in:
commit
ad7c14a5df
@ -121,7 +121,7 @@ gnc_ui_find_transactions_dialog_create2 (GNCLedgerDisplay2 * orig_ledg)
|
|||||||
type, SPLIT_RECONCILE, NULL);
|
type, SPLIT_RECONCILE, NULL);
|
||||||
params = gnc_search_param_prepend (params, N_("Share Price"), NULL,
|
params = gnc_search_param_prepend (params, N_("Share Price"), NULL,
|
||||||
type, SPLIT_SHARE_PRICE, NULL);
|
type, SPLIT_SHARE_PRICE, NULL);
|
||||||
params = gnc_search_param_prepend (params, N_("Shares"), NULL,
|
params = gnc_search_param_prepend (params, N_("Amount"), NULL,
|
||||||
type, SPLIT_AMOUNT, NULL);
|
type, SPLIT_AMOUNT, NULL);
|
||||||
params = gnc_search_param_prepend (params, N_("Value"), NULL,
|
params = gnc_search_param_prepend (params, N_("Value"), NULL,
|
||||||
type, SPLIT_VALUE, NULL);
|
type, SPLIT_VALUE, NULL);
|
||||||
|
@ -541,7 +541,7 @@
|
|||||||
(end-date (gnc:time64-end-day-time
|
(end-date (gnc:time64-end-day-time
|
||||||
(gnc:date-option-absolute-time
|
(gnc:date-option-absolute-time
|
||||||
(opt-val gnc:pagename-general (N_ "To")))))
|
(opt-val gnc:pagename-general (N_ "To")))))
|
||||||
(book (gnc-account-get-book account))
|
(book (gnc-get-current-book))
|
||||||
(date-format (gnc:options-fancy-date book))
|
(date-format (gnc:options-fancy-date book))
|
||||||
(type (opt-val "__reg" "owner-type"))
|
(type (opt-val "__reg" "owner-type"))
|
||||||
(type-str "")
|
(type-str "")
|
||||||
|
@ -26,7 +26,9 @@
|
|||||||
(run-test-proper)))
|
(run-test-proper)))
|
||||||
|
|
||||||
(define (coverage-test tester)
|
(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
|
(call-with-values
|
||||||
(lambda()
|
(lambda()
|
||||||
(with-code-coverage tester))
|
(with-code-coverage tester))
|
||||||
|
@ -48,8 +48,9 @@
|
|||||||
(xaccQueryAddAccountMatch query
|
(xaccQueryAddAccountMatch query
|
||||||
currency-accounts
|
currency-accounts
|
||||||
QOF-GUID-MATCH-ANY QOF-QUERY-AND)
|
QOF-GUID-MATCH-ANY QOF-QUERY-AND)
|
||||||
(xaccQueryAddDateMatchTT
|
(if end-date
|
||||||
query #f end-date #t end-date QOF-QUERY-AND)
|
(xaccQueryAddDateMatchTT
|
||||||
|
query #f end-date #t end-date QOF-QUERY-AND))
|
||||||
|
|
||||||
;; Get the query result, i.e. all splits in currency
|
;; Get the query result, i.e. all splits in currency
|
||||||
;; accounts.
|
;; accounts.
|
||||||
|
@ -50,11 +50,12 @@
|
|||||||
(run-test-proper)))
|
(run-test-proper)))
|
||||||
|
|
||||||
(define (coverage-test)
|
(define (coverage-test)
|
||||||
(define %test-vm (make-vm))
|
(let* ((currfile (dirname (current-filename)))
|
||||||
(add-to-load-path "/home/chris/sources/gnucash/gnucash/report/standard-reports")
|
(path (string-take currfile (string-rindex currfile #\/))))
|
||||||
|
(add-to-load-path path))
|
||||||
(call-with-values
|
(call-with-values
|
||||||
(lambda()
|
(lambda()
|
||||||
(with-code-coverage %test-vm run-test-proper))
|
(with-code-coverage run-test-proper))
|
||||||
(lambda (data result)
|
(lambda (data result)
|
||||||
(let ((port (open-output-file "/tmp/lcov.info")))
|
(let ((port (open-output-file "/tmp/lcov.info")))
|
||||||
(coverage-data->lcov data port)
|
(coverage-data->lcov data port)
|
||||||
|
@ -1015,6 +1015,7 @@ xaccInitAccount (Account * acc, QofBook *book)
|
|||||||
QofBook *
|
QofBook *
|
||||||
gnc_account_get_book(const Account *account)
|
gnc_account_get_book(const Account *account)
|
||||||
{
|
{
|
||||||
|
if (!account) return NULL;
|
||||||
return qof_instance_get_book(QOF_INSTANCE(account));
|
return qof_instance_get_book(QOF_INSTANCE(account));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user