[Pkg-owncloud-maintainers] Bug#842451: owncloud-client: FTBFS the day it happens a time change (UtilityTest fails)
Santiago Vila
sanvila at debian.org
Sat Oct 29 11:20:50 UTC 2016
Package: src:owncloud-client
Version: 2.2.4+dfsg-1
Severity: important
Tags: patch
Dear maintainer:
I tried to build this package in stretch with "dpkg-buildpackage -A"
(which is what the "Arch: all" autobuilder would do to build it)
but it failed:
--------------------------------------------------------------------------------
[...]
debian/rules build-indep
dh build-indep --parallel --with sphinxdoc --with pkgkde_symbolshelper --with python3
dh_testdir -i -O--parallel
dh_update_autotools_config -i -O--parallel
debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<BUILDDIR>>/owncloud-client-2.2.4+dfsg'
dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DUNIT_TESTING=ON -DDEBIAN_VERSION=2.2.4+dfsg-1 -DPLUGIN_INSTALL_DIR=/usr/lib/x86_64-linux-gnu/qt5/plugins
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_INSTALL_PREFIX=/usr -DUNIT_TESTING=ON -DDEBIAN_VERSION=2.2.4\+dfsg-1 -DPLUGIN_INSTALL_DIR=/usr/lib/x86_64-linux-gnu/qt5/plugins
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
[... snipped ...]
22/36 Test #22: UtilityTest ......................***Failed 0.01 sec
********* Start testing of TestUtility *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 6.1.1 20160
724)
PASS : TestUtility::initTestCase()
PASS : TestUtility::testFormatFingerprint()
PASS : TestUtility::testOctetsToString()
QWARN : TestUtility::testLaunchOnStartup() QCoreApplication::applicationFilePath: Please instantiate the QApplication obj
ect first
PASS : TestUtility::testLaunchOnStartup()
PASS : TestUtility::testToCSyncScheme()
FAIL! : TestUtility::testDurationToDescriptiveString() Compared values are not the same
Actual (durationToDescriptiveString2(current.msecsTo(current.addDays(2).addSecs(23*60*60)))): "3 day(s)"
Expected (QString("2 day(s) 23 hour(s)")) : "2 day(s) 23 hour(s)"
Loc: [/<<BUILDDIR>>/owncloud-client-2.2.4+dfsg/test/testutility.cpp(98)]
PASS : TestUtility::testVersionOfInstalledBinary()
PASS : TestUtility::testTimeAgo()
PASS : TestUtility::cleanupTestCase()
Totals: 8 passed, 1 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestUtility *********
[...]
97% tests passed, 1 tests failed out of 36
Total Test time (real) = 12.00 sec
The following tests FAILED:
22 - UtilityTest (Failed)
Errors while running CTest
Makefile:64: recipe for target 'test' failed
make[2]: *** [test] Error 8
make[2]: Leaving directory '/<<BUILDDIR>>/owncloud-client-2.2.4+dfsg/obj-x86_64-linux-gnu'
dh_auto_test: make -j1 test ARGS+=-j1 returned exit code 2
debian/rules:13: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<BUILDDIR>>/owncloud-client-2.2.4+dfsg'
debian/rules:9: recipe for target 'build-indep' failed
make: *** [build-indep] Error 2
dpkg-buildpackage: error: debian/rules build-indep gave error exit status 2
--------------------------------------------------------------------------------
This happens because we are leaving Summer Time this night in Europe,
in less than 24 hours.
To reproduce, please try something like this:
TZ=Europe/Warsaw faketime "2016-10-29 02:30 UTC" dpkg-buildpackage -uc -us -A
One way to fix this would be to disable the failing test.
A more simple way is the patch below.
In either case, it would be nice to forward this upstream and remind them of
"Falsehoods programmers believe about time":
http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time
[ Note: I would report this as "serious" because it's a FTBFS, but official
autobuilders use TZ=Etc/UTC, so I understand this will never ever
happen in buildd.debian.org ].
Thanks.
--- a/debian/rules
+++ b/debian/rules
@@ -11,7 +11,7 @@ include /usr/share/dpkg/default.mk
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
mkdir obj-$(DEB_HOST_GNU_TYPE)/config
- XDG_CONFIG_HOME=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/config dh_auto_test --max-parallel=1
+ XDG_CONFIG_HOME=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/config TZ=Etc/UTC dh_auto_test --max-parallel=1
rm -r obj-$(DEB_HOST_GNU_TYPE)/config
else
@echo "** tests disabled"
More information about the Pkg-owncloud-maintainers
mailing list