support manual runs
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Mon, 7 Apr 2008 10:16:51 +0000 (10:16 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Mon, 7 Apr 2008 10:16:51 +0000 (10:16 +0000)
scripts/all-builds.sh

index 2118555..d010298 100755 (executable)
@@ -2,14 +2,35 @@
 # this script is managed under subversion at 
 # http://svn.one-lab.org/infrastructure/scripts/all-builds.sh
 # it is triggered every night at 0:05 french time on build.one-lab.org aka blitz.inria.fr
-for d in onelab planetlab ; do
-    for f in f8 ; do 
-       for bits in 32 64; do
+
+# tuned for allowing manual re-runs, mostly for tests
+
+DEFAULT_PLDISTROS="planetlab onelab"
+DEFAULT_FCDISTROS="f8"
+DEFAULT_BITS="32 64"
+
+# export any of these to override - this is for manual use only
+[ -z "$PLDISTROS" ] && { PLDISTROS=$DEFAULT_PLDISTROS ; manual=true ; }
+[ -z "$FCDISTROS" ] && { FCDISTROS=$DEFAULT_FCDISTROS ; manual=true ; }
+[ -z "$BITS" ] &&      { BITS=$DEFAULT_BITS ; manual=true ; }
+[ -n "$RETRY" ] &&     { extra_option="$extra_option -o" ; manual=true ; }
+[ -n "$TEST" ] &&      { extra_option="$extra_option -T" ; manual=true ; }
+[ -n "$DRY_RUN" ] &&   { manual=true ; }
+
+for d in $PLDISTROS ; do
+    for f in $FCDISTROS ; do 
+       for bits in $BITS; do
            p=linux${bits}
-           /root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
+           command=/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
                -f $f -p $p -d $d \
                -t ${d}-tags-4.2.mk \
-               -b @DATE@--${d}.4.2--${f}-${bits} 
+               -b @DATE@--${d}.4.2--${f}-${bits} $test_option
+           [ -n "$manual" ] && echo $command
+           if [ -n "$DRY_RUN" ] ; then
+               echo "dry-run: skipped"
+           else
+               $command
+           fi
        done
     done
 done
@@ -18,10 +39,15 @@ done
 for d in onelab ; do
     for bits in 32 64; do
        p=linux${bits}
-       /root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
+       command=/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
            -f centos5 -p $p -d $d \
            -t ${d}-tags-4.2.mk \
            -b @DATE@--${d}.4.2--c5vs-${bits} \
            -B vserver 
+       if [ -n "$manual" ] ; then
+           echo "manual: skipped"
+       else
+           $command
+       fi
     done
 done