[Sugar-devel] test automation
I am keen to explore ways to improve the quality and delivery time of code. Is there any work being done to automate testing of code? We recently had some university students working with us to create an activity [1], and they were using the Robot Framework [2]. Sridhar [1] https://dev.laptop.org.au/issues/634 [2] https://code.google.com/p/robotframework/ Sridhar Dhanapalan Engineering Manager One Laptop per Child Australia ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] test automation
Hello, in the last few days I've been experimenting with dogtail https://fedorahosted.org/dogtail/ So far I'm using it in the buildbot to run and stop all the installed activities. http://git.sugarlabs.org/sugar-build/sugar-build/blobs/master/tests/shell.py It's quite promising but apparently a bit buggy. Hopefully I can figure out how to make it reliable enough. On 1 July 2012 08:33, Sridhar Dhanapalan srid...@laptop.org.au wrote: I am keen to explore ways to improve the quality and delivery time of code. Is there any work being done to automate testing of code? We recently had some university students working with us to create an activity [1], and they were using the Robot Framework [2]. Sridhar [1] https://dev.laptop.org.au/issues/634 [2] https://code.google.com/p/robotframework/ Sridhar Dhanapalan Engineering Manager One Laptop per Child Australia ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mini adventure on the XS
On Sat, Jun 30, 2012 at 10:53:56PM -0700, Sameer Verma wrote: On Sat, Jun 30, 2012 at 11:32 AM, Sameer Verma sve...@sfsu.edu wrote: Oh, I forgot to mention this: Children in Bhagmalpur are fluent in Hindi (reading, writing and speaking), but their English is quite poor. Yet, they've stumbled along on the English localization of Sugar. Some time ago, two kids accidentally switched Sugar to Spanish, and...for whatever reason, they just kept going. Now we have two kids who use Sugar in Spanish, with no prior knowledge of Spanish, and are still able to navigate the UI and get things done. Go figure :-) That is a fascinating anecdote. Could it be that they just associate a unit of latin symbols with an action or that they have a vague idea that this is spanish? Would it be interesting to show them some kindergarten word examples like 'one, two, three, boy, girl'? Maybe the makings of a new OLPC-type literacy experiment? -- | .''`. == Debian GNU/Linux ==.| http://kevix.myopenid.com..| | : :' : The Universal OS| mysite.verizon.net/kevin.mark/.| | `. `' http://www.debian.org/.| http://counter.li.org [#238656]| |___`-Unless I ask to be CCd,.assume I am subscribed._| knghtbrd but one sort per tab and none per list is arguably better than O(n + n**2) per tab and O(n**2) per list. knghtbrd OMG, someone shoot me. Coderjoe2 ? knghtbrd I can't believe I just used the big goose-egg to explain why my way is probably best in the long run. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] test automation
There are a few unit and system tests scattered throughout the Sugar source code tree. I have some of them checked out at the office, but I do not recall where they all are at home. Personally I have been caught with a bit of a Catch-22: I need to write automation to save time doing manual tests, but I have so many manual tests to run that I have not had much time to write automation. I also have looked at Dogtail as well as a few other utilities, although I did not get as far along as Daniel did. When using the AT-SPI tree browsers included with Dogtail and a few other programs, more often than not I did not see anything. It was unclear though if I was enabling AT-SPI correctly or if Dogtail was falsely thinking that it was turned on properly. This setting differs between environments [1], and X has to be restarted to make it take effect. I may have been hampered a bit by trying to find a toolkit with a graphical browser (to find controls without inspecting source code) during the GTK2 to GTK3 transition. Although AT-SPI is not GTK-specific, I still ran into a lot of compilation/library mismatch issues. There is a ticket open about getting AT-SPI working in Sugar, although we may wish to still explore other automation methods. [2] [1] https://lists.ubuntu.com/archives/ubuntu-mozillateam-bugs/2012-January/127860.html [2] http://bugs.sugarlabs.org/ticket/3221 On Sun, Jul 1, 2012 at 3:33 AM, Daniel Narvaez dwnarv...@gmail.com wrote: Hello, in the last few days I've been experimenting with dogtail https://fedorahosted.org/dogtail/ So far I'm using it in the buildbot to run and stop all the installed activities. http://git.sugarlabs.org/sugar-build/sugar-build/blobs/master/tests/shell.py It's quite promising but apparently a bit buggy. Hopefully I can figure out how to make it reliable enough. On 1 July 2012 08:33, Sridhar Dhanapalan srid...@laptop.org.au wrote: I am keen to explore ways to improve the quality and delivery time of code. Is there any work being done to automate testing of code? We recently had some university students working with us to create an activity [1], and they were using the Robot Framework [2]. Sridhar [1] https://dev.laptop.org.au/issues/634 [2] https://code.google.com/p/robotframework/ Sridhar Dhanapalan Engineering Manager One Laptop per Child Australia ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] test automation
On 1 July 2012 14:31, Samuel Greenfeld greenf...@laptop.org wrote: It was unclear though if I was enabling AT-SPI correctly or if Dogtail was falsely thinking that it was turned on properly. This setting differs between environments [1], and X has to be restarted to make it take effect. Things has changed quite a bit recently. It was pretty easy to get it to work on Fedora 17. Hopefully Ubuntu will package dogtail 0.8.0 at some point too. These days I think all you need is GTK_MODULES=gail:atk-bridge in the environement, both for dogtail and the applications. No X restarting. I may have been hampered a bit by trying to find a toolkit with a graphical browser (to find controls without inspecting source code) during the GTK2 to GTK3 transition. Although AT-SPI is not GTK-specific, I still ran into a lot of compilation/library mismatch issues. sniff (part of dogtail) works from inside a sugar terminal, assuming GTK_MODULES=gail:atk-bridge. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mini adventure on the XS
On Sun, Jul 1, 2012 at 1:53 AM, Sameer Verma sve...@sfsu.edu wrote: Oh, I forgot to mention this: Children in Bhagmalpur are fluent in Hindi (reading, writing and speaking), but their English is quite poor. Yet, they've stumbled along on the English localization of Sugar. Some time ago, two kids accidentally switched Sugar to Spanish, and...for whatever reason, they just kept going. Now we have two kids who use Sugar in Spanish, with no prior knowledge of Spanish, and are still able to navigate the UI and get things done. Go figure :-) Our Hindi L10n of Sugar is actually in pretty good shape, althouhg it coudl use some more work to be complete. If it's not localized, they'd get the English strings, so no worse than the current situation. http://translate.sugarlabs.org/hi/ It is also easily installed via language pack on XO laptops. I'd be happy to offer help if you tell me what Sugar version they are using. (We haven't been generating 0.96 langpacks yet, but we can.) http://translate.sugarlabs.org/langpacks/ cjl ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] test automation
On Sun, Jul 1, 2012 at 12:30 PM, Daniel Narvaez dwnarv...@gmail.com wrote: On 1 July 2012 14:31, Samuel Greenfeld greenf...@laptop.org wrote: It was unclear though if I was enabling AT-SPI correctly or if Dogtail was falsely thinking that it was turned on properly. This setting differs between environments [1], and X has to be restarted to make it take effect. Things has changed quite a bit recently. It was pretty easy to get it to work on Fedora 17. Hopefully Ubuntu will package dogtail 0.8.0 at some point too. These days I think all you need is GTK_MODULES=gail:atk-bridge in the environement, both for dogtail and the applications. No X restarting. I tried dogtail 0.7 (GTK2) and 0.8 (released last month with GTK3 support) on Fedora 16. I did not know you could force ATK to be enabled with an environment variable though. I will try that this week. If getting AT-SPI support is that easy perhaps we should talk with the Orca team about adopting their screen reader. I may have been hampered a bit by trying to find a toolkit with a graphical browser (to find controls without inspecting source code) during the GTK2 to GTK3 transition. Although AT-SPI is not GTK-specific, I still ran into a lot of compilation/library mismatch issues. sniff (part of dogtail) works from inside a sugar terminal, assuming GTK_MODULES=gail:atk-bridge. I was trying to use sniff both in the Terminal activity inside of Sugar and outside in GNOME. But these tests were done without this environment variable. I also tried Accerciser ( https://live.gnome.org/Accerciser/ ). Dogtail seems to be the test framework we're both looking at, possibly because Redhat helps maintain it. Other AT-SPI frameworks include LDTP ( http://ldtp.freedesktop.org/wiki ) and Mago ( http://mago.ubuntu.com/ ; uses LDTP). Graphical (non AT-SPI) test frameworks also exist. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [RELEASE] Etoys 5.0.2408
This is a bugfix release for 5.0. == Sources == http://download.sugarlabs.org/sources/sucrose/glucose/etoys/etoys-5.0.2408.tar.gz == Changes == * Updated translation: bn, da, de, es, hy, nl, pt, sv, zh_CN * Added translations: hus, en_GB * Sugar: fix choosing objects from external media instead of Journal, and handle non-ASCII filenames * make saved projects that do not use new features more likely to work in earlier versions of Etoys (SQ-1095) * adds a preference, 'singlePixelNib', so the smallest brush will draw with a one-pixel-wide nib (SQ-1004) * fix dropping a GIF image into Etoys (SQ-1094) * mark month names and weekday names for translation (SQ-1102) * some ScratchConnect fixes from Koji Yokokawa (SQ-1085, SQ-1086, SQ-1087) * better comment in POT for translators about the meta-phrases 'Language-Name' and 'Language-Direction' * Move ScratchClient to 'Tools' category * Revert addition of graph-location watcher items to Morph's extras menu. The viewer is a better way to get watchers. * minor fixes (SQ-811, SQ-869, SQ-1036, SQ-1045, SQ-1051, SQ-1088, SQ-1096, SQ-1099) - Bert - (for the Etoys team) ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH ImageViewer] GTK3 Port
Signed-off-by: Agustin Zubiaga a...@sugarlabs.org Signed-off-by: Flavio Danesse fdane...@gmail.com --- ImageView.py | 123 +--- ImageViewerActivity.py | 75 ++--- ProgressDialog.py | 14 +++--- 3 files changed, 108 insertions(+), 104 deletions(-) diff --git a/ImageView.py b/ImageView.py index 538c5b5..39556d7 100644 --- a/ImageView.py +++ b/ImageView.py @@ -17,9 +17,11 @@ from __future__ import division -import gtk -from gtk import gdk -import gobject +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GdkPixbuf +from gi.repository import cairo +from gi.repository import GObject import sys import logging @@ -27,39 +29,42 @@ import logging import random -class ImageViewer(gtk.DrawingArea): +class ImageViewer(Gtk.DrawingArea): __gsignals__ = { -'expose-event': ( -'override'), +#'expose-event': ( +#'override'), 'zoom-changed': ( -gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []), +GObject.SignalFlags.RUN_FIRST, None, []), 'angle-changed': ( -gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []), +GObject.SignalFlags.RUN_FIRST, None, []), } __gproperties__ = { 'zoom': ( -gobject.TYPE_FLOAT, 'Zoom Factor', 'Factor of zoom', -0, 4, 1, gobject.PARAM_READWRITE), +GObject.TYPE_FLOAT, 'Zoom Factor', 'Factor of zoom', +0, 4, 1, GObject.PARAM_READWRITE), 'angle': ( -gobject.TYPE_INT, 'Angle', 'Angle of rotation', -0, 360, 0, gobject.PARAM_READWRITE), +GObject.TYPE_INT, 'Angle', 'Angle of rotation', +0, 360, 0, GObject.PARAM_READWRITE), 'file_location': ( -gobject.TYPE_STRING, 'File Location', 'Location of the image file', -'', gobject.PARAM_READWRITE), +GObject.TYPE_STRING, 'File Location', 'Location of the image file', +'', GObject.PARAM_READWRITE), } def __init__(self): -gtk.DrawingArea.__init__(self) +GObject.GObject.__init__(self) self.set_app_paintable(True) self.pixbuf = None self.zoom = None +self.parent = None self.file_location = None self._temp_pixbuf = None self._image_changed_flag = True self._optimal_zoom_flag = True +self.connect('draw', self.draw) + self.angle = 0 def do_get_property(self, pspec): @@ -90,19 +95,7 @@ class ImageViewer(gtk.DrawingArea): if self._optimal_zoom_flag: self._set_zoom(self._calc_optimal_zoom()) -#def do_size_request(self, requisition): -#requisition.width = self.pixbuf.get_width() -#requisition.height = self.pixbuf.get_height() - -def do_expose_event(self, event): -ctx = self.window.cairo_create() - -ctx.rectangle(event.area.x, event.area.y, -event.area.width, event.area.height) -ctx.clip() -self.draw(ctx) - -def draw(self, ctx): +def draw(self, widget, ctx): if not self.pixbuf: return if self.zoom is None: @@ -130,7 +123,7 @@ class ImageViewer(gtk.DrawingArea): self.set_size_request(self._temp_pixbuf.get_width(), self._temp_pixbuf.get_height()) -ctx.set_source_pixbuf(self._temp_pixbuf, x, y) +Gdk.cairo_set_source_pixbuf(ctx, self._temp_pixbuf, x, y) ctx.paint() @@ -144,12 +137,15 @@ class ImageViewer(gtk.DrawingArea): self.angle = angle -if self.window: +if self.props.window: alloc = self.get_allocation() -rect = gdk.Rectangle(alloc.x, alloc.y, -alloc.width, alloc.height) -self.window.invalidate_rect(rect, True) -self.window.process_updates(True) +rect = cairo.RectangleInt() +rect.x = alloc.x +rect.y = alloc.y +rect.width = alloc.width +rect.height = alloc.height +self.props.window.invalidate_rect(rect, True) +self.props.window.process_updates(True) self.emit('angle-changed') @@ -168,24 +164,27 @@ class ImageViewer(gtk.DrawingArea): return True def set_file_location(self, file_location): -self.pixbuf = gtk.gdk.pixbuf_new_from_file(file_location) +self.pixbuf = GdkPixbuf.Pixbuf.new_from_file(file_location) self.file_location = file_location self.zoom = None self._image_changed_flag = True -if self.window: +if self.props.window: alloc = self.get_allocation() -rect = gdk.Rectangle(alloc.x, alloc.y, -alloc.width, alloc.height) -self.window.invalidate_rect(rect, True) -self.window.process_updates(True) +