Skip to content

Fix tests on Qt5 - #265

Merged
corranwebster merged 15 commits into
feature/qt5-v3from
fix/qt5-v3-CI-tests
Mar 24, 2017
Merged

corranwebster merged 15 commits into
feature/qt5-v3from
fix/qt5-v3-CI-tests

Conversation

@corranwebster

Copy link
Copy Markdown
Contributor

Breaking out into separate PR to reduce noise. We are at point of experimentation for what works and doesn't in Travis CI environment.

@codecov-io

codecov-io commented Mar 15, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #265 into feature/qt5-v3 will increase coverage by 0.06%.
The diff coverage is 71.42%.

@@                Coverage Diff                 @@
##           feature/qt5-v3     #265      +/-   ##
==================================================
+ Coverage            33.2%   33.26%   +0.06%     
==================================================
  Files                 454      454              
  Lines               25382    25385       +3     
  Branches             3817     3818       +1     
==================================================
+ Hits                 8428     8445      +17     
+ Misses              16577    16565      -12     
+ Partials              377      375       -2
Impacted Files Coverage Δ
pyface/ui/qt4/image_cache.py 100% <100%> (ø) ⬆️
pyface/ui/qt4/directory_dialog.py 92.59% <100%> (ø) ⬆️
pyface/ui/qt4/util/modal_dialog_tester.py 88.52% <33.33%> (-1.4%) ⬇️
pyface/qt/QtSvg.py 100% <0%> (+33.33%) ⬆️
pyface/qt/QtCore.py 91.66% <0%> (+37.49%) ⬆️
pyface/qt/QtGui.py 100% <0%> (+50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0993b8...cfc488b. Read the comment docs.

@pankajp

pankajp commented Mar 15, 2017

Copy link
Copy Markdown
Contributor

Copying comment from previous PR in case you missed:

The tests skipped due to segfaults do not segfault on my machine's distro supplied pyqt5, but only on the wheels on pypi, i suspect some compilation issue or so, though one segfault in traitsui table_editor was definitely buggy code: enthought/traitsui@ae05ee9

Travis's docker containers are available for testing locally https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image

Also, in a previous attempt to debug, valgrind found a jump depending on unintialized value in some font codepath when the segfaults occured, and the segfault happens in QPushButton.text() method when the modal dialog tester attempts to click a button in the dialog as reported by faulthandler, found by ipython tracing and python3 -X faulthandler

@corranwebster

Copy link
Copy Markdown
Contributor Author

I had managed to replicate a codepath via which I was getting segfaults in the text() method on my VM, but the careful use of GuiTestAssistant and explicit tear down of created components seems to have solved that on my VM, but not on Travis CI 😞

I'm aware of the ability to run docker images locally, but I don't have docker and associated infrastructure set up on my machine, and so it's more efficient time-wise just to work in a branch than to go through setting up the infrastructure.

@corranwebster

Copy link
Copy Markdown
Contributor Author

Based on above, and some judicious re-running of tests, I think there are two issues:

  • click_widget is suspect under PyQt5 when used with the confirmation dialog (possibly because of interactions with underlying UI dialog). We get a repeatable segfault every time in these situations on Travis CI.
  • open_and_wait is suspect under Qt5 (and possibly Qt4 as well). Errors are replicable, but not on every run. This would be consistent with some sort of race condition, accessing something from the wrong thread, or any of the usual issues that you can get from concurrency.

It is possible that the click_widget problem is related to the concurrency issues, but it is also possibly just a bug in the Qt or PyQt versions we get on Travis CI.

Proposal: for now, with Qt5 we just disable the ModalDialogTester until we can get it working reliably on Qt5. The GUI test assistants could likely do with an overhaul in any case.

@corranwebster
corranwebster merged commit 724f83d into feature/qt5-v3 Mar 24, 2017
@corranwebster
corranwebster deleted the fix/qt5-v3-CI-tests branch March 24, 2017 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants