Some unit tests fail when run under an sbuild chroot

Bug #1592475 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-settings (Ubuntu)
Fix Released
Undecided
Olivier Tilloy

Bug Description

(similar to bug #1567294)

This is because in an sbuild chroot HOME is set to /sbuild-nonexistent.

16:15:06 Running tests...
16:15:06 /usr/bin/ctest --force-new-ctest-process -j1
16:15:07 Test project /��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/obj-i686-linux-gnu
16:15:07 Start 1: tst-plugins
16:15:07 1/21 Test #1: tst-plugins ...................... Passed 0.07 sec
16:15:07 Start 2: tst-arguments
16:15:07 2/21 Test #2: tst-arguments .................... Passed 0.01 sec
16:15:07 Start 3: python3
16:15:10 3/21 Test #3: python3 .......................... Passed 3.22 sec
16:15:10 Start 4: test_push_helper
16:15:10 4/21 Test #4: test_push_helper .................***Failed 0.53 sec
16:15:10 test_available_and_downloading (__main__.PushHelperTests)
16:15:10 check that available_cb when available and d'loading just returns ... ok
16:15:10 test_available_not_downloading (__main__.PushHelperTests)
16:15:10 check that available_cb when available and not downloading ... ok
16:15:10 test_downloaded_cb (__main__.PushHelperTests)
16:15:10 check that on download, notify is set to True and quit is called ... ok
16:15:10 test_failed_cb (__main__.PushHelperTests)
16:15:10 check that on failure, notify is set to False and quit is called ... ok
16:15:10 test_not_available (__main__.PushHelperTests)
16:15:10 check that available_cb quits when not available ... ok
16:15:10 test_quit_no_notify (__main__.PushHelperTests)
16:15:10 Check that quit withlooks sane ... ok
16:15:10 test_quit_with_notify (__main__.PushHelperTests)
16:15:10 Check that quit withlooks sane ... ok
16:15:10 test_system_image_run (__main__.PushHelperTests)
16:15:10 Check that run looks sane ... ok
16:15:10 test_update_broadcast (__main__.PushHelperTests)
16:15:10 Default system-update broadcast. ... Traceback (most recent call last):
16:15:10 File "/��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/tests/../push-helper/software_updates_helper.py", line 187, in <module>
16:15:10 logdir = save_cache_path("ubuntu-system-settings")
16:15:10 File "/usr/lib/python3/dist-packages/xdg/BaseDirectory.py", line 81, in save_cache_path
16:15:10 os.makedirs(path)
16:15:10 File "/usr/lib/python3.5/os.py", line 231, in makedirs
16:15:10 makedirs(head, mode, exist_ok)
16:15:10 File "/usr/lib/python3.5/os.py", line 231, in makedirs
16:15:10 makedirs(head, mode, exist_ok)
16:15:10 File "/usr/lib/python3.5/os.py", line 241, in makedirs
16:15:10 mkdir(name, mode)
16:15:10 PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent'
16:15:10 ERROR
16:15:10 test_valid_json (__main__.PushHelperTests)
16:15:10 Handle a valid json input. ... Traceback (most recent call last):
16:15:10 File "/��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/tests/../push-helper/software_updates_helper.py", line 187, in <module>
16:15:10 logdir = save_cache_path("ubuntu-system-settings")
16:15:10 File "/usr/lib/python3/dist-packages/xdg/BaseDirectory.py", line 81, in save_cache_path
16:15:10 os.makedirs(path)
16:15:10 File "/usr/lib/python3.5/os.py", line 231, in makedirs
16:15:10 makedirs(head, mode, exist_ok)
16:15:10 File "/usr/lib/python3.5/os.py", line 231, in makedirs
16:15:10 makedirs(head, mode, exist_ok)
16:15:10 File "/usr/lib/python3.5/os.py", line 241, in makedirs
16:15:10 mkdir(name, mode)
16:15:10 PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent'
16:15:10 ERROR
16:15:10
16:15:10 ======================================================================
16:15:10 ERROR: test_update_broadcast (__main__.PushHelperTests)
16:15:10 Default system-update broadcast.
16:15:10 ----------------------------------------------------------------------
16:15:10 Traceback (most recent call last):
16:15:10 File "/��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/obj-i686-linux-gnu/tests/test_push_helper.py", line 75, in test_update_broadcast
16:15:10 with open(output_f, 'r') as fd:
16:15:10 FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tests2rh2_kwtpush-helper/bcast_out'
16:15:10
16:15:10 ======================================================================
16:15:10 ERROR: test_valid_json (__main__.PushHelperTests)
16:15:10 Handle a valid json input.
16:15:10 ----------------------------------------------------------------------
16:15:10 Traceback (most recent call last):
16:15:10 File "/��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/obj-i686-linux-gnu/tests/test_push_helper.py", line 84, in test_valid_json
16:15:10 with open(output_f, 'r') as fd:
16:15:10 FileNotFoundError: [Errno 2] No such file or directory: '/tmp/testszi1fuq1kpush-helper/valid_json_out'
16:15:10
16:15:10 ----------------------------------------------------------------------
16:15:10 Ran 10 tests in 0.205s
16:15:10
16:15:10 FAILED (errors=2)
16:15:10
16:15:10 Start 5: testmouse
16:15:20 5/21 Test #5: testmouse ........................ Passed 9.09 sec
16:15:20 Start 6: testupdate
16:15:30 6/21 Test #6: testupdate ....................... Passed 10.62 sec
16:15:30 Start 7: testclick_update
16:15:39 7/21 Test #7: testclick_update ................. Passed 9.01 sec
16:15:39 Start 8: testsystem_update
16:15:45 8/21 Test #8: testsystem_update ................ Passed 5.63 sec
16:15:45 Start 9: testglobal
16:15:49 9/21 Test #9: testglobal ....................... Passed 4.52 sec
16:15:49 Start 10: testupdates
16:15:55 10/21 Test #10: testupdates ...................... Passed 6.02 sec
16:15:55 Start 11: testnoauthentication
16:15:59 11/21 Test #11: testnoauthentication ............. Passed 4.04 sec
16:15:59 Start 12: tst-trust-store-model
16:16:00 12/21 Test #12: tst-trust-store-model ............ Passed 0.16 sec
16:16:00 Start 13: tst-clickapiclient
16:16:06 13/21 Test #13: tst-clickapiclient ...............***Failed 6.13 sec
16:16:06 ********* Start testing of TstClickApiClient *********
16:16:06 Config: Using QtTest library 5.5.1, Qt 5.5.1 (i386-little_endian-ilp32 shared (dynamic) release build; by GCC 5.3.1 20160413)
16:16:06 FAIL! : TstClickApiClient::initTestCase() 'readyReadStandardOutputSpy.wait()' returned FALSE. ()
16:16:06 Loc: [/��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/tests/plugins/system-update/mockclickservertestcase.h(18)]
16:16:06 PASS : TstClickApiClient::cleanupTestCase()
16:16:06 Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted
16:16:06 ********* Finished testing of TstClickApiClient *********
16:16:06
16:16:06 Start 14: tst-clickupdatemetadata
16:16:11 14/21 Test #14: tst-clickupdatemetadata ..........***Failed 4.92 sec
16:16:11 ********* Start testing of TstClickUpdateMetadata *********
16:16:11 Config: Using QtTest library 5.5.1, Qt 5.5.1 (i386-little_endian-ilp32 shared (dynamic) release build; by GCC 5.3.1 20160413)
16:16:11 FAIL! : TstClickUpdateMetadata::initTestCase() 'readyReadStandardOutputSpy.wait()' returned FALSE. ()
16:16:11 Loc: [/��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/tests/plugins/system-update/mockclickservertestcase.h(18)]
16:16:11 PASS : TstClickUpdateMetadata::cleanupTestCase()
16:16:11 Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted
16:16:11 ********* Finished testing of TstClickUpdateMetadata *********
16:16:11
16:16:11 Start 15: tst-clickupdatechecker
16:16:16 15/21 Test #15: tst-clickupdatechecker ...........***Failed 5.00 sec
16:16:16 ********* Start testing of TstClickUpdateChecker *********
16:16:16 Config: Using QtTest library 5.5.1, Qt 5.5.1 (i386-little_endian-ilp32 shared (dynamic) release build; by GCC 5.3.1 20160413)
16:16:16 FAIL! : TstClickUpdateChecker::initTestCase() 'readyReadStandardOutputSpy.wait()' returned FALSE. ()
16:16:16 Loc: [/��BUILDDIR��/ubuntu-system-settings-0.4+16.10.20160606+xenial568bzr1691/tests/plugins/system-update/mockclickservertestcase.h(18)]
16:16:16 PASS : TstClickUpdateChecker::cleanupTestCase()
16:16:16 Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted
16:16:16 ********* Finished testing of TstClickUpdateChecker *********
16:16:16
16:16:16 Start 16: tst-updatestore
16:16:16 16/21 Test #16: tst-updatestore .................. Passed 0.06 sec
16:16:16 Start 17: tst-updatemodel
16:16:16 17/21 Test #17: tst-updatemodel .................. Passed 0.04 sec
16:16:16 Start 18: tst-updatepluginhelpers
16:16:16 18/21 Test #18: tst-updatepluginhelpers .......... Passed 0.02 sec
16:16:16 Start 19: tst-bluetooth
16:16:26 19/21 Test #19: tst-bluetooth .................... Passed 10.22 sec
16:16:26 Start 20: tst-bluetooth-devicemodel
16:16:30 20/21 Test #20: tst-bluetooth-devicemodel ........ Passed 3.76 sec
16:16:30 Start 21: tst-bluetooth-device
16:16:43 21/21 Test #21: tst-bluetooth-device ............. Passed 13.46 sec
16:16:43
16:16:43 81% tests passed, 4 tests failed out of 21
16:16:43
16:16:43 Total Test time (real) = 96.57 sec
16:16:43
16:16:43 The following tests FAILED:
16:16:43 Errors while running CTest
16:16:43 4 - test_push_helper (Failed)
16:16:43 13 - tst-clickapiclient (Failed)
16:16:43 14 - tst-clickupdatemetadata (Failed)
16:16:43 15 - tst-clickupdatechecker (Failed)

Related branches

Olivier Tilloy (osomon)
Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings - 0.4+16.10.20160722.1-0ubuntu1

---------------
ubuntu-system-settings (0.4+16.10.20160722.1-0ubuntu1) yakkety; urgency=medium

  [ Ken VanDine ]
  * Added missing depends on qtdeclarative5-ubuntu-history0.1, qml-
    module-qtcontacts and qtdeclarative5-ubuntu-keyboard-extensions0.1
  * Ported to use Slots layout and updated visuals (LP: #1596529)

  [ Ken VanDine, jonas-drange ]
  * new module SystemSettings.ListItems

  [ Olivier Tilloy ]
  * Fix unit tests when run under an sbuild chroot. (LP: #1592475)

  [ jonas-drange ]
  * Do runtime check of address list size.

 -- Ken VanDine <email address hidden> Fri, 22 Jul 2016 14:39:12 +0000

Changed in ubuntu-system-settings (Ubuntu):
status: In Progress → 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.