Make check fails because February has 31 (!) days

Bug #1273893 reported by Tim Peeters
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Zsombor Egri
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When I run 'make check' on current trunk, I get this:

Executing ./tst_components -platform minimal -input tst_dateutils.qml -maxwarnings 20 -o ../../test_tst_dateutils.qml.xml,xunitxml -o -,txt
********* Start testing of components *********
Config: Using QTest library 5.0.2, Qt 5.0.2
PASS : components::DateUtilsAPI::initTestCase()
PASS : components::DateUtilsAPI::test_0isValid()
PASS : components::DateUtilsAPI::test_daysInMonth(row 0)
FAIL! : components::DateUtilsAPI::test_daysInMonth(row 1) daysInMonth() failed for month 2
   Actual (): 31
   Expected (): 28
   Loc: [/home/tim/dev/ubuntu-ui-toolkit/trunk/tests/unit/tst_components/tst_dateutils.qml(81)]
PASS : components::DateUtilsAPI::test_daysInMonth(row 2)
PASS : components::DateUtilsAPI::test_daysInMonth(row 3)
PASS : components::DateUtilsAPI::test_daysInMonth(row 4)
PASS : components::DateUtilsAPI::test_daysInMonth(row 5)
PASS : components::DateUtilsAPI::test_daysInMonth(row 6)
PASS : components::DateUtilsAPI::test_daysInMonth(row 7)
PASS : components::DateUtilsAPI::test_daysInMonth(row 8)
PASS : components::DateUtilsAPI::test_daysInMonth(row 9)
PASS : components::DateUtilsAPI::test_daysInMonth(row 10)
PASS : components::DateUtilsAPI::test_daysInMonth(row 11)
PASS : components::DateUtilsAPI::test_daysTo(row 0)
PASS : components::DateUtilsAPI::test_daysTo(row 1)
PASS : components::DateUtilsAPI::test_daysTo(row 2)
PASS : components::DateUtilsAPI::test_daysTo(row 3)
PASS : components::DateUtilsAPI::test_daysTo(row 4)
PASS : components::DateUtilsAPI::test_daysTo(row 5)
PASS : components::DateUtilsAPI::test_getInvalidDate()
PASS : components::DateUtilsAPI::test_getWeek(row 0)
PASS : components::DateUtilsAPI::test_getWeek(row 1)
PASS : components::DateUtilsAPI::test_getWeek(row 2)
PASS : components::DateUtilsAPI::test_getWeek(row 3)
PASS : components::DateUtilsAPI::test_getWeek(row 4)
PASS : components::DateUtilsAPI::test_leapYear(row 0)
PASS : components::DateUtilsAPI::test_leapYear(row 1)
PASS : components::DateUtilsAPI::test_leapYear(row 2)
PASS : components::DateUtilsAPI::test_leapYear(row 3)
PASS : components::DateUtilsAPI::test_midnight()
PASS : components::DateUtilsAPI::test_monthsTo(row 0)
PASS : components::DateUtilsAPI::test_monthsTo(row 1)
PASS : components::DateUtilsAPI::test_monthsTo(row 2)
PASS : components::DateUtilsAPI::test_monthsTo(row 3)
PASS : components::DateUtilsAPI::test_monthsTo(row 4)
PASS : components::DateUtilsAPI::cleanupTestCase()
Totals: 36 passed, 1 failed, 0 skipped
********* Finished testing of components *********
make[3]: *** [check] Error 1
make[3]: Leaving directory `/home/tim/dev/ubuntu-ui-toolkit/trunk/tests/unit/tst_components'
make[2]: *** [sub-tst_components-check] Error 2
make[2]: Leaving directory `/home/tim/dev/ubuntu-ui-toolkit/trunk/tests/unit'
make[1]: *** [sub-unit-check] Error 2
make[1]: Leaving directory `/home/tim/dev/ubuntu-ui-toolkit/trunk/tests'
make: *** [sub-tests-check] Error 2
tim@ideapad:~/dev/ubuntu-ui-toolkit/trunk$

Related branches

Revision history for this message
Tim Peeters (tpeeters) wrote :

I don't know why it is failing. Is it only my computer that thinks February has 31 days?

summary: - Make check fails because Februari has 31 days
+ Make check fails because February has 31 (!) days
Revision history for this message
Zsombor Egri (zsombi) wrote :

Could you do me a favour and print out the date object at each test? I am wondering what value does that have...

Revision history for this message
Tim Peeters (tpeeters) wrote :

The current day is 29 and you set the month to February. I guess the system gets confused then, so you need to set the day to something not larger than the maximum day of February first.

Revision history for this message
Tim Peeters (tpeeters) wrote :
Download full text (4.2 KiB)

Executing ./tst_components -platform minimal -input tst_dateutils.qml -maxwarnings 20 -o ../../test_tst_dateutils.qml.xml,xunitxml -o -,txt
********* Start testing of components *********
Config: Using QTest library 5.0.2, Qt 5.0.2
PASS : components::DateUtilsAPI::initTestCase()
PASS : components::DateUtilsAPI::test_0isValid()
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 0) Wed Jan 29 2014 10:29:19 GMT+0100 (CET)
PASS : components::DateUtilsAPI::test_daysInMonth(row 0)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 1) Sat Mar 01 2014 10:29:19 GMT+0100 (CET)
FAIL! : components::DateUtilsAPI::test_daysInMonth(row 1) daysInMonth() failed for month 2
   Actual (): 31
   Expected (): 28
   Loc: [/home/tim/dev/ubuntu-ui-toolkit/trunk/tests/unit/tst_components/tst_dateutils.qml(82)]
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 2) Sat Mar 29 2014 10:29:19 GMT+0100 (CET)
PASS : components::DateUtilsAPI::test_daysInMonth(row 2)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 3) Tue Apr 29 2014 10:29:19 GMT+0200 (CEST)
PASS : components::DateUtilsAPI::test_daysInMonth(row 3)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 4) Thu May 29 2014 10:29:19 GMT+0200 (CEST)
PASS : components::DateUtilsAPI::test_daysInMonth(row 4)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 5) Sun Jun 29 2014 10:29:19 GMT+0200 (CEST)
PASS : components::DateUtilsAPI::test_daysInMonth(row 5)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 6) Tue Jul 29 2014 10:29:19 GMT+0200 (CEST)
PASS : components::DateUtilsAPI::test_daysInMonth(row 6)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 7) Fri Aug 29 2014 10:29:19 GMT+0200 (CEST)
PASS : components::DateUtilsAPI::test_daysInMonth(row 7)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 8) Mon Sep 29 2014 10:29:19 GMT+0200 (CEST)
PASS : components::DateUtilsAPI::test_daysInMonth(row 8)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 9) Wed Oct 29 2014 10:29:19 GMT+0100 (CET)
PASS : components::DateUtilsAPI::test_daysInMonth(row 9)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 10) Sat Nov 29 2014 10:29:19 GMT+0100 (CET)
PASS : components::DateUtilsAPI::test_daysInMonth(row 10)
QDEBUG : components::DateUtilsAPI::test_daysInMonth(row 11) Mon Dec 29 2014 10:29:19 GMT+0100 (CET)
PASS : components::DateUtilsAPI::test_daysInMonth(row 11)
PASS : components::DateUtilsAPI::test_daysTo(row 0)
PASS : components::DateUtilsAPI::test_daysTo(row 1)
PASS : components::DateUtilsAPI::test_daysTo(row 2)
PASS : components::DateUtilsAPI::test_daysTo(row 3)
PASS : components::DateUtilsAPI::test_daysTo(row 4)
PASS : components::DateUtilsAPI::test_daysTo(row 5)
PASS : components::DateUtilsAPI::test_getInvalidDate()
PASS : components::DateUtilsAPI::test_getWeek(row 0)
PASS : components::DateUtilsAPI::test_getWeek(row 1)
PASS : components::DateUtilsAPI::test_getWeek(row 2)
PASS : components::DateUtilsAPI::test_getWeek(row 3)
PASS : components::DateUtilsAPI::test_getWeek(row 4)
PASS : components::DateUtilsAPI::test_leapYear(row 0)
PASS : components::DateUtilsAPI::test_leapYear(row 1)
PASS : components::DateU...

Read more...

Revision history for this message
Zsombor Egri (zsombi) wrote :

Yep, true. Automatic Date adjustment causes to set the date to March the 1st when the tests is executed on 29th of Feb 2014.

Changed in ubuntu-ui-toolkit:
status: New → Confirmed
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit at revision None, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.3 KiB)

This bug was fixed in the package ubuntu-ui-toolkit - 0.1.46+14.04.20140212-0ubuntu1

---------------
ubuntu-ui-toolkit (0.1.46+14.04.20140212-0ubuntu1) trusty; urgency=low

  [ Andrew Hayzen ]
  * Fixed text not aligned at vertical centre if the listitem height has
    changed dynamically. Fixed no removeItemAnimation if the listitem
    height has been set. (LP: #1263688, #1263682)

  [ CI bot ]
  * Trunk as is, for CI Train release.

  [ William Hua ]
  * Also update LANGUAGE when setLanguage is called for dynamic
    translation. (LP: #1263163). (LP: #1263163)

  [ Timo Jyrinki ]
  * A qtdeclarative5-private-dev packaging change adding a dependency on
    libqt5v8-5-private-dev has been backported to all Ubuntu versions
    now, so this workaround can now be dropped - building both against
    Qt 5.2 and 5.0.2 works.
  * Add #include for QDebug to fix Qt 5.2 build.

  [ Christian Dywan ]
  * Split build and install steps in debian/rules.
  * Use integer Date constructor in date picker tests for Qt 5.2.
  * Run unit_x11 test cases via Xvfb and address failures. (LP:
    #1258017, #1237812, #1242646)
  * Don't redirect output of the input file in itself.
  * Don't try to deploy non-existing qml and js files. (LP: #1259228)
  * Assert textField focus, button visibility and pressed after tapping
    clear.
  * Split documentation for previously group properties. (LP: #1266842)
  * Suppress errors to work-around font error messages. (LP: #1256999)
  * ListItems.Empty's default property needs to be data not children.
    (LP: #1190509)

  [ Pete Woods ]
  * Handle the unity-action-api quit signal. (LP: #1269409)

  [ Zsombor Egri ]
  * Date picker component. Provides full date and month only picking
    functionality.
  * DatePicker test case fix, setting the minimum limit to value that is
    earlier than the date value set. (LP: #1266515)
  * Fixing state restoration when nested dynamic component properties
    are restored. (LP: #1267039)
  * Removing obsolete functionality from QuickUtils. (LP: #1266707)
  * StateSaver failure with Repeater fixed. Indirectly fixes StateSaver
    with ListView and GridView. (LP: #1267900)
  * TabBar test case failure fix for Qt5.2. (LP: #1256930)
  * InverseMouseArea API test removed, being a duplicate of the other
    InverseMouseArea tests. Connecting to th eproper enabledChanged
    signal in InverseMouseArea resolves the warning in Qt5.2 stating
    enabledChanged was overwritten in QQuickMouseArea. (LP: #1266707)
  * Panel implementation for DatePicker. Presents the DatePicker either
    in a panel covering the OSK area or in a Popover, depending on the
    form factor and presence of input method provider.
  * Layout tests now wait for the currentLayout change completion. (LP:
    #1266707)
  * Extra QQmlEngine instance removed from plugin, which seemed to cause
    some race conditions with Qt5.2. As result UbuntuColors got
    transferred from context property into singleton object, Theme's
    palette creation delayed till its first access. (LP: #1266707)
  * DateUtils test failure fix. (LP: #1273893)

  [ Florian Boucault ]
  * Ubuntu UI Toolkit Gallery: reimplemented in a cleaner way the
    respo...

Read more...

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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