testDates / "make tests" fails on localized Windows systems
Bug #1073935 reported by
Bogdan Marinov
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
Changed in stellarium: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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: :localeDateStri ng(), 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( ). /bugreports. qt-project. org/browse/ QTBUG-27789
https:/