r2630 - people/bmsleight/autotesting

bmsleight-guest at alioth.debian.org bmsleight-guest at alioth.debian.org
Sun Jul 29 14:15:42 UTC 2007


Author: bmsleight-guest
Date: 2007-07-29 14:15:42 +0000 (Sun, 29 Jul 2007)
New Revision: 2630

Modified:
   people/bmsleight/autotesting/video-qemu-booting-iso.sh
Log:
Ready to test. Time to add some scheduled downloads and runs.

Modified: people/bmsleight/autotesting/video-qemu-booting-iso.sh
===================================================================
--- people/bmsleight/autotesting/video-qemu-booting-iso.sh	2007-07-29 13:32:18 UTC (rev 2629)
+++ people/bmsleight/autotesting/video-qemu-booting-iso.sh	2007-07-29 14:15:42 UTC (rev 2630)
@@ -1,9 +1,48 @@
 #!/bin/bash
+#
+# video-qemu-booting-iso.sh                               #
+#                                                         #
+# Copyleft (c) 2007 Brendan M. Sleight                    #
+#              <bmsleight at barwap._REMOVE_SPAM_TRAP.com>   # 
+#                                                         #
+# This script is licensed under the GNU GPL v2 or later.  #
+#                                                         #
+# On Debian systems, this license can be obtained via     #
+# /usr/share/common-licenses/GPL                          #
+#                                                         #
+# Required packages/applications :-                       #
+#  bash, expect, ffmpeg2thoera, imagemagick, mencoder,    # 
+#  qemu, vncrec, vncserver                                #
+#                                                         #
+# Requires /etc/vnc.conf to be ammended.                  #
+#                                                         #
+#                                                         #
+
+
+lock_file_check ()
+{
+if [ -f /tmp/video-qemu-booting-iso.lock ]
+then
+  echo "Lock file /tmp/video-qemu-booting-iso.lock present indicating $0 is already running"
+  exit
+fi
+VNCCONF=$(cat /etc/vnc.conf | grep "^\$vncStartup")
+if [ "VNCCONF" -neq "\$vncStartup = \"~/.vnc/xstartup\";" ]
+ then
+  echo "Requires vnc.conf to have the line:-  "
+  echo "\$vncStartup = \"~/.vnc/xstartup\";" 
+  echo "Else two lots of windowm mangers will launched in the extra vnc sessions."
+  exit
+fi
+echo "Lock file /tmp/video-qemu-booting-iso.lock present indicating $0 is running" >/tmp/video-qemu-booting-iso.lock
+}
+
 get_global_variables ()
 {
 PASSWD="$RANDOM.$RANDOM.$RANDOM.$RANDOM.$RANDOM"
 HOSTNAME=$(hostname)
 OLD_DISPLAY="$DISPLAY"
+TODAY=$(date +"%F")  
 TMP_DIR=/tmp/vqbi.$$.tmp
 IPADDRESS=$(sudo ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
 VNCREC_MOVIE_FRAMERATE=1
@@ -78,8 +117,6 @@
 start_vnc_record ()
 {
 export DISPLAY="$VNSERVER_VNCREC"	
-#export DISPLAY="$OLD_DISPLAY"
-rm /tmp/qemu.1.vnc
 export VNCREC_MOVIE_FRAMERATE
 echo "Starting vncrec, recording :$VNCSERVER_QMEU_NUMBER. Local display :$VNCSERVER_VNCREC_NUMBER"
 vncrec -display :$VNCSERVER_VNCREC_NUMBER -passwd ~/.vnc/passwd -shared -viewonly -encoding raw -record $TMP_DIR/qemu.1.vnc :$VNCSERVER_QMEU_NUMBER &
@@ -139,6 +176,8 @@
 do
  convert $i -resize $CONVERT_DIM $i 
  echo "Resized $i"
+ # The logo is needed to ensure we do not have a blank frame, which mencode can not handle.
+ # Heck - it also looks nice IMHO.
  composite -dissolve 15 -gravity northeast $TMP_DIR/minilogo.png $i $i
 done
 echo "Finished making Frames"
@@ -154,14 +193,14 @@
 #sleep 5
 
 mencoder mf://"$TMP_DIR/*.jpg" -mf w=800:h=600:fps=4:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o $TMP_DIR/tmp.avi
-ffmpeg2theora -o $VIDEO $TMP_DIR/tmp.avi
+ffmpeg2theora -o $VIDEO $TMP_DIR/tmp.avi --artist "AutoTesting" --title "Video of Qemu booting $ISO"  --date "$TODAY"
 }
 
 clean_up ()
 {
 DISPLAY="$OLD_DISPLAY"
 export DISPLAY="$OLD_DISPLAY"
-#rm $TMP_DIR -r
+rm $TMP_DIR -r
 }
 
 
@@ -195,7 +234,7 @@
     echo " For every second of running qemu the script it can take up to 12s to compile the video."
     echo " For example using -t 300 will about one hour."
     echo
-    echo " Launches a couple of vncserver session, kills other vncrec and qemu session running."
+    echo " Launches a couple of vncserver session, kills other vncrec and qemu sessions running."
     echo " Requires sudo ifconfig"
     exit
 fi
@@ -203,6 +242,7 @@
 ISO=$1
 VIDEO=$2
 
+lock_file_check
 get_options_and_defaults
 get_global_variables
 set_up_workspace




More information about the debian-live-changes mailing list