After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698548 - Speed up make check
Speed up make check
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-22 09:06 UTC by Simon Feltman
Modified: 2017-03-27 14:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Remove TestMainLoop.test_concurrency (2.02 KB, patch)
2017-03-21 12:42 UTC, Christoph Reiter (lazka)
committed Details | Review
tests: Reduce usage of timeout_add() and sleep() (15.88 KB, patch)
2017-03-21 12:43 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Simon Feltman 2013-04-22 09:06:05 UTC
There are a number of unittests which use sleeps or timeouts for testing various things (loops, io, subprocesses). While some of this is obviously necessary it would be good to review where they are used and see if anything can be tightened up.

The big one for me at the moment is "test_overrides_gtk.TestGtk.test_dialogs" because it causes my NAS to spin up.
Comment 1 Christoph Reiter (lazka) 2017-03-21 12:42:43 UTC
Created attachment 348404 [details] [review]
tests: Remove TestMainLoop.test_concurrency

The code containing the bug no longer exists and the test doesn't do
what it says. The thread never gets terminated and it doesn't
assert anything. And I'm not sure what it should assert.

For the corresponding bug see
    https://bugzilla.gnome.org/show_bug.cgi?id=663068

While the test doesn't hurt, it adds half a second wait time
to the test suite.
Comment 2 Christoph Reiter (lazka) 2017-03-21 12:43:08 UTC
Created attachment 348405 [details] [review]
tests: Reduce usage of timeout_add() and sleep()

* Instead of waiting for a fixed time, use a timeout and stop the main
  loop right after the test has succeeded.
* Replace time.sleep to sync processes with os.pipe communication
* Chain idle sources instead of using multiple timeout sources
* Replace sleeps with unbufferd communication
Comment 3 Christoph Reiter (lazka) 2017-03-21 12:45:20 UTC
With both patches the test time is reduced by ~4sec (it's about 5-6sec in total now)
Comment 4 Christoph Reiter (lazka) 2017-03-27 14:41:08 UTC
My guess for the dialogs test being slow would be the filechooser fetching some info regarding the mount points. They are not slow here.