Bug 1075088 - [ PATCH ] - Enable tests in %check
Summary: [ PATCH ] - Enable tests in %check
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Shea
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1024729
TreeView+ depends on / blocked
 
Reported: 2014-03-11 13:20 UTC by Alexander Todorov
Modified: 2014-03-24 18:08 UTC (History)
6 users (show)

Fixed In Version: anaconda-21.28-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-24 18:08:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
PATCH (742 bytes, patch)
2014-03-11 13:20 UTC, Alexander Todorov
no flags Details | Diff
New patch using make check (813 bytes, patch)
2014-03-12 10:17 UTC, Alexander Todorov
no flags Details | Diff
execute make check in %check and add more BuildRequires for pylint (1.12 KB, patch)
2014-03-12 14:34 UTC, Alexander Todorov
no flags Details | Diff
Add python-mock and patch against anaconda.spec.in (1.62 KB, patch)
2014-03-18 10:08 UTC, Alexander Todorov
no flags Details | Diff

Description Alexander Todorov 2014-03-11 13:20:42 UTC
Created attachment 873123 [details]
PATCH

Version-Release number of selected component (if applicable):
anaconda-21.26-1.fc21.src.rpm

Comment 1 David Shea 2014-03-11 14:01:03 UTC
Wouldn't it make more sense to run all the tests with make check?

Comment 2 Alexander Todorov 2014-03-12 10:07:40 UTC
Hi David,
didn't see the make check target. I will rework the patch.  I tried to run it and this is what I got (plus a few more Buildrequires). 


$ cat tests/test-suite.log 
==========================================
   anaconda 21.26: tests/test-suite.log
==========================================

# TOTAL: 7
# PASS:  5
# SKIP:  1
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: pylint/runpylint
======================

pylint reports the following issues:
************* Module ../scripts/makeupdates
F0401:711,4: get_rpm_from_Koji_thread: Unable to import 'koji'
************* Module ../pyanaconda/network.py
I0011:709,0: : Locally disabling E1101
W1201:1118,20: apply_kickstart_from_pre_section: Specify string format arguments as logging function parameters
************* Module ../pyanaconda/anaconda.py
F0401:164,8: Anaconda.dumpState: Unable to import 'meh'
F0401:165,8: Anaconda.dumpState: Unable to import 'meh.dump'
************* Module ../pyanaconda/rescue.py
F0401: 46,0: : Unable to import 'meh.ui.text'
************* Module ../anaconda
I0011:398,0: : Locally disabling W0621
I0011:467,0: : Locally disabling F0401
I0011:723,0: : Locally disabling W0611
F0401: 39,4: : Unable to import 'coverage'
************* Module ../pyanaconda/exception.py
I0011:176,0: : Locally disabling W0702
F0401: 24,0: : Unable to import 'meh'
F0401: 25,0: : Unable to import 'meh.handler'
F0401: 26,0: : Unable to import 'meh.dump'
E1002: 62,4: AnacondaExceptionHandler.run_handleException: Use of super on an old style class
E1002: 74,4: AnacondaExceptionHandler.handleException: Use of super on an old style class
E1002: 74,4: AnacondaExceptionHandler.handleException: Use of super on an old style class
E1101: 98,12: AnacondaExceptionHandler.handleException: Instance of 'AnacondaExceptionHandler' has no 'intf' member
E1101:168,66: AnacondaExceptionHandler.postWriteHook: Instance of 'AnacondaExceptionHandler' has no 'exnFile' member
E1101:169,32: AnacondaExceptionHandler.postWriteHook: Instance of 'AnacondaExceptionHandler' has no 'exnFile' member
E1101:171,69: AnacondaExceptionHandler.postWriteHook: Instance of 'AnacondaExceptionHandler' has no 'exnFile' member
E1101:264,4: initExceptionHandling: Instance of 'AnacondaExceptionHandler' has no 'install' member
************* Module ../pyanaconda/ui/tui/__init__.py
F0401: 35,0: : Unable to import 'meh.ui.text'
************* Module ../tests/lib/translatepo.py
F0401: 30,4: : Unable to import 'polib'
ERROR:root:Could not find any typelib for Keybinder
************* Module ../pyanaconda/ui/gui/__init__.py
I0011:223,0: : Locally disabling W0221
************* Module ../pyanaconda/ui/gui/__init__.py
F0401: 22,0: : Unable to import 'meh.ui.gui'
************* Module ../pyanaconda/packaging/dnfpayload.py
F0401: 43,4: : Unable to import 'dnf'
F0401: 44,4: : Unable to import 'dnf.exceptions'
F0401: 45,4: : Unable to import 'dnf.repo'
F0401: 46,4: : Unable to import 'dnf.callback'
E1002:118,4: PayloadRPMDisplay.__init__: Use of super on an old style class
E1101:125,21: PayloadRPMDisplay.event: Instance of 'PayloadRPMDisplay' has no 'PKG_INSTALL' member
E1101:135,23: PayloadRPMDisplay.event: Instance of 'PayloadRPMDisplay' has no 'TRANS_POST' member

