I have finally finished my DPS911 course work. For this release I have written a log view page and hooked Logfribulator into the BuildBot. After fixing a bunch of bugs with data persistence I wrote a viewing page. Because of the data persistence framework I am using (SQLAlchemy), this was an enjoyable experience. This framework makes querying very logical, almost functioning like jQuery. I haven’t enabled the filtering that was on the old page because I am going to be re-implementing the HTML generation using Pylon’s Mako templating engine. Originally I had planned to use CherryPy for the controller of my page.

After a chat on irc.freenode.net/#python I have decided to look at Pylons instead. It is a popular framework and already has SQLAlchemy built in. The only reason I don’t like this framework is because I don’t understand how it works yet. Unlike CherryPy, I haven’t yet figured out how to run the development server from within Eclipse. This is something which would be very nice as I love the Eclipse debugger interface.

To help with debugging my system and aid in hacking on BuildBot, I wrote a simple ‘dump’ script in Python. I used SQLAlchemy to create a simple table which I could use anywhere. This was a great solution for my next bit of hacking. I finally hooked up BuildBot to submit logs to Logfribulator as they are completed. To do this I spent quite a few hours figuring out how each class in BuildBot is connected. In the end I was successful. I found that between the exception handler build into BuildBot and my database dump script this wasn’t as painful as I thought it would be.

The main thing I learned from this exercise is that code searching is invaluable. I used the built in Eclipse project search function. An example was where the string form of an object had the information I wanted. It would print in the format <Build ‘full-osx’>. When I did a search for “<Build “ I was directed to code which shows how this information was retreived. The hardest bit of information to find was the BuildBot’s running base URL. Once I found this I tried to use the Python urllib.urlopen method. This didn’t work the way I had hoped. This function blocks the main thread of BuildBot. If I had left this as is, I would have frozen BuildBot at the end of every test run. That is unacceptable.

BuildBot is coded on a framework called Twisted. This is a very network oriented framework and luckily has a built in http client. After some time on the Matrix irc channel I had a working replacement, sans freezing. After I put together the URL and tested the post I was greated by a nice little surprise. my code works :) I only have XPCShells fully tested but it shouldn’t be difficult to modify the Reftest and Mochitest build steps to work with my system.

On the patch front, I have reworked my XPCShell harness patch after Ted’s requests. There is question of the merit of individual test times. I am neutral on this issue and will let other people decide if this is useful information. I have designed my system to be able to store this information, so it wouldn’t be too difficult to add at a later time if need be.

I am really excited that I am going to California to do an internship with Mozilla. I am going to continue to work on this system there and I hope that it is used, once the kinks are worked out.

  • Print this article!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter