ftblog

:: widerstand zwecklos ::
email jabber gpgkey
hackergotchi

June 16, 2010

tuitest on debian lenny

Filed under: computer -- 21:17

There are a lot of possibilities for testing graphical user interfaces. If
you're more into terminal based applications you don't have such a plethora
to choose from. Andreas Krennmair's tuitest is the tool you're looking for
if you want to test your *curses/slang program's interface.

I'm using it for a pet project of mine and it works quite well. You record
a session using `tt-record' and that generates a ruby script which replays
the whole session and you can put in things you expect to happen. Andreas
made a short introduction in his blog (it's in German).

Now, using tuitest on Debian lenny is kind of a problem if you want it to
happen out of the box. The ruby static library is named differently from
what tuitest's Makefile expects and the installation directory is not
among the default search paths of the ruby1.8 interpreter.

Here's a patch which should fix the issue:
diff --git a/Makefile b/Makefile
index 0e1910b..ad059d0 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ $(TARGET): $(RECORDOBJS)
 
 $(RUBYMOD): $(RUBYMODOBJS)
 	cd swig && swig -ruby tuitest.i && ruby extconf.rb
-	$(MAKE) -C swig clean && $(MAKE) -C swig LIBS+="$(patsubst %,../%,$(RUBYMODOBJS)) $(LIBS) -lruby"
+	$(MAKE) -C swig clean && $(MAKE) -C swig LIBS+="$(patsubst %,../%,$(RUBYMODOBJS)) $(LIBS) -lruby1.8-static"
 
 %.o: %.c
 	$(CC) -o $@ $(CFLAGS) -c $<
@@ -37,7 +37,7 @@ $(RUBYMOD): $(RUBYMODOBJS)
 install:
 	mkdir -p $(DESTDIR)$(prefix)/bin
 	install -m 755 tt-record $(DESTDIR)$(prefix)/bin
-	$(MAKE) -C swig DESTDIR=$(DESTDIR) prefix=$(prefix) sitedir='$(DESTDIR)$(prefix)/lib/ruby' install
+	$(MAKE) -C swig DESTDIR=$(DESTDIR) prefix=$(prefix) sitedir='$(DESTDIR)$(prefix)/lib/site_ruby' install
 
 distclean clean: doc-clean
 	test -f swig/Makefile && $(MAKE) -C swig clean

Here's a link to a clean patch file: tuitest-on-lenny.patch.
Happy tui testing!

Powered by zblog
valid css | valid xhtml | utf-8 encoded | best viewed with anybrowser