From: <bms...@us...> - 2007-07-29 14:18:13
|
Revision: 2545 http://morphix.svn.sourceforge.net/morphix/?rev=2545&view=rev Author: bmsleight Date: 2007-07-29 07:18:08 -0700 (Sun, 29 Jul 2007) Log Message: ----------- Updating Autotesting - to make it more portable, video-qemu-booting-iso.sh is also in debian-live svn Modified Paths: -------------- trunk/mmaker/utils/auto-testing/run_testing.sh trunk/mmaker/utils/auto-testing/video-qemu-booting-iso.sh Modified: trunk/mmaker/utils/auto-testing/run_testing.sh =================================================================== --- trunk/mmaker/utils/auto-testing/run_testing.sh 2007-07-29 00:01:08 UTC (rev 2544) +++ trunk/mmaker/utils/auto-testing/run_testing.sh 2007-07-29 14:18:08 UTC (rev 2545) @@ -174,7 +174,8 @@ echo $DIVIDER sudo isomorph --list $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN echo $DIVIDER - sudo /home/morph/morphix/trunk/mmaker/utils/auto-testing/auto_testing.sh $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN $VID_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN.avi 800 + /home/morph/morphix/trunk/mmaker/utils/auto-testing/video-qemu-booting-iso.sh -q qemu_0.8.4-etch1 -t 800 -l /home/morph/morphix/trunk/cdrom-misc/images/Morphix_TINY.gif -s 800x600 -s "spc,s,p,l,a,s,h,equal,n,spc,d,e,b,u,g,m,o,r,p,h,i,x,equal,y,e,s,spc,kp_enter" $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN $VID_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN.ogg +# sudo /home/morph/morphix/trunk/mmaker/utils/auto-testing/auto_testing.sh $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN $VID_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN.avi 800 sudo rm $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN echo $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN gzip -c $LOG_FILE >$VID_DIR/$LOG_FILE_BN'_'$TODAY'_.gz' Modified: trunk/mmaker/utils/auto-testing/video-qemu-booting-iso.sh =================================================================== --- trunk/mmaker/utils/auto-testing/video-qemu-booting-iso.sh 2007-07-29 00:01:08 UTC (rev 2544) +++ trunk/mmaker/utils/auto-testing/video-qemu-booting-iso.sh 2007-07-29 14:18:08 UTC (rev 2545) @@ -1,9 +1,48 @@ #!/bin/bash +# +# video-qemu-booting-iso.sh # +# # +# Copyleft (c) 2007 Brendan M. Sleight # +# <bmsleight@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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |