#!/bin/bash
+# if run with -s (single) we only run one build ber box
+[ "$1" == "-s" ] && { shift; SINGLE=true; }
+
# the tests flavours available
# -B means no test
+# -e step : mark a step as exclude (do not run it at all)
+# -i step : mark a step as ignore (run it, but keep going if it fails)
# -c default for the tests setup is one myplc
# -c dual has two myplc's - pointing to each other AMs
# -c triangle has three - ditto
# -c sfamesh makes them point to SMs
# -c bignode is to allow one hour for the node to install
-# -X : this means use an lxc box to run the vplc (default)
-# -S : this means use an lxc box to run the vplc (hopefully this won't be needed)
+# -c config -c sfadebug - turn on sfa debug
+# -y pg testing only the pg rspecs
function liquid () { hostname | grep -q liquid ; }
function reed () { hostname | grep -q reed ; }
function velvet () { hostname | grep -q velvet ; }
-# warhol is an experimental lxc-based build box
-function warhol () { hostname | grep -q warhol ; }
-
-### EXPERIMENTAL build env based on f20/lxc
-#warhol && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f20 -p linux64 -b @DATE@--l20 -c default -c no_omf
-warhol && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f20 -p linux64 -b @DATE@--l20-sd -c default -c no_omf nodemanager-GITPATH=git://git.onelab.eu/nodemanager.git@systemd
-# debians & ubuntus for manifold and myslice - on lxc we can now build what we want
-warhol && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f wheezy -p linux64 -b @DATE@-manifold-w ALL=manifold manifold-debian -B
-warhol && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f wheezy -p linux64 -b @DATE@-myslice-w ALL=myslice myslice-debian -B
-warhol && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f saucy -p linux64 -b @DATE@-manifold-s ALL=manifold manifold-debian -B
-warhol && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f saucy -p linux64 -b @DATE@-myslice-s ALL=myslice myslice-debian -B
-### try to have each box run one main distro build, + various miscell builds scattered around
-liquid && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f18 -p linux64 -b @DATE@--l18 -c default -c no_omf
-liquid && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f18 -p linux64 -b @DATE@--l18-sd -c default -c no_omf nodemanager-GITPATH=git://git.onelab.eu/nodemanager.git@systemd
+### have each box run one main distro build
+liquid && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f18 -p linux64 -b @DATE@--l18-lv104 -c default -c no_omf
+reed && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f20 -p linux64 -b @DATE@--l20-lvms -c default -c no_omf -s git://git.onelab.eu/build.git@before_libvirt_121
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f20 -p linux64 -b @DATE@--l20-lv121 -c default -c no_omf
-#
-#liquid && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d onelab -f f14 -p linux64 -b @DATE@--sfa3-dual -c dual -c sfadebug sfa-GITPATH=git://git.onelab.eu/sfa.git@geni-v3
+[ -n "$SINGLE" ] && exit
###
-reed && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f20 -p linux64 -b @DATE@--l20 -c default -c no_omf
+liquid && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d onelab -f f14 -p linux64 -b @DATE@--f14
+reed && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d onelab -f f14 -p linux64 -b @DATE@--sfa3 -c default -c sfadebug sfa-GITPATH=git://git.onelab.eu/sfa.git@geni-v3
+
+### f20 being the least demanding build we use this box for the debian stuff
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f wheezy -p linux64 -b @DATE@-manifold-w ALL=manifold manifold-debian -B
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f wheezy -p linux64 -b @DATE@-myslice-w ALL=myslice myslice-debian -B
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f jessie -p linux64 -b @DATE@-manifold-j ALL=manifold manifold-debian -B
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f jessie -p linux64 -b @DATE@-myslice-j ALL=myslice myslice-debian -B
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f raring -p linux64 -b @DATE@-manifold-r ALL=manifold manifold-debian -B
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f raring -p linux64 -b @DATE@-myslice-r ALL=myslice myslice-debian -B
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f saucy -p linux64 -b @DATE@-manifold-s ALL=manifold manifold-debian -B
+velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f saucy -p linux64 -b @DATE@-myslice-s ALL=myslice myslice-debian -B
-###
-velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d onelab -f f14 -p linux64 -b @DATE@--f14
-#
-velvet && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -f f20 -p linux64 -b @DATE@--sfa3 -c default -c sfadebug sfa-GITPATH=git://git.onelab.eu/sfa.git@geni-v3
+
########################################
# debians & ubuntus for sfa
#reed && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d lxc -P develdeb.pkgs -W http://debian.onelab.eu/ -f squeeze -p linux64 sfa-GITPATH=git://git.onelab.eu/sfa.git@geni-v2 -b @DATE@-sfasqueeze ALL=sfa sfa-debian -B
#liquid && /root/bin/lbuild-nightly.sh -m build@onelab.eu -d wexlxc -p linux64 -f f18 -b @DATE@--wexlxc-f18-64 -c default -c bignode
# f18 - never tried yet
-###### testing only the pg rspecs
-# -y pg
-###### triangular tests
-# -c triangle -c sfamesh
-###### sfa debug
-# -c config -c sfadebug
###### senslab - not much to test
# sfa-GITPATH=git://git.f-lab.fr/sfa.git@senslab2