Random jhbuild notes

Saturday, September 30, 2006 10:05 - GNOME

I was (again) away from computers for ten days, I went to Champagne for the vintage season, picking grapes and having fun with friends. It probably is not a popular activity out of wine-growing areas but there, every local people is participating, as well as a lot of young people from all over France looking for money.

Anyway I got back tired and didn't do much yet. But I planned some tasks:

  • switch my build daemon on jhbuild.bxlug.be to GNOME 2.18, this will probably need some baby sitting at first
  • look at recent work of the build brigade
  • finish reading the "external dependencies" thread in desktop-devel (and I'll thank Elijah here for this effort)

I already forgot some.

And now for something technical, I got asked two questions about jhbuild by email and since I believe the answer may be useful, I copy/paste it below:


1. add some additional phases like 'unit test', 'system test' etc to the existing 'start, checkout, build,..'. in the html output obtained and

The first point is to add new phases to existing module types (module types are autogen, distutils, tarball, everythig under modtypes/)

I don't think there are example on how to do that, basically it would be starting from autotools.py (subclassing or copyring) and adding something like that to the AutogenModule class:

STATE_UNIT_TESTS = 'unittests'
STATE_SYSTEM_TESTS = 'systemtests'

do_install.next_state = STATE_UNIT_TEST

def do_unittests(self, buildscript):
    buildcript.set_action('Unit testing', self)
    cmd = 'echo hello' # whatever
    buildscript.execute(cmd, cwd=self.get_builddir(buildscript))
do_unittests.next_state = STATE_SYSTEM_TESTS

def do_systemtests(self, buildscript):
    buildcript.set_action('Unit testing', self)
    cmd = 'echo hello' # whatever
    buildscript.execute(cmd, cwd=self.get_builddir(buildscript))
do_systemtests.next_state = Package.STATE_NONE

Note this was typed straight in my mailer and completely untested.

As for HTML output and the second question,

2. get a day wise build report as in http://jhbuild.bxlug.be/ page.

There are two things, first is static tinderbox output, from frontends/tinderbox.py and second is 'jhautobuild', from both frontends/autobuild.py and a project parallel to jhbuild, jhautobuild, which you can download from http://labs.libre-entreprise.org/scm/?group_id=103

jhautobuild allows for the distributed aspect useful to GNOME but this may be unnecessary in the situation where you control all build hosts and can centralize produced HTML files. (but jhautobuild also brought nicer HTML views).

Both tinderbox and jhautobuild will automatically get support for new phases.