testDates / "make tests" fails on localized Windows systems

Bug #1073935 reported by Bogdan Marinov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Low
Bogdan Marinov

Bug Description

On Windows (and probably Linux) machines where the *system* locale is not English, one of the tests in the testDates executable fails, causing it to exit with code 1. As it is a part of the "make tests" target, this also causes executing make for that target to fail. This was discovered on a Windows buildbot machine.

Related branches

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

The problem is in the TestDates::formatting() test, which tests date formatting for different locales. One of the sub-tests compared date strings including day and month names to English values. It calls StelUtils::localeDateString(), assuming that it is affected by QLocale::setDefault().

But localeDateString() uses functions like QDate::shortDayName(), which, at least in Qt 4.8, return according to the *system* locale, not the one set with QLocale::setDefault().
https://bugreports.qt-project.org/browse/QTBUG-27789

Changed in stellarium:
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I've commented out the relevant portion of the test:
http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/5681

Changed in stellarium:
status: In Progress → Fix Committed
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.