After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707546 - dttest failed during building
dttest failed during building
Status: RESOLVED FIXED
Product: gnote
Classification: Applications
Component: build
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gnote-maint
gnote-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-05 09:32 UTC by Popo
Modified: 2013-09-26 19:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the issue (1.35 KB, patch)
2013-09-06 19:10 UTC, Aurimas Černius
none Details | Review
Force timezone in dttest (1.31 KB, patch)
2013-09-12 19:22 UTC, Aurimas Černius
none Details | Review

Description Popo 2013-09-05 09:32:26 UTC
I have all the dependencies satisfied but I'm unable to get past the dttest without getting these errors. Have a look at the error log

% less src/test-suite.log
=====================================
   gnote 3.9.3: src/test-suite.log
=====================================

# TOTAL: 8
# PASS:  7
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: dttest
============

test/dttest.cpp(72): test string_ends_with(date_string, "19:34") failed in function: 'int test_main(int, char**)'
test/dttest.cpp(75): test string_ends_with(date_string, "7:34 pm") failed in function: 'int test_main(int, char**)'

**** 2 errors detected
Comment 1 Aurimas Černius 2013-09-05 17:49:28 UTC
Can you provide your system details (most important is GTK+ version used).
I think that test prints "PM" in uppercase for you, I'll modify the test so that both are fine.
Comment 2 Popo 2013-09-05 23:18:35 UTC
I use Ubuntu 13.04 i386, with os fully updated. I checked that my libgtk-3-dev version is 3.6.4-0ubuntu8
Comment 3 Aurimas Černius 2013-09-06 19:10:42 UTC
Created attachment 254299 [details] [review]
Patch to fix the issue

Please try to apply this patch, hopefully it will resolve the issue.
Comment 4 Popo 2013-09-06 22:37:12 UTC
Took a quick look at the patch. What about the first error message?

test/dttest.cpp(72): test string_ends_with(date_string, "19:34") failed in
function: 'int test_main(int, char**)'
Comment 5 Aurimas Černius 2013-09-08 16:33:53 UTC
(In reply to comment #4)
> Took a quick look at the patch. What about the first error message?
> 
> test/dttest.cpp(72): test string_ends_with(date_string, "19:34") failed in
> function: 'int test_main(int, char**)'

Can you insert a statement there to output the actual result of formatting?
It works fine for me on Fedora 19 with GTK 3.8
Comment 6 Hubert Figuiere (:hub) 2013-09-09 06:34:37 UTC
Also which locale do run the test under?
Comment 7 Popo 2013-09-10 11:36:00 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Took a quick look at the patch. What about the first error message?
> > 
> > test/dttest.cpp(72): test string_ends_with(date_string, "19:34") failed in
> > function: 'int test_main(int, char**)'
> 
> Can you insert a statement there to output the actual result of formatting?
> It works fine for me on Fedora 19 with GTK 3.8

OK..

  sharp::DateTime d6 = sharp::DateTime::from_iso8601("2009-03-24T13:34:35.2914680-04:00");
  date_string = gnote::utils::get_pretty_print_date(d6, true, false);
  cout << date_string
  BOOST_CHECK(string_ends_with(date_string, "19:34"));

  date_string = gnote::utils::get_pretty_print_date(d6, true, true);
  cout << date_string
  BOOST_CHECK(string_ends_with(date_string, "7:34 pm"));

=====================================
   gnote 3.9.3: src/test-suite.log
=====================================

# TOTAL: 8
# PASS:  7
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: dttest
============

Mar 24 2009, 17:34 pm
test/dttest.cpp(73): test string_ends_with(date_string, "19:34") failed in function: 'int test_main(int, char**)'
mar 24 2009,  5:34 pm
test/dttest.cpp(77): test string_ends_with(date_string, "7:34 pm") failed in function: 'int test_main(int, char**)'

**** 2 errors detected
Comment 8 Popo 2013-09-10 11:37:55 UTC
(In reply to comment #6)
> Also which locale do run the test under?

en_US.UTF-8 with timezone Etc/UTC (if it matters)
Comment 9 Hubert Figuiere (:hub) 2013-09-10 11:59:31 UTC
(In reply to comment #7)
> Mar 24 2009, 17:34 pm
> test/dttest.cpp(73): test string_ends_with(date_string, "19:34") failed in
> function: 'int test_main(int, char**)'

This is impossible

> mar 24 2009,  5:34 pm
> test/dttest.cpp(77): test string_ends_with(date_string, "7:34 pm") failed in
> function: 'int test_main(int, char**)'

weird.

Note that the test fails here too.
Comment 10 Hubert Figuiere (:hub) 2013-09-10 12:06:41 UTC
From my understanding, given the result I get, the test is designed to only work in the maintainer's timezone. :-/
Comment 11 Aurimas Černius 2013-09-12 19:22:54 UTC
Created attachment 254805 [details] [review]
Force timezone in dttest

Try this patch, it should force timezone in test.
Comment 12 Aurimas Černius 2013-09-22 12:37:56 UTC
Have you tried applying latest patch? With patches applied it should work fine.
Comment 13 Popo 2013-09-25 01:17:37 UTC
Sorry for not responding sooner. Yes I have tested the patch and I didn't get that test error anymore during build. Thank you
Comment 14 Aurimas Černius 2013-09-26 19:58:16 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.