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).

About these ads

One response to “Testing Searduino’s Debian specifics with VMM and Jenkins

  1. Pingback: Jenkins up | Ramblings from Searduino developers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s