[SCM] debian-live/autotesting branch, master, updated. 810ce50ba835c852c63a0f1532b8d69d36c237d2

Brendan M. Sleight bms.debian at barwap.com
Sun Jul 20 21:47:08 UTC 2008


The following commit has been merged in the master branch:
commit 810ce50ba835c852c63a0f1532b8d69d36c237d2
Author: Brendan M. Sleight <bms.debian at barwap.com>
Date:   Sun Jul 20 21:46:18 2008 +0000

    Updating webserver file structure, using imagemagick to get last display. Adding some admin files used on autotesting.livecd.org - ready for local builds

diff --git a/autotesting.cron.txt b/autotesting.cron.txt
new file mode 100644
index 0000000..d650004
--- /dev/null
+++ b/autotesting.cron.txt
@@ -0,0 +1,15 @@
+0 0 * * * /bin/echo "New Day " >/home/autotesting/log/daily/autotesting.log
+0 1 * * * /bin/bash /home/autotesting/debian-live/autotesting/run-batch-autotesting.sh /home/autotesting/debian-live/autotesting/daily.lst /home/autotesting/iso/daily/ /home/autotesting/video/daily/ /home/autotesting/www-root/debian-live/i386/ >>/home/autotesting/log/daily/autotesting.log 2>&1
+
+0 5 * * * /bin/bash /home/autotesting/debian-live/autotesting/run-batch-autotesting.sh /home/autotesting/debian-live/autotesting/webconverger.lst /home/autotesting/iso/daily/ /home/autotesting/video/daily/ /home/autotesting/www-root/webconverger/i386/ webc-3.2.mini.iso.MD5SUM   >>/home/autotesting/log/daily/autotesting.log 2>&1
+
+0 0 * * 5 /bin/echo "New Week " >/home/autotesting/log/weekly/autotesting.log
+0 9 * * 5 /bin/bash /home/autotesting/debian-live/autotesting/run-batch-autotesting.sh /home/autotesting/debian-live/autotesting/weekly.lst /home/autotesting/iso/weekly/ /home/autotesting/video/weekly/ /home/autotesting/www-root/debian-live/i386/ >>/home/autotesting/log/weekly/autotesting.log 2>&1
+
+0 0 15 * * /bin/echo "New Month " >/home/autotesting/log/daily/autotesting.log
+0 17 15 * * /bin/bash /home/autotesting/debian-live/autotesting/run-batch-autotesting.sh /home/autotesting/debian-live/autotesting/monthly.lst /home/autotesting/iso/monthly/ /home/autotesting/video/monthly/ /home/autotesting/www-root/debian-live/i386/ >>/home/autotesting/log/monthly/autotesting.log 2>&1
+
+0 0 * * * /bin/bash /home/autotesting/debian-live/autotesting/clean-old-files.sh
+
+
+#/home/autotesting/debian-live/autotesting/local_build_debian-live.sh /home/autotesting/iso/local/debian-live-etch-i386-xfce-desktop.iso etch xfce >>/home/autotesting/log/local/autobuild.log  2>&1  
diff --git a/clean-old-files.sh b/clean-old-files.sh
new file mode 100755
index 0000000..98486f6
--- /dev/null
+++ b/clean-old-files.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Remove old files
+find /home/autotesting/*/daily/ -not -type d -ctime +4 -print0     | xargs --null --no-run-if-empty rm -f
+find /home/autotesting/*/weekly/ -not -type d -ctime +28 -print0   | xargs --null --no-run-if-empty rm -f
+find /home/autotesting/*/monthly/ -not -type d -ctime +124 -print0 | xargs --null --no-run-if-empty rm -f
+
+# Remove old symlinks
+for f in $(find /home/autotesting/www-root/ -type l)
+do 
+    if [ ! -e "$f" ]
+    then 
+        echo $f
+    fi
+done
+
+# Remove empty directories
+find /home/autotesting/www-root/ -depth -type d -empty -exec rmdir {} \;
diff --git a/local_build_debian-live.sh b/local_build_debian-live.sh
new file mode 100755
index 0000000..ee4982e
--- /dev/null
+++ b/local_build_debian-live.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# Locally build a debian-live image.
+#  as crontab from root
+#  Kick auotesting to test..
+
+if [ -z "$1" -a -z "$2" ]
+then
+    echo " Usage $0 build.iso distribution packages-list "
+    exit
+fi
+
+if [ -z "$3" ]
+then
+    echo "blank packages-lists"
+    PACKAGE_LISTS=""
+else
+    PACKAGE_LISTS=" --packages-lists \"$2 \""
+fi
+
+TODAY=$(date +"%F")
+TMP_DIR=/tmp/local_build_$$/
+mkdir $TMP_DIR
+#chmod a+w $TMP_DIR
+cd $TMP_DIR
+
+lh_config --distribution $2  "$PACKAGE_LISTS"
+sudo lh_build
+cp ./binary.iso "$1"
+ls ./ "$1"
+#chmod a+w "$1"
+sudo rm $TMP_DIR -R
+
+
diff --git a/run-batch-autotesting.sh b/run-batch-autotesting.sh
index 22101ae..ef82e78 100755
--- a/run-batch-autotesting.sh
+++ b/run-batch-autotesting.sh
@@ -36,23 +36,24 @@
 
 VIDEO_QEMU_BOOTING="/home/autotesting/debian-live/autotesting/video-qemu-booting-iso.sh"
 
-if [ -z "$1" -a -z "$2" -a -z "$3" ]
+if [ -z "$1" -a -z "$2" -a -z "$3" -a -z "$4" ]
 then
     echo "usage: $0 directory/ "
     echo
-    echo " e.g: run-batch-autotesting.sh dailylist.txt iso/daily/ video/daily/"
+    echo " e.g: run-batch-autotesting.sh dailylist.txt iso/daily/ video/daily/ debian-live/i386/ MD5SUM-FILE"
     exit
 fi
 
 URLLIST=$1
 DIRECTORY=$2
 VIDEO_DIRECTORY=$3
+WEB_ROOT=$4
 
-if [ -z "$4" ]
+if [ -z "$5" ]
 then
     MD5SUM_FILE="MD5SUMS"
 else
-    MD5SUM_FILE="$4"
+    MD5SUM_FILE="$5"
 fi
 
 if [ -f /tmp/run-batch-autotesting.lock ]
@@ -75,13 +76,21 @@ do
         echo "$BASE_NAME already downloaded today "
         echo " - skipping download and testing. To retest please remove file or set ctime>1 day"
     else
-        echo "Downloading $URL"
-        rm $DIRECTORY/$BASE_NAME 2>/dev/null
-        rm $DIRECTORY/$MD5SUM_FILE 2>/dev/null
-        wget --no-verbose --tries=3 --timeout=60 --directory-prefix=$DIRECTORY $URL
-        wget --no-verbose --tries=3 --timeout=60 --directory-prefix=$DIRECTORY $MD5SUMS
-        MD5SUM_LOCAL=$(md5sum $DIRECTORY/$BASE_NAME | cut --fields=1 --delimiter=\  )
-        MD5SUM_REMOTE=$(cat $DIRECTORY/$MD5SUM_FILE | grep "$BASE_NAME" | head -n 1 | cut --fields=1 --delimiter=\  )
+        HTTP=${URL:0:4}
+        if [ "$HTTP" = "http" ]
+        then
+            echo "Downloading $URL"
+            rm $DIRECTORY/$BASE_NAME 2>/dev/null
+            rm $DIRECTORY/$MD5SUM_FILE 2>/dev/null
+            wget --no-verbose --tries=3 --timeout=60 --directory-prefix=$DIRECTORY $URL
+            wget --no-verbose --tries=3 --timeout=60 --directory-prefix=$DIRECTORY $MD5SUMS
+            MD5SUM_LOCAL=$(md5sum $DIRECTORY/$BASE_NAME | cut --fields=1 --delimiter=\  )
+            MD5SUM_REMOTE=$(cat $DIRECTORY/$MD5SUM_FILE | grep "$BASE_NAME" | head -n 1 | cut --fields=1 --delimiter=\  )
+        else
+            echo "Local file - assuming already in place"
+            MD5SUM_LOCAL="ok"
+            MD5SUM_REMOTE="$MD5SUM_LOCAL"
+        fi
         if [[ $MD5SUM_LOCAL != $MD5SUM_REMOTE ]]
         then
             echo "$BASE_NAME - md5sums different, remote: $MD5SUM_REMOTE, local: $MD5SUM_LOCAL. "
@@ -91,13 +100,35 @@ do
             DATE_DOWNLOADED=$(ls -lc --time-style long-iso $DIRECTORY/$BASE_NAME |tr -s " "|cut -d" " -f6)
             mkdir "$VIDEO_DIRECTORY/${BASE_NAME}" 
             VIDEO_NAME="$VIDEO_DIRECTORY/${BASE_NAME}/Built_${DATE_IMAGE_BUILT}_Tested_${DATE_DOWNLOADED}_.ogg"
-            LOG_FILE="$VIDEO_DIRECTORY/${BASE_NAME}/Built_${DATE_IMAGE_BUILT}_Tested_${DATE_DOWNLOADED}_.log"
+            LOG_FILE="$VIDEO_DIRECTORY/${BASE_NAME}/Built_${DATE_IMAGE_BUILT}_Tested_${DATE_DOWNLOADED}_log.txt"
             echo "AutoTesting $BASE_NAME $VIDEO_NAME"
-            $VIDEO_QEMU_BOOTING -g 1024x768  -t 300 -v 5  $DIRECTORY/$BASE_NAME $VIDEO_NAME >$LOG_FILE 2>&1
+            $VIDEO_QEMU_BOOTING -g 1024x768  -t 420 -v 5  $DIRECTORY/$BASE_NAME $VIDEO_NAME >$LOG_FILE 2>&1
             echo "Finished Autotesting $BASE_NAME"
             echo
             echo "----"
             echo
+            echo "* Creating symlinks to webserver"
+            LN_S_ROOT="$WEB_ROOT/$BASE_NAME/built_${DATE_IMAGE_BUILT}/Tested_${DATE_DOWNLOADED}"
+            LN_S_CURRENT="$WEB_ROOT/$BASE_NAME/current"
+            # making directories if required.
+            mkdir -p "$LN_S_ROOT"
+            mkdir -p "$LN_S_CURRENT"
+            # get rid of the old current
+            rm "$LN_S_CURRENT/*"
+            ln -s $VIDEO_NAME             "$LN_S_ROOT/video-booting.theora.ogg"
+            ln -s $VIDEO_NAME             "$LN_S_CURRENT/video-booting.theora.ogg"
+            ln -s $VIDEO_NAME.montage.jpg "$LN_S_ROOT/video-booting-montage.jpg"
+            ln -s $VIDEO_NAME.montage.jpg "$LN_S_CURRENT/video-booting-montage.jpg"
+            ln -s $VIDEO_NAME.end.jpg     "$LN_S_ROOT/final-screenshot.jpg"
+            ln -s $VIDEO_NAME.end.jpg     "$LN_S_CURRENT/final-screenshot.jpg"
+            SWF_NAME=$(echo $VIDEO_NAME.swf |  rev | cut -d"/" -f 1 | rev)
+            ln -s $VIDEO_NAME.swf         "$LN_S_ROOT/$SWF_NAME"
+            ln -s $VIDEO_NAME.swf         "$LN_S_CURRENT/$SWF_NAME"
+            HTML_PAGE="$VIDEO_DIRECTORY/${BASE_NAME}/Built_${DATE_IMAGE_BUILT}_Tested_${DATE_DOWNLOADED}__View_swf_Video_.html"
+            ln -s $HTML_PAGE              "$LN_S_ROOT/play-video-booting-swf.html"
+            ln -s $HTML_PAGE              "$LN_S_CURRENT/play-video-booting-swf.html"
+            echo "----"
+            echo
         fi
     fi
 done
diff --git a/video-qemu-booting-iso.sh b/video-qemu-booting-iso.sh
index e3f44a6..1d19e64 100755
--- a/video-qemu-booting-iso.sh
+++ b/video-qemu-booting-iso.sh
@@ -159,6 +159,8 @@ sleep $TIME_Q
 
 stop_qemu ()
 {
+echo "Capture final screen-shot"
+import -window root $VIDEO.end.jpg
 echo "Stopping vncrec and qemu"
 killall vncrec
 killall $QEMU_BIN
@@ -176,7 +178,7 @@ gen_video ()
 #Need to runs some tests to ensure vncrec -movie does temriante at end of session.
 echo "Generating video from recorded vnc stream. "
 vncrec  -movie $TMP_DIR/qemu.1.vnc 2>/dev/null | ffmpeg2theora $FFMPEG_DIM_SCALE --videoquality $VQUALITY --inputfps 40 --artist "AutoTesting.livecd.org" --title "Video of Qemu booting $ISO"  --date "$TODAY" -o $VIDEO - 2>/dev/null
-/home/autotesting/pyvnc2swf/edit.py -o $VIDEO.swf -c -s 0.703125 -t video $TMP_DIR/qemu.1.vnc 
+vnc2swf-edit -o $VIDEO.swf -l -c -s 0.703125 -t video $TMP_DIR/qemu.1.vnc 
 VIDEO_NO_EXT=${VIDEO%.*}
 mv $VIDEO.html ${VIDEO_NO_EXT}_View_swf_Video_.html
 }
@@ -213,8 +215,6 @@ while [  $COUNTER -lt $LENGTH ]; do
 	let COUNTER=$(($COUNTER+$SPLIT))
 done
 montage -geometry 180x135+4+4 -frame 5 $LIST $VIDEO.montage.jpg 
-LAST_FRAME_OF_MONTAGE=$(echo $LIST | rev | cut -d" " -f1 | rev )
-cp $LAST_FRAME_OF_MONTAGE $VIDEO.end.jpg
 rm -R $MONTAGE_DIR
 rmdir $MONTAGE_DIR
 }

-- 
debian-live/autotesting



More information about the debian-live-changes mailing list