Testing Searduino’s Debian specifics with VMM and Jenkins

Problem and solution

Searduino provides headers and libraries to program the Arduino boards. It would be stupid to rewrite the whole Arduino software so we’re of course using the Arduino source code. Currently the default way of building Searduino is to download (automatically done by Searduino) the Arduino source code from their download site and unpack that to a specific folder. This solution doesn’t work with Debian so we discussed a bit back and forth how to solve this.

The solution we reached was to add a configure option to make it possible to build Searduino from the Arduino source code as shipped with Debian’s Arduino package. Use it like this:

./configure --enable-debian-sources

Providing source code dist to Debian

Every night we’re building Searduino (yeah, autobuilds are back again) and provide source code dist (tar.gz) and binary versions for 32 and 64 bit GNU/Linux systems. These scripts are internal and look so ugly at the moment so there’s no way you will se them ;). To test the Debian specific option (–enable-debian-source) we’ve set up a dedicated build server (Debian, unstable, 64 bit) that downloads the source code dist file (.tar.gz) and builds and tests Searduino from that.

Testing the new option in the source code dist provided to Debian

We use Jenkins to do the tests of the Debian specific stuff. We’ve been trying out the two VirtualBox plugins but we never got it to work properly. So instead we started using VMM and now it works nice.

Searduino and GNU Xnee have a Jenkins site to automate builds:

http://dhcp2-pc213045.itu.chalmers.se:8080/

To build Searduino from a dist file using VMM in Jenkins we ceated a “a free-style software project” and added some “Execute shell” to do the building. The calls we do to build are:

/opt/vmm/bin/ats-client --start-client-headless Debian-unstable-64
/opt/vmm/bin/ats-client --wait-for-ssh Debian-unstable-64 300
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
       "rm -fr searduino-dist"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "mkdir searduino-dist"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "cd searduino-dist && wget http://129.16.213.45/searduino-build/dist/searduino-git-$(date '+%Y%m%d').tar.gz"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "cd searduino-dist && tar zxvf searduino-git-$(date '+%Y%m%d').tar.gz"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "cd searduino-dist && ln -s searduino-git-$(date '+%Y%m%d') latest"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "cd searduino-dist/latest && make -f Makefile.git"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 "export CFLAGS=\"-I/usr/lib/jvm/java-6-openjdk-amd64/include/\"; export CXXFLAGS=\"-I/usr/lib/jvm/java-6-openjdk-amd64/include/\"; cd searduino-dist/latest && ./configure --enable-debian-sources --prefix=/tmp/tmp-searduino-dist-debian"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "cd searduino-dist/latest && make"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "cd searduino-dist/latest && make check"
/opt/vmm/bin/ats-client --client-exec Debian-unstable-64 \
      "cd searduino-dist/latest && make install"
/opt/vmm/bin/ats-client --stop-client Debian-unstable-64

Results from test:

The trend seems to be ok. So we’re now finally able to say that Debain can ship Searduino.

Log file from a build we made today:

http://dhcp2-pc213045.itu.chalmers.se:8080/job/Searduino-debian-unstable-dist/12/consoleFull

Comments

The sun seems to be up. So we’re now finally able to say that Debain can ship Searduino. Also we’ve seen that it is possible to use VMM with Jenkins.

About VMM

VMM is a piece of software to make it easy to start, stop and use virtual machines/clients (currently supporting Qemu and VirtualBox).

Advertisements

GNU Xnee 3.14 (‘Lord Pi’) released

We are pleased to announce the availability of GNU Xnee 3.14

GNU Xnee is a suite of programs that can record, replay and distribute  user actions under the X11 environment. Think of it as a robot that can imitate the job you just did. GNU Xnee can be used to:

  • Automate tests
  • Demonstrate programs
  • Distribute actions
  • Record and replay ‘macro’
  • Retype the content of a file

Getting the Software

http://ftp.gnu.org/gnu/xnee/xnee-3.14.tar.gz
http://ftp.gnu.org/gnu/xnee/xnee-3.14.tar.gz.sig

or one of the mirror sites as found in:

http://www.gnu.org/prep/ftp.html

Checksums

md5sum:

04d3256be296d624979940ac2c6b5e8b xnee-3.14.tar.gz

cksum:

3927134133 1772509 xnee-3.14.tar.gz

New in this release:

If XInput is present, record only XI events (discard core events).

Forced core replay is now done using XI events (if no core events are available).

* Fixed bugs:

Bug-xnee mailing list: “WARNING: Enough valuators … still not printing”

About calling the release “Lord Pi”

We’re still following the tradition to pay tribute to old heroes who have passed away. A while ago Jon Lord (Deep Purple among other bands) passed away. Even though Deep Purple never was one of my favorite bands, they and Jon still had an impact in my life. Listen to Stormbringer, Perfect stranger and Machine head and you’ll know why. Jon’s keyboard playing is a vital part of the Deep Purple sound. That explains the “Lord” part of “Lord Pi”. The “Pi” part is of course due to the version number “3.14”, which is the three first digits of Pi.

 

Examples in manuals – how to verify (test) them

I’ve gotten some just comments as feedback for the examples in the Searduino Manuals. Searduino is a software to make it easy to program C/C++ for Arduino, a simulator for source level Arduino API, … and more.

Problem is the following: I’d written some examples to make it easy to get started with Searduino. After some weeks of updates to the code the examples were not correct anymore. What good is it to have examples if they don’t work? But on the other hand, it’s really a pain in the ¤/&% to have to update example code. We need a way to test example code in manuals and to automate the tests!

Copying/pasting code from a manual is not something that is not desired (error prune to say one problem). So how to find some middle ground here? Is there any software for this?

My temporary solution was to write all examples as C files and Makefiles and to write some scripts to

  • convert a C file to texinfo file (c2texi)
  • convert a Makefile file to texinfo file (makefile2texi)

and then include the generated texi files in the manual (written in Texinfo). Will probably do the same for GNU Xnee

There must be  a better way … or?