Software Testing

  • user warning: Table 'drupal_herzi_eu.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /var/lib/www/shared/drupal-6.16/includes/lock.inc on line 154.
  • user warning: Table 'drupal_herzi_eu.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /var/lib/www/shared/drupal-6.16/includes/lock.inc on line 154.

Testing and Hacking…

Having tests for your projects is nice (others consider it as necessary, but that's not part of this post). Well, as with many brand new projects, people get suggested to use the trunk version as in subversion. This brought me to a really annoying problem: People were complaining about a missing macro (which was AM_PATH_CHECK). Of couse, I could argue now whether a developer should have this installed, but I came to the conclusion that I shouldn't imply any piece of installed software that's not absolutely necessary to build.

Fortunately the people are Ubuntu users, so the solution for them was quite easy (apt-get install check). But I was thinking about doing this a bit more cleverly. Ubuntu currently delivers check 0.9.3, version 0.9.4 includes check.pc, which is nice but unusable for me (Ubuntu Edgy, Feisty already has this). So, finally I started to improve my m4 skills and provide some code (that you're free to copy) that works as it should:

PKG_CHECK_MODULES(CHECK,[check >= 0.9.4],:,[
ifdef([AM_PATH_CHECK],
[AM_PATH_CHECK],
[AC_MSG_RESULT([no, testing is disabled])])
])

AM_CONDITIONAL([HAVE_CHECK],[test "x$CHECK_CFLAGS" != "x"])

You might want to replace the second AM_PATH_CHECK with AM_PATH_CHECK([0.8.2]) or your required version.

20 May 2005

The last weeks I've been looking for some special things that I might want to use for criawips:

Automated Software Testing

When I found Tim's gerd I was quite impressed. Using it, you can record GObject-Events and use them to replay an application session. This could be very cool for both testing and demonstration puposes as one can easily record one session and launch the application later with that information (this way you have a much better i18n as for video recording things). Gerd is in the GNOME CVS tree (module "gerd").

Syndicate content