Thanks for the reply! (And thanks for introducing me to Travis CI!)

Here's the output from the failures.

If I'm reading this right (and I may not be, I'm a mediocre coder!), five 
of the six failures are due to insufficient tests where the output is 
actually acceptable, but one in particular looks important:

*#6 seems like the most significant failure. It looks like the string "10 
February 2010 00:00:00" and the string "10 February 2010 00:00:02" are both 
being parsed to the date "2457/07/16 13:06:01", so naturally adding 2 
seconds to the first one does not make it equal to the second one.*

  6/353 Test   #6: LedgerMathTests .............................***Failed   
 0.04 sec
Running 81 test cases...
/home/micro/ledger/test/unit/t_value.cc(243): error in "testAddition": 
check v3 == value_t(boost::posix_time::ptime_from_tm(localtime)) failed 
[2457/07/16 13:06:03 != 2457/07/16 13:06:01]
/home/micro/ledger/test/unit/t_value.cc(246): error in "testAddition": 
check v3 == value_t(boost::posix_time::ptime_from_tm(localtime)) failed 
[2457/07/16 13:06:05 != 2457/07/16 13:06:01]
/home/micro/ledger/test/unit/t_value.cc(343): error in "testSubtraction": 
check v3 == value_t(boost::posix_time::ptime_from_tm(localtime)) failed 
[2490/04/12 10:13:14 != 2490/04/12 10:13:16]
/home/micro/ledger/test/unit/t_value.cc(346): error in "testSubtraction": 
check v3 == value_t(boost::posix_time::ptime_from_tm(localtime)) failed 
[2490/04/12 10:13:12 != 2490/04/12 10:13:16]

*** 4 failures detected in test suite "math"

The relevant code from t_value.cc for the first failure looks like this 
(comments mine):
 struct tm localtime;
 strptime("10 February 2010 00:00:00", "%d %b %Y %H:%M:%S", &localtime); 
 value_t v3(boost::posix_time::ptime_from_tm(localtime));

 strptime("10 February 2010 00:00:00", "%d %b %Y %H:%M:%S", &localtime);
 BOOST_CHECK_EQUAL(v3, value_t(boost::posix_time::ptime_from_tm(localtime
))); // This test PASSES
 v3 += value_t(2L);
 strptime("10 February 2010 00:00:02", "%d %b %Y %H:%M:%S", &localtime);
 BOOST_CHECK_EQUAL(v3, value_t(boost::posix_time::ptime_from_tm(localtime
))); // This test FAILS



*#29, #31, and #291 fail because ledger outputs the right lines, but in the 
wrong order. I'm not clear on why that would happen, or whether the 
re-ordered output is necessarily incorrect.*
 29/353 Test  #29: BaselineTest_cmd-pricedb ....................***Failed   
 0.35 sec

FAILURE in output from /home/micro/ledger/test/baseline/cmd-pricedb.test:
--
$ledger -f "/home/micro/ledger/test/baseline/cmd-pricedb.test" pricedb
--
  @@ -1,3 +1,3 @@
  +P 2012/01/03 00:00:00 EUR 1.3166666667 USD
   P 2012/01/02 00:00:00 GBP 1.20 EUR
  -P 2012/01/03 00:00:00 EUR 1.3166666667 USD
   P 2012/01/04 00:00:00 USD 0.63 GBP
E[cmd-pricedb.test]STDERR:

....
OK (4)  FAILED (1)

 31/353 Test  #31: BaselineTest_cmd-prices .....................***Failed   
 0.36 sec

FAILURE in output from /home/micro/ledger/test/baseline/cmd-prices.test:
--
$ledger -f "/home/micro/ledger/test/baseline/cmd-prices.test" prices
--
  @@ -1,3 +1,3 @@
  +2012/01/03 EUR      1.3166666667 USD
   2012/01/02 GBP          1.20 EUR
  -2012/01/03 EUR      1.3166666667 USD
   2012/01/04 USD          0.63 GBP
E[cmd-prices.test]STDERR:

....
OK (4)  FAILED (1)

291/353 Test #291: RegressTest_786A3DD0 ........................***Failed   
 0.21 sec


FAILURE in output from /home/micro/ledger/test/regress/786A3DD0.test:
--
$ledger -f "/home/micro/ledger/test/regress/786A3DD0.test" pricedb
--
  @@ -1,2 +1,2 @@
  +P 2012/03/12 00:00:00 USD CAD 1.
00454320987654321
   P 2011/02/27 00:00:00 AUD 0.746 EUR
  -P 2012/03/12 00:00:00 USD CAD 1.00454320987654321
E[786A3DD0.test]STDERR:

FAILED (1)


*#100 and #197 appear to fail because of unexpected ANSI color sequences in 
ledger's output, but only on the blank line at the end of the output. Maybe 
the testing code is smart enough to strip ansi sequences from non-blank 
lines, but compares blank lines differently and doesn't recognize that as 
whitespace? And maybe something about the cygwin environment causes ledger 
to output color when testing, but it doesn't on other platforms?*


100/353 Test #100: BaselineTest_opt-datetime-format ............***Failed   
 0.21 sec

FAILURE in output from 
/home/micro/ledger/test/baseline/opt-datetime-format.test:
--
$ledger -f "/home/micro/ledger/test/baseline/opt-datetime-format.test" bal 
--time-report --datetime-format '%m/%d/%y %I:%M %p'
--
  @@ -5,4 +5,4 @@
     04/05/13 12:00 PM    04/05/13 01:30 PM       1.50h    Lunch
     04/05/13 11:30 AM    04/05/13 12:00 PM       30.0m    Walk
   --------------------------------------------------
  -
  +ESC[1m                   ESC[0m  ESC[1m                   ESC[0m  *
E[opt-datetime-format.test]STDERR:


FAILED (1)


197/353 Test #197: BaselineTest_opt-time-report ................***Failed   
 0.29 sec
.
FAILURE in output from 
/home/micro/ledger/test/baseline/opt-time-report.test:
--
$ledger -f "/home/micro/ledger/test/baseline/opt-time-report.test" bal 
--time-report
--
  @@ -5,4 +5,4 @@
    13-Apr-05 12:00:00   13-Apr-05 13:30:00       1.50h    Lunch
    13-Apr-05 11:30:00   13-Apr-05 12:00:00       30.0m    Walk
   --------------------------------------------------
  -
  +ESC[1m                   ESC[0m  ESC[1m                   ESC[0m  *
E[opt-time-report.test]STDERR:


FAILURE in output from 
/home/micro/ledger/test/baseline/opt-time-report.test:
--
$ledger -f "/home/micro/ledger/test/baseline/opt-time-report.test" bal 
--time-report --time-colon
--
  @@ -5,4 +5,4 @@
    13-Apr-05 12:00:00   13-Apr-05 13:30:00       1:30h    Lunch
    13-Apr-05 11:30:00   13-Apr-05 12:00:00       30:0m    Walk
   --------------------------------------------------
  -
  +ESC[1m                   ESC[0m  ESC[1m                   ESC[0m  *
E[opt-time-report.test]STDERR:


OK (1)  FAILED (2)



On Thursday, June 23, 2016 at 5:36:29 AM UTC-4, unices wrote:
>
> Hell Josh, 
>
> currently all tests pass on Travis CI¹, 
> and any change should not break them. 
>
> Please run the tests verbosely, for example using: 
>   % ctest --output-on-failure 
>
> This hopefully gives a hint on which causes the regression. 
> Please post your findings to the list and add them to Bug 1166. 
>
>
> Best 
> Alexis 
>
> ¹ https://travis-ci.org/ledger/ledger 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to