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 586291 - Subsequent tests fail when first one registers callback handlers
Subsequent tests fail when first one registers callback handlers
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: ldtprunner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nagappan Alagappan
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2009-06-18 16:59 UTC by Armin Burgmeier
Modified: 2009-07-29 01:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
First test script (78 bytes, application/octet-stream)
2009-06-18 19:43 UTC, Armin Burgmeier
  Details
Second test script (78 bytes, application/octet-stream)
2009-06-18 19:43 UTC, Armin Burgmeier
  Details
XML file to run using ldtprunner (259 bytes, text/xml)
2009-06-18 19:45 UTC, Armin Burgmeier
  Details
Try with this patch (1.21 KB, patch)
2009-07-27 22:05 UTC, Nagappan Alagappan
committed Details | Review

Description Armin Burgmeier 2009-06-18 16:59:54 UTC
When there are two test scripts both of which register a callback on window creation for the same window title, and both scripts are run via ldtprunner using a corresponding XML file, then the registration of the callback in the second script causes an error, and the test fails therefore.

Traceback (most recent call last):
  • File "/usr/local/bin/ldtprunner", line 460 in executescript
    execfile (scriptName, scriptglobal)
  • File "bar.py", line 6 in <module>
    onwindowcreate('Foobar', 'error_cb')
  • File "/usr/lib/python2.6/site-packages/ldtp.py", line 1994 in onwindowcreate
    _callbackFunctions [windowTitle][1].exit ()
AttributeError: 'int' object has no attribute 'exit'

Comment 1 Nagappan Alagappan 2009-06-18 19:07:19 UTC
Thanks for the bug report. Can you please upload a test script to verify this scenario ?

Thanks
Comment 2 Armin Burgmeier 2009-06-18 19:43:15 UTC
Created attachment 136940 [details]
First test script
Comment 3 Armin Burgmeier 2009-06-18 19:43:55 UTC
Created attachment 136941 [details]
Second test script
Comment 4 Armin Burgmeier 2009-06-18 19:45:20 UTC
Created attachment 136942 [details]
XML file to run using ldtprunner

Put all the three files into the same directory and run test.xml via ldtprunner to reproduce the problem.
Comment 5 Nagappan Alagappan 2009-07-27 22:05:39 UTC
Created attachment 139330 [details] [review]
Try with this patch

Please let me know, this patch fixes the issue ? Apologize for the long delay in responding to this bug :)

Thanks
Comment 6 Murray Cumming 2009-07-27 22:32:53 UTC
Armin, would this fix any particular problem with our ldtp test scripts in Glom?
Comment 7 Armin Burgmeier 2009-07-29 00:33:28 UTC
Nagappan: Yes, it seems to fix the problem. Thanks.

Murray: No, glom does not use onwindowcreate anymore. We could give it another try now, as it might be better than polling via guiexist(). We would then have to find a way to properly communicate with the mean thread from the callback, I guess.
Comment 8 Nagappan Alagappan 2009-07-29 01:12:50 UTC
Based on the last comment marking this bug as resolved fixed. Thanks for the bug report.