SKIP: storage/run_storage_tests.py
==================================

You must be root to run the storage tests; skipping.


Does the pylint section look OK or I'm missing some requirements (looking at the import errors) ?

Comment 3 Alexander Todorov 2014-03-12 10:09:14 UTC
Another question: is the test-suite.log file available for download from Koji in case one needs to investigate failures ? If not we have to redirect all output to stderr

Comment 4 Alexander Todorov 2014-03-12 10:17:22 UTC
Created attachment 873422 [details]
New patch using make check

With this patch the pylint check fails which ultimately halts the anaconda build.

Comment 5 Martin Kolman 2014-03-12 13:33:36 UTC
Do we really want to run the PyLint check during build ? Considering how long it runs (even  though it is multi-threaded), the number of dependencies it requires & the number false positives that still crop up.

Comment 6 Martin Kolman 2014-03-12 13:35:03 UTC
On the other hand if it was not build-blocking and the log could be downloaded from Koji, it might be useful.

Comment 7 David Shea 2014-03-12 13:48:30 UTC
All the pylint failures in comment 2 are missing buildrequires. If you want to run checks with the build, I say we should include pylint, since pylint and the addons we've written for it are currently the most extensive checking we do for the anaconda code.

If you run make check with VERBOSE=1 it should print the output of test-suite.log

Comment 8 Alexander Todorov 2014-03-12 14:34:10 UTC
Created attachment 873586 [details]
execute make check in %check and add more BuildRequires for pylint

Comment 9 David Shea 2014-03-17 19:42:09 UTC
python-mock also needs to be in the buildrequires for the unit tests. Other than that it looks like everything is there. Just make the patch against anaconda.spec.in instead of anaconda.spec.

Comment 10 Alexander Todorov 2014-03-18 10:08:32 UTC
Created attachment 875850 [details]
Add python-mock and patch against anaconda.spec.in

Btw I started getting the following error with anaconda-21.27-1.fc21 which I didn't see before:

pylint reports the following issues:
error: XDG_RUNTIME_DIR not set in the environment.


The test system isn't running X server.

Comment 11 David Shea 2014-03-18 13:33:32 UTC
Yeah, I started seeing that too. Fixed in commit 380570aeebbe860e1a0c69374e203e8f6a5c32ba

Comment 12 David Shea 2014-03-18 18:05:21 UTC
Copied the patch to anaconda-patches to see if anyone else has any comments.

Comment 13 David Shea 2014-03-19 13:51:11 UTC
I just noticed the hard-coded python-blivet version, so I went ahead and changed your patch to move that (and the other hard-coded version that was already there) into a macro. Pushed as e84068c658a7cdadf620e97ab1c059e27924e8d4.

Comment 14 David Shea 2014-03-24 18:08:22 UTC
Reverted the commit. We did not find %check failures blocking the build to be particularly helpful.


Note You need to log in before you can comment on or make changes to this bug.