[GNC-dev] Two steps forward (Maybe three back)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[GNC-dev] Two steps forward (Maybe three back)

Stephen M. Butler
Started clean this morning by recloning the git repository.  Made much
further progress but ended up with some test failures.  Here are my steps:

1.  sudo rm -rf gnucash

2.  git clone https://github.com/Gnucash/gnucash

3. cd gnucash

4.  git checkout -b debian

5.  cp -r ../debian .

        Here is the contents of that directory -- copied to Google Drive:

           
https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI

6.  git add debian

7. git commit

        Done on my "debian" branch

8. fakeroot debian/rules clean

9.  sudo mk-build-deps -ir debian/control

10. dpkg-buildpackage -rfakeroot -b -uc

Note:  This usually failed right up front.  This time went for nearly 10
minutes.

End testing: Jan 20 12:49 PST
+ exit 2
debian/rules:68: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 2
make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
debian/rules:23: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit
status 2


Here are the contents of ./.build/Testing/Temporary/* 
https://drive.google.com/open?id=1_0gRAd-ymP1cEYM3pyPnvzeHI7-SSWMS

This was done on 3.4-39.

--Steve

--
Stephen M Butler, PMP, PSM
[hidden email]
[hidden email]
253-350-0166
-------------------------------------------
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] Two steps forward (Maybe three back)

John Ralls-2


> On Jan 20, 2019, at 1:24 PM, Stephen M. Butler <[hidden email]> wrote:
>
> Started clean this morning by recloning the git repository.  Made much
> further progress but ended up with some test failures.  Here are my steps:
>
> 1.  sudo rm -rf gnucash
>
> 2.  git clone https://github.com/Gnucash/gnucash
>
> 3. cd gnucash
>
> 4.  git checkout -b debian
>
> 5.  cp -r ../debian .
>
>         Here is the contents of that directory -- copied to Google Drive:
>
>            
> https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI
>
> 6.  git add debian
>
> 7. git commit
>
>         Done on my "debian" branch
>
> 8. fakeroot debian/rules clean
>
> 9.  sudo mk-build-deps -ir debian/control
>
> 10. dpkg-buildpackage -rfakeroot -b -uc
>
> Note:  This usually failed right up front.  This time went for nearly 10
> minutes.
>
> End testing: Jan 20 12:49 PST
> + exit 2
> debian/rules:68: recipe for target 'override_dh_auto_test' failed
> make[1]: *** [override_dh_auto_test] Error 2
> make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
> debian/rules:23: recipe for target 'build' failed
> make: *** [build] Error 2
> dpkg-buildpackage: error: debian/rules build subprocess returned exit
> status 2
>
>
> Here are the contents of ./.build/Testing/Temporary/*
> https://drive.google.com/open?id=1_0gRAd-ymP1cEYM3pyPnvzeHI7-SSWMS

The file you want to look at for test failures is LastTest.log. You can search for "Test Failed".

This time the test failure is in gnucash/report/standard-reports/test/test-transaction.scm:
[pass] line:654, test: dual amount column, first transaction correct
[fail] line:678, test: dates are sorted
transaction.scm/sorting options
 -> expected: ("12/31/69" "12/31/69" "01/01/70" "02/01/70" "02/10/70")
 -> obtained: ("12/31/70" "12/31/70" "01/01/70" "02/01/70" "02/10/70")
[pass] line:684, test: sort by number

That suggests that for some reason Guile on your system can't handle dates before 1/1/1970. That's strange, but probably not important to many GnuCash users.

Chris Lam, any reason not to change that test to use later dates?

Regards,
John Ralls

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] Two steps forward (Maybe three back)

Christopher Lam
There's no reason why the dates can't be changed.

The reason dates straggling 1.1.1970 was chosen was because 1.1.1970
corresponds to time 0 in time64, and I felt that having a few negative
time64 numbers would be interesting to test sorting.

However this is a weird weirdness -- the test output shows that the
transactions were sorted correctly - 31/12/69, 31/12/69, 01/01/70,
02/01/70, 02/10/70 (in d/m/y); it's just the display that is incorrect.

Moreover the display has to go through qof_print_date which takes a
time64 and returns a string.

I'd be keen to know Stephen's build and try debug this.

Stephen can you modify transaction.scm as follows and let us know the
test output? (Beware the parentheses!)

modified   gnucash/report/standard-reports/transaction.scm
@@ -1119,7 +1119,8 @@ be excluded from periodic reporting.")
                                   (if transaction-row?
(gnc:make-html-table-cell/markup
                                        "date-cell"
-                                      (qof-print-date (xaccTransGetDate
(xaccSplitGetParent split))))
+                                      (let ((date (xaccTransGetDate
(xaccSplitGetParent split))))
+                                        (gnc:pk 'date date
'qof-print-date (qof-print-date date))))
                                       ""))))

                 (add-if (column-uses? 'reconciled-date)


On 21/1/19 7:00 am, John Ralls wrote:

>
>> On Jan 20, 2019, at 1:24 PM, Stephen M. Butler <[hidden email]> wrote:
>>
>> Started clean this morning by recloning the git repository.  Made much
>> further progress but ended up with some test failures.  Here are my steps:
>>
>> 1.  sudo rm -rf gnucash
>>
>> 2.  git clone https://github.com/Gnucash/gnucash
>>
>> 3. cd gnucash
>>
>> 4.  git checkout -b debian
>>
>> 5.  cp -r ../debian .
>>
>>          Here is the contents of that directory -- copied to Google Drive:
>>
>>            
>> https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI
>>
>> 6.  git add debian
>>
>> 7. git commit
>>
>>          Done on my "debian" branch
>>
>> 8. fakeroot debian/rules clean
>>
>> 9.  sudo mk-build-deps -ir debian/control
>>
>> 10. dpkg-buildpackage -rfakeroot -b -uc
>>
>> Note:  This usually failed right up front.  This time went for nearly 10
>> minutes.
>>
>> End testing: Jan 20 12:49 PST
>> + exit 2
>> debian/rules:68: recipe for target 'override_dh_auto_test' failed
>> make[1]: *** [override_dh_auto_test] Error 2
>> make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
>> debian/rules:23: recipe for target 'build' failed
>> make: *** [build] Error 2
>> dpkg-buildpackage: error: debian/rules build subprocess returned exit
>> status 2
>>
>>
>> Here are the contents of ./.build/Testing/Temporary/*
>> https://drive.google.com/open?id=1_0gRAd-ymP1cEYM3pyPnvzeHI7-SSWMS
> The file you want to look at for test failures is LastTest.log. You can search for "Test Failed".
>
> This time the test failure is in gnucash/report/standard-reports/test/test-transaction.scm:
> [pass] line:654, test: dual amount column, first transaction correct
> [fail] line:678, test: dates are sorted
> transaction.scm/sorting options
>   -> expected: ("12/31/69" "12/31/69" "01/01/70" "02/01/70" "02/10/70")
>   -> obtained: ("12/31/70" "12/31/70" "01/01/70" "02/01/70" "02/10/70")
> [pass] line:684, test: sort by number
>
> That suggests that for some reason Guile on your system can't handle dates before 1/1/1970. That's strange, but probably not important to many GnuCash users.
>
> Chris Lam, any reason not to change that test to use later dates?
>
> Regards,
> John Ralls
>
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] Two steps forward (Maybe three back)

Stephen M. Butler
On 1/20/19 8:07 PM, Christopher Lam wrote:

> There's no reason why the dates can't be changed.
>
> The reason dates straggling 1.1.1970 was chosen was because 1.1.1970
> corresponds to time 0 in time64, and I felt that having a few negative
> time64 numbers would be interesting to test sorting.
>
> However this is a weird weirdness -- the test output shows that the
> transactions were sorted correctly - 31/12/69, 31/12/69, 01/01/70,
> 02/01/70, 02/10/70 (in d/m/y); it's just the display that is incorrect.
>
> Moreover the display has to go through qof_print_date which takes a
> time64 and returns a string.
>
> I'd be keen to know Stephen's build and try debug this.


Here are my steps (I have a Projects folder in which is a GnuCash folder):

cd ~/Projects/GnuCash

git clone https://github.com/Gnucash/gnucash

cd gnucash

git checkout 3.4

cp -r ../debian . 

(contents of above folder are available here: 
https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI  )

fakeroot debian/rules clean

sudo mk0buikd-deps -ir debian/control

DEB-BUILD-OPTIONS=nocheck dpkg-build-package -rfakeroot -b -uc

(This did build the files located here: 
https://drive.google.com/open?id=1fV_fURy6c77e7gf6S41lTacM7dFyy7VD   )


>
> Stephen can you modify transaction.scm as follows and let us know the
> test output? (Beware the parentheses!)
>
> modified   gnucash/report/standard-reports/transaction.scm
> @@ -1119,7 +1119,8 @@ be excluded from periodic reporting.")
>                                   (if transaction-row?
> (gnc:make-html-table-cell/markup
>                                        "date-cell"
> -                                      (qof-print-date
> (xaccTransGetDate (xaccSplitGetParent split))))
> +                                      (let ((date (xaccTransGetDate
> (xaccSplitGetParent split))))
> +                                        (gnc:pk 'date date
> 'qof-print-date (qof-print-date date))))
>                                       ""))))
>
>                 (add-if (column-uses? 'reconciled-date)
>
>
Hmm.  I was back on v3.4 with this test.  I'll try again with maint
checked out. 


d0.0005 t1.824: ('date 1576407540 'qof-print-date 12/15/19)
[pass] line:647, test: dual amount column, with original currency headers
[pass] line:651, test: dual amount column, grand totals available
[fail] line:654, test: dual amount column, first transaction correct
transaction.scm/display options
 -> expected: ("01/03/18" "$103 income" "Root.Asset.Bank" "$103.00"
"$103.00")
 -> obtained: ("01/03/19" "$103 income" "Root.Asset.Bank" "$103.00"
"$103.00")
d0.1090 t1.933: ('date -46860 'qof-print-date 12/31/69)


> On 21/1/19 7:00 am, John Ralls wrote:
>>
>>> On Jan 20, 2019, at 1:24 PM, Stephen M. Butler <[hidden email]> wrote:
>>>
>>> Started clean this morning by recloning the git repository.  Made much
>>> further progress but ended up with some test failures.  Here are my
>>> steps:
>>>
>>> 1.  sudo rm -rf gnucash
>>>
>>> 2.  git clone https://github.com/Gnucash/gnucash
>>>
>>> 3. cd gnucash
>>>
>>> 4.  git checkout -b debian
>>>
>>> 5.  cp -r ../debian .
>>>
>>>          Here is the contents of that directory -- copied to Google
>>> Drive:
>>>
>>>            
>>> https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI
>>>
>>> 6.  git add debian
>>>
>>> 7. git commit
>>>
>>>          Done on my "debian" branch
>>>
>>> 8. fakeroot debian/rules clean
>>>
>>> 9.  sudo mk-build-deps -ir debian/control
>>>
>>> 10. dpkg-buildpackage -rfakeroot -b -uc
>>>
>>> Note:  This usually failed right up front.  This time went for
>>> nearly 10
>>> minutes.
>>>
>>> End testing: Jan 20 12:49 PST
>>> + exit 2
>>> debian/rules:68: recipe for target 'override_dh_auto_test' failed
>>> make[1]: *** [override_dh_auto_test] Error 2
>>> make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
>>> debian/rules:23: recipe for target 'build' failed
>>> make: *** [build] Error 2
>>> dpkg-buildpackage: error: debian/rules build subprocess returned exit
>>> status 2
>>>
>>>
>>> Here are the contents of ./.build/Testing/Temporary/*
>>> https://drive.google.com/open?id=1_0gRAd-ymP1cEYM3pyPnvzeHI7-SSWMS
>> The file you want to look at for test failures is LastTest.log. You
>> can search for "Test Failed".
>>
>> This time the test failure is in
>> gnucash/report/standard-reports/test/test-transaction.scm:
>> [pass] line:654, test: dual amount column, first transaction correct
>> [fail] line:678, test: dates are sorted
>> transaction.scm/sorting options
>>   -> expected: ("12/31/69" "12/31/69" "01/01/70" "02/01/70" "02/10/70")
>>   -> obtained: ("12/31/70" "12/31/70" "01/01/70" "02/01/70" "02/10/70")
>> [pass] line:684, test: sort by number
>>
>> That suggests that for some reason Guile on your system can't handle
>> dates before 1/1/1970. That's strange, but probably not important to
>> many GnuCash users.
>>
>> Chris Lam, any reason not to change that test to use later dates?
>>
>> Regards,
>> John Ralls

--
Stephen M Butler, PMP, PSM
[hidden email]
[hidden email]
253-350-0166
-------------------------------------------
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] Two steps forward (Maybe three back)

Stephen M. Butler
In reply to this post by Christopher Lam
On 1/20/19 8:07 PM, Christopher Lam wrote:

> There's no reason why the dates can't be changed.
>
> The reason dates straggling 1.1.1970 was chosen was because 1.1.1970
> corresponds to time 0 in time64, and I felt that having a few negative
> time64 numbers would be interesting to test sorting.
>
> However this is a weird weirdness -- the test output shows that the
> transactions were sorted correctly - 31/12/69, 31/12/69, 01/01/70,
> 02/01/70, 02/10/70 (in d/m/y); it's just the display that is incorrect.
>
> Moreover the display has to go through qof_print_date which takes a
> time64 and returns a string.
>
> I'd be keen to know Stephen's build and try debug this.
>
> Stephen can you modify transaction.scm as follows and let us know the
> test output? (Beware the parentheses!)
>
> modified   gnucash/report/standard-reports/transaction.scm
> @@ -1119,7 +1119,8 @@ be excluded from periodic reporting.")
>                                   (if transaction-row?
> (gnc:make-html-table-cell/markup
>                                        "date-cell"
> -                                      (qof-print-date
> (xaccTransGetDate (xaccSplitGetParent split))))
> +                                      (let ((date (xaccTransGetDate
> (xaccSplitGetParent split))))
> +                                        (gnc:pk 'date date
> 'qof-print-date (qof-print-date date))))
>                                       ""))))
>
>                 (add-if (column-uses? 'reconciled-date)
My apologies for the long delay in getting back to you.  The wife
indicated that we'd better spend some time in the hot tub watching the
lunar eclipse.  So I leaned back and gazed up into the dark gray
featureless sky at where the moon should be.  Nadda.  Good soak though
and the spine is thankful.

The other problem is that my 1119 doesn't match up.  At first when I
went back to the maint branch the changes stayed in the directory.  I
had to be sure I had the real file from git.  So, here is the code block
with line 1119 marked.


              (add-if (column-uses? 'num)

                       (vector (if (and BOOK-SPLIT-ACTION
                                        (opt-val gnc:pagename-display
(N_ "Trans Number")))
                                   (_ "Num/T-Num")
                                   (_ "Num"))
                               (lambda (split transaction-row?)
                                 (let* ((trans (xaccSplitGetParent split))
                                        (num (gnc-get-num-action trans
split))
                                        (t-num (if (and BOOK-SPLIT-ACTION
                                                        (opt-val
gnc:pagename-display (N_ "Trans Number")))
                                                   (gnc-get-num-action
trans #f)
                                                   ""))
                                        (num-string (if (string-null? t-num)
                                                        num
                                                        (string-append
num "/" t-num))))
                                   (if transaction-row?
                                       (gnc:make-html-table-cell/markup
"text-cell" num-string)
                                       "")))))
1119
               (add-if (column-uses? 'description)
                       (vector (_ "Description")
                               (lambda (split transaction-row?)
                                 (define trans (xaccSplitGetParent split))
                                 (if transaction-row?
                                     (gnc:make-html-table-cell/markup
                                      "text-cell"
                                      (xaccTransGetDescription trans))
                                     ""))))


I think the line you want changed is above at 1083-1090:

1083           (add-if (column-uses? 'date)
                       (vector (_ "Date")
                               (lambda (split transaction-row?)
                                 (if transaction-row?
                                     (gnc:make-html-table-cell/markup
                                      "date-cell"
                                      (qof-print-date (xaccTransGetDate
(xaccSplitGetParent split))))
1090                              ""))))

Changed:

              (add-if (column-uses? 'date)
                       (vector (_ "Date")
                               (lambda (split transaction-row?)
                                 (if transaction-row?
                                     (gnc:make-html-table-cell/markup
                                      "date-cell"
                                      (let ((date (xaccTransGetDate
(xaccSplitGetParent split))))
                                        (gnc:pk 'date date
'qof-print-date (qof-print-date date))))
                                     ""))))
Copy paste worked to keep from having to count the parenthesis!

108/115 Test #108: test-charts ..................................  
Passed    1.91 sec
        Start 109: test-transaction
109/115 Test #109: test-transaction
.............................***Failed    3.88 sec
        Start 110: test-balsheet-pnl
110/115 Test #110: test-balsheet-pnl ............................  
Passed    2.57 sec
        Start 111: test-income-gst

......

d0.0005 t1.869: ('date 2717940 'qof-print-date 02/01/70)
d0.0005 t1.870: ('date 3495540 'qof-print-date 02/10/70)
[fail] line:678, test: dates are sorted
transaction.scm/sorting options
 -> expected: ("12/31/69" "12/31/69" "01/01/70" "02/01/70" "02/10/70")
 -> obtained: ("12/31/70" "12/31/70" "01/01/70" "02/01/70" "02/10/70")
d0.0163 t1.886: ('date 39540 'qof-print-date 01/01/70)

.......

109/115 Testing: test-transaction
109/115 Test: test-transaction
Command: "/usr/bin/cmake" "-E" "env" "/usr/bin/guile" "--debug" "-l"
"/home/steve/Projects/GnuCash/gnucash/gnucash/report/standard-reports/test/test-transaction.scm"
"-c" "(exit (run-test))"
Directory:
/home/steve/Projects/GnuCash/gnucash/.build/gnucash/report/standard-reports/test
"test-transaction" start time: Jan 20 22:33 PST
Output:
----------------------------------------------------------
* 22:33:20  WARN <gnc.gui> [gnc_configure_reverse_balance()] no reversed
account preference set, using none
[pass] line:130, test: null-test
d0.7194 t0.719: ('date 1546513140 'qof-print-date 01/03/19)

I did a tar -czf testfiles.ztar *.txt *.log on the files in
./.build/Testing/Temporary and attached

Hope I made the desired change.

--Steve


--
Stephen M Butler, PMP, PSM
[hidden email]
[hidden email]
253-350-0166
-------------------------------------------
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

testfiles.ztar (34K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] Two steps forward (Maybe three back)

Christopher Lam
Thank you

This confirms my suspicion that guile is not the culprit.

Excerpt
[pass] line:647, test: dual amount column, with original currency headers
[pass] line:651, test: dual amount column, grand totals available
[pass] line:654, test: dual amount column, first transaction correct
d0.1102 t1.868: ('date -46860 'qof-print-date 12/31/70)
d0.0005 t1.868: ('date -46860 'qof-print-date 12/31/70)
d0.0005 t1.869: ('date 39540 'qof-print-date 01/01/70)
d0.0005 t1.869: ('date 2717940 'qof-print-date 02/01/70)
d0.0005 t1.870: ('date 3495540 'qof-print-date 02/10/70)

Etc

The dates are correct; -46860 is a relatively small number of seconds
before 1/1/70 yet qof-print-date reports 31/12/70.

Back to jralls for root cause analysis!

On Mon., 21 Jan. 2019, 14:50 Stephen M. Butler <[hidden email] wrote:

> On 1/20/19 8:07 PM, Christopher Lam wrote:
> > There's no reason why the dates can't be changed.
> >
> > The reason dates straggling 1.1.1970 was chosen was because 1.1.1970
> > corresponds to time 0 in time64, and I felt that having a few negative
> > time64 numbers would be interesting to test sorting.
> >
> > However this is a weird weirdness -- the test output shows that the
> > transactions were sorted correctly - 31/12/69, 31/12/69, 01/01/70,
> > 02/01/70, 02/10/70 (in d/m/y); it's just the display that is incorrect.
> >
> > Moreover the display has to go through qof_print_date which takes a
> > time64 and returns a string.
> >
> > I'd be keen to know Stephen's build and try debug this.
> >
> > Stephen can you modify transaction.scm as follows and let us know the
> > test output? (Beware the parentheses!)
> >
> > modified   gnucash/report/standard-reports/transaction.scm
> > @@ -1119,7 +1119,8 @@ be excluded from periodic reporting.")
> >                                   (if transaction-row?
> > (gnc:make-html-table-cell/markup
> >                                        "date-cell"
> > -                                      (qof-print-date
> > (xaccTransGetDate (xaccSplitGetParent split))))
> > +                                      (let ((date (xaccTransGetDate
> > (xaccSplitGetParent split))))
> > +                                        (gnc:pk 'date date
> > 'qof-print-date (qof-print-date date))))
> >                                       ""))))
> >
> >                 (add-if (column-uses? 'reconciled-date)
>
> My apologies for the long delay in getting back to you.  The wife
> indicated that we'd better spend some time in the hot tub watching the
> lunar eclipse.  So I leaned back and gazed up into the dark gray
> featureless sky at where the moon should be.  Nadda.  Good soak though
> and the spine is thankful.
>
> The other problem is that my 1119 doesn't match up.  At first when I
> went back to the maint branch the changes stayed in the directory.  I
> had to be sure I had the real file from git.  So, here is the code block
> with line 1119 marked.
>
>
>               (add-if (column-uses? 'num)
>
>                        (vector (if (and BOOK-SPLIT-ACTION
>                                         (opt-val gnc:pagename-display
> (N_ "Trans Number")))
>                                    (_ "Num/T-Num")
>                                    (_ "Num"))
>                                (lambda (split transaction-row?)
>                                  (let* ((trans (xaccSplitGetParent split))
>                                         (num (gnc-get-num-action trans
> split))
>                                         (t-num (if (and BOOK-SPLIT-ACTION
>                                                         (opt-val
> gnc:pagename-display (N_ "Trans Number")))
>                                                    (gnc-get-num-action
> trans #f)
>                                                    ""))
>                                         (num-string (if (string-null?
> t-num)
>                                                         num
>                                                         (string-append
> num "/" t-num))))
>                                    (if transaction-row?
>                                        (gnc:make-html-table-cell/markup
> "text-cell" num-string)
>                                        "")))))
> 1119
>                (add-if (column-uses? 'description)
>                        (vector (_ "Description")
>                                (lambda (split transaction-row?)
>                                  (define trans (xaccSplitGetParent split))
>                                  (if transaction-row?
>                                      (gnc:make-html-table-cell/markup
>                                       "text-cell"
>                                       (xaccTransGetDescription trans))
>                                      ""))))
>
>
> I think the line you want changed is above at 1083-1090:
>
> 1083           (add-if (column-uses? 'date)
>                        (vector (_ "Date")
>                                (lambda (split transaction-row?)
>                                  (if transaction-row?
>                                      (gnc:make-html-table-cell/markup
>                                       "date-cell"
>                                       (qof-print-date (xaccTransGetDate
> (xaccSplitGetParent split))))
> 1090                              ""))))
>
> Changed:
>
>               (add-if (column-uses? 'date)
>                        (vector (_ "Date")
>                                (lambda (split transaction-row?)
>                                  (if transaction-row?
>                                      (gnc:make-html-table-cell/markup
>                                       "date-cell"
>                                       (let ((date (xaccTransGetDate
> (xaccSplitGetParent split))))
>                                         (gnc:pk 'date date
> 'qof-print-date (qof-print-date date))))
>                                      ""))))
> Copy paste worked to keep from having to count the parenthesis!
>
> 108/115 Test #108: test-charts ..................................
> Passed    1.91 sec
>         Start 109: test-transaction
> 109/115 Test #109: test-transaction
> .............................***Failed    3.88 sec
>         Start 110: test-balsheet-pnl
> 110/115 Test #110: test-balsheet-pnl ............................
> Passed    2.57 sec
>         Start 111: test-income-gst
>
> ......
>
> d0.0005 t1.869: ('date 2717940 'qof-print-date 02/01/70)
> d0.0005 t1.870: ('date 3495540 'qof-print-date 02/10/70)
> [fail] line:678, test: dates are sorted
> transaction.scm/sorting options
>  -> expected: ("12/31/69" "12/31/69" "01/01/70" "02/01/70" "02/10/70")
>  -> obtained: ("12/31/70" "12/31/70" "01/01/70" "02/01/70" "02/10/70")
> d0.0163 t1.886: ('date 39540 'qof-print-date 01/01/70)
>
> .......
>
> 109/115 Testing: test-transaction
> 109/115 Test: test-transaction
> Command: "/usr/bin/cmake" "-E" "env" "/usr/bin/guile" "--debug" "-l"
>
> "/home/steve/Projects/GnuCash/gnucash/gnucash/report/standard-reports/test/test-transaction.scm"
> "-c" "(exit (run-test))"
> Directory:
>
> /home/steve/Projects/GnuCash/gnucash/.build/gnucash/report/standard-reports/test
> "test-transaction" start time: Jan 20 22:33 PST
> Output:
> ----------------------------------------------------------
> * 22:33:20  WARN <gnc.gui> [gnc_configure_reverse_balance()] no reversed
> account preference set, using none
> [pass] line:130, test: null-test
> d0.7194 t0.719: ('date 1546513140 'qof-print-date 01/03/19)
>
> I did a tar -czf testfiles.ztar *.txt *.log on the files in
> ./.build/Testing/Temporary and attached
>
> Hope I made the desired change.
>
> --Steve
>
>
> --
> Stephen M Butler, PMP, PSM
> [hidden email]
> [hidden email]
> 253-350-0166
> -------------------------------------------
> GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8
>
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] Two steps forward (Maybe three back)

Christopher Lam
In reply to this post by Stephen M. Butler
As a last test, add the following, which will help determining which
part of qof_print_date_buff is playing up.

I think it should output ('locale 4)...

modified   gnucash/report/standard-reports/transaction.scm
                 (add-if (column-uses? 'date)
                         (vector (_ "Date")
                                 (lambda (split transaction-row?)
+                                 (gnc:pk 'locale (qof-date-format-get))
                                   (if transaction-row?
(gnc:make-html-table-cell/markup
                                        "date-cell"

On 21/1/19 12:58 pm, Stephen M. Butler wrote:

> On 1/20/19 8:07 PM, Christopher Lam wrote:
>> There's no reason why the dates can't be changed.
>>
>> The reason dates straggling 1.1.1970 was chosen was because 1.1.1970
>> corresponds to time 0 in time64, and I felt that having a few negative
>> time64 numbers would be interesting to test sorting.
>>
>> However this is a weird weirdness -- the test output shows that the
>> transactions were sorted correctly - 31/12/69, 31/12/69, 01/01/70,
>> 02/01/70, 02/10/70 (in d/m/y); it's just the display that is incorrect.
>>
>> Moreover the display has to go through qof_print_date which takes a
>> time64 and returns a string.
>>
>> I'd be keen to know Stephen's build and try debug this.
>
> Here are my steps (I have a Projects folder in which is a GnuCash folder):
>
> cd ~/Projects/GnuCash
>
> git clone https://github.com/Gnucash/gnucash
>
> cd gnucash
>
> git checkout 3.4
>
> cp -r ../debian .
>
> (contents of above folder are available here:
> https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI  )
>
> fakeroot debian/rules clean
>
> sudo mk0buikd-deps -ir debian/control
>
> DEB-BUILD-OPTIONS=nocheck dpkg-build-package -rfakeroot -b -uc
>
> (This did build the files located here:
> https://drive.google.com/open?id=1fV_fURy6c77e7gf6S41lTacM7dFyy7VD   )
>
>
>> Stephen can you modify transaction.scm as follows and let us know the
>> test output? (Beware the parentheses!)
>>
>> modified   gnucash/report/standard-reports/transaction.scm
>> @@ -1119,7 +1119,8 @@ be excluded from periodic reporting.")
>>                                    (if transaction-row?
>> (gnc:make-html-table-cell/markup
>>                                         "date-cell"
>> -                                      (qof-print-date
>> (xaccTransGetDate (xaccSplitGetParent split))))
>> +                                      (let ((date (xaccTransGetDate
>> (xaccSplitGetParent split))))
>> +                                        (gnc:pk 'date date
>> 'qof-print-date (qof-print-date date))))
>>                                        ""))))
>>
>>                  (add-if (column-uses? 'reconciled-date)
>>
>>
> Hmm.  I was back on v3.4 with this test.  I'll try again with maint
> checked out.
>
>
> d0.0005 t1.824: ('date 1576407540 'qof-print-date 12/15/19)
> [pass] line:647, test: dual amount column, with original currency headers
> [pass] line:651, test: dual amount column, grand totals available
> [fail] line:654, test: dual amount column, first transaction correct
> transaction.scm/display options
>   -> expected: ("01/03/18" "$103 income" "Root.Asset.Bank" "$103.00"
> "$103.00")
>   -> obtained: ("01/03/19" "$103 income" "Root.Asset.Bank" "$103.00"
> "$103.00")
> d0.1090 t1.933: ('date -46860 'qof-print-date 12/31/69)
>
>
>> On 21/1/19 7:00 am, John Ralls wrote:
>>>> On Jan 20, 2019, at 1:24 PM, Stephen M. Butler <[hidden email]> wrote:
>>>>
>>>> Started clean this morning by recloning the git repository.  Made much
>>>> further progress but ended up with some test failures.  Here are my
>>>> steps:
>>>>
>>>> 1.  sudo rm -rf gnucash
>>>>
>>>> 2.  git clone https://github.com/Gnucash/gnucash
>>>>
>>>> 3. cd gnucash
>>>>
>>>> 4.  git checkout -b debian
>>>>
>>>> 5.  cp -r ../debian .
>>>>
>>>>           Here is the contents of that directory -- copied to Google
>>>> Drive:
>>>>
>>>>            
>>>> https://drive.google.com/open?id=1VJmtb-Fx00PQna4yQoYm49C88Bi0hneI
>>>>
>>>> 6.  git add debian
>>>>
>>>> 7. git commit
>>>>
>>>>           Done on my "debian" branch
>>>>
>>>> 8. fakeroot debian/rules clean
>>>>
>>>> 9.  sudo mk-build-deps -ir debian/control
>>>>
>>>> 10. dpkg-buildpackage -rfakeroot -b -uc
>>>>
>>>> Note:  This usually failed right up front.  This time went for
>>>> nearly 10
>>>> minutes.
>>>>
>>>> End testing: Jan 20 12:49 PST
>>>> + exit 2
>>>> debian/rules:68: recipe for target 'override_dh_auto_test' failed
>>>> make[1]: *** [override_dh_auto_test] Error 2
>>>> make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
>>>> debian/rules:23: recipe for target 'build' failed
>>>> make: *** [build] Error 2
>>>> dpkg-buildpackage: error: debian/rules build subprocess returned exit
>>>> status 2
>>>>
>>>>
>>>> Here are the contents of ./.build/Testing/Temporary/*
>>>> https://drive.google.com/open?id=1_0gRAd-ymP1cEYM3pyPnvzeHI7-SSWMS
>>> The file you want to look at for test failures is LastTest.log. You
>>> can search for "Test Failed".
>>>
>>> This time the test failure is in
>>> gnucash/report/standard-reports/test/test-transaction.scm:
>>> [pass] line:654, test: dual amount column, first transaction correct
>>> [fail] line:678, test: dates are sorted
>>> transaction.scm/sorting options
>>>    -> expected: ("12/31/69" "12/31/69" "01/01/70" "02/01/70" "02/10/70")
>>>    -> obtained: ("12/31/70" "12/31/70" "01/01/70" "02/01/70" "02/10/70")
>>> [pass] line:684, test: sort by number
>>>
>>> That suggests that for some reason Guile on your system can't handle
>>> dates before 1/1/1970. That's strange, but probably not important to
>>> many GnuCash users.
>>>
>>> Chris Lam, any reason not to change that test to use later dates?
>>>
>>> Regards,
>>> John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel