19 May 2013 21:42
Getting karma to work with sugar-activity-html
Daniel Narvaez <dwnarvaez <at> gmail.com>
2013-05-19 19:42:07 GMT
2013-05-19 19:42:07 GMT
Hello,
I think the easiest approach is probably to2 Make sugar-activity-html support the --uri option. This is what I have right now
- self._web_view.load_uri("activity://%s/index.html" % self._bundle_id)
+ if handle.uri:
+ self._web_view.load_uri(handle.uri)
+ else:
+ self._web_view.load_uri("activity://%s/index.html" %
+ self._bundle_id)
- self._web_view.load_uri("activity://%s/index.html" % self._bundle_id)
+ if handle.uri:
+ self._web_view.load_uri(handle.uri)
+ else:
+ self._web_view.load_uri("activity://%s/index.html" %
+ self._bundle_id)
3 Fix sugar-launch to handle the --uri argument
4 Somehow fix sugar-launch to work properly with html activities. The websocket communication is not working right because it requires the key/port variables which are in the shell environment and sugar-launch is not running in there.
5 Run with something like
sugar-runner --test-command "sugar-launch org.sugarlabs.HTMLTestActivity --uri $url_to_karma_server"
Probably wrapped in a friendlier script.
I put together something like this in a very hacky way and it seems to launch sugar-html-graphics test fine.
I haven't tried to do 4 though. I'm not sure how to do it best. We could proxy the variables using org.laptop.Shell but I'm not too happy about how sugar-launch is done in general... supporting two pretty different application launch code paths complicate things. I wonder if it wouldn't be better to go through the shell also for sugar-launch. We can get the pid back and attach gdb.
I haven't tried to do 4 though. I'm not sure how to do it best. We could proxy the variables using org.laptop.Shell but I'm not too happy about how sugar-launch is done in general... supporting two pretty different application launch code paths complicate things. I wonder if it wouldn't be better to go through the shell also for sugar-launch. We can get the pid back and attach gdb.
--
Daniel Narvaez
_______________________________________________ Sugar-devel mailing list Sugar-devel <at> lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
RSS Feed