SF.net SVN: morphix: [2436] trunk/mmaker/utils

[email protected] Sat, 28 Oct 2006 14:21:27 -0700
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2436
          http://svn.sourceforge.net/morphix/?rev=2436&view=rev
Author:   bmsleight
Date:     2006-10-28 14:21:19 -0700 (Sat, 28 Oct 2006)

Log Message:
-----------
Updating some of the autotesting scripts. These really could do with a good rewrite, but if it is not broken ... .. .

Modified Paths:
--------------
    trunk/mmaker/utils/auto-testing/auto_testing.sh
    trunk/mmaker/utils/auto-testing/run_testing.sh
    trunk/mmaker/utils/local_autobuilds.sh

Modified: trunk/mmaker/utils/auto-testing/auto_testing.sh
===================================================================
--- trunk/mmaker/utils/auto-testing/auto_testing.sh	2006-10-26 19:53:40 UTC (rev 2435)
+++ trunk/mmaker/utils/auto-testing/auto_testing.sh	2006-10-28 21:21:19 UTC (rev 2436)
@@ -36,6 +36,7 @@
 DUMPS=$TMP_D/dump
 mkdir $TMP_D 		2>/dev/null
 
+LIST_ISOMORPH=$(echo ; isomorph --list $ISO )
 isomorph --add boot "splash=n debugmorphix=yes" $ISO $TMP_D/qemu.iso
 qemu -full-screen -pidfile $TMP_D/qemu.pid -user-net -cdrom $TMP_D/qemu.iso &
 
@@ -84,8 +85,9 @@
 
 # Create the intro to the video
 title="Autotesting using Qemu"
-text=" $ISO \n \n The iso has been ammended to help debugging \n Added the bootoptions splash=n debugmorphix=y \n Also added a mini-module Morphix-Mini-Debug-Auto-Testing.mod \n This mini-module prints out debug information to the screen \n of course the iso does not normally contain this minimodule \n or display this information. \n \n $COMMENTS"
-convert -size 600x440 xc:white -pointsize 25 -fill darkblue  -annotate 0x0+250+75 "$title" -pointsize 16 -fill blue  -annotate 0x0+50+200 "$text"  -append $LOGO -bordercolor darkblue -border 20x20 -flatten "$DUMPS"0.jpg
+text=" $ISO - The iso has been ammended to help debugging. The boot-options splash=n debugmorphix=y have been added and a MiniModule Morphix-Mini-Debug-Auto-Testing.mod added. This MiniModule prints out debug information to the screen, the iso does not normally contain this MiniModule or display this information. \n $LIST_ISOMORPH \n \n $COMMENTS"
+FOLD_TEXT==$(echo "$text" |  fold -s -w 100 )
+convert -size 600x440 xc:white -pointsize 25 -fill darkblue  -annotate 0x0+250+75 "$title" -pointsize 10 -fill blue  -annotate 0x0+50+200 "$FOLD_TEXT" -append $LOGO -bordercolor darkblue -border 20x20 -flatten "$DUMPS"0.jpg
 convert "$DUMPS"0.jpg -resize 800x600 "$DUMPS"1.jpg
 mv "$DUMPS"1.jpg "$DUMPS"0.jpg
 l=1

Modified: trunk/mmaker/utils/auto-testing/run_testing.sh
===================================================================
--- trunk/mmaker/utils/auto-testing/run_testing.sh	2006-10-26 19:53:40 UTC (rev 2435)
+++ trunk/mmaker/utils/auto-testing/run_testing.sh	2006-10-28 21:21:19 UTC (rev 2436)
@@ -23,6 +23,7 @@
  
 DEBUG_MINI=/home/morph/minimods/Morphix-Mini-Debug-Auto-Testing.mod
 TMP_ISO_DIR=/tmp/iso
+TMP_TAR_DIR=/tmp/iso/tar/
 TMP_ISO_1=$TMP_ISO_DIR/tmp1.iso
 TMP_ISO_2=$TMP_ISO_DIR/tmp2.iso
 TMP_ISO_3=$TMP_ISO_DIR/start.iso
@@ -32,8 +33,11 @@
 DIVIDER="######################################################"
 TITLED="------------------------------------------------------- "
 
+
+
 mkdir $TMP_ISO_DIR 	2>/dev/null
 mkdir $VID_DIR 		2>/dev/null
+mkdir $TMP_TAR_DIR 	2>/dev/null
 
 export DISPLAY=:0.0
 
@@ -145,6 +149,9 @@
       date
       cp $TMP_BASES $TMP_ISO_1
       for EACH_MINI in $ALL_MINIS; do
+        echo $DIVIDER
+	echo "Adding " $EACH_MINI
+        echo $DIVIDER
 	sudo isomorph --add mini $EACH_MINI $TMP_ISO_1 $TMP_ISO_3
 	mv $TMP_ISO_3 $TMP_ISO_1
       done
@@ -154,6 +161,9 @@
       echo "Run auto_testing"
       echo $TITLED
       date
+      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  700
       sudo rm $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN
       echo $TMP_ISO_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN
@@ -164,12 +174,33 @@
       date
       rsync -avz --delete -e ssh $VID_DIR morphix-FLx77brhBubMZ2x0e22RKNi2O/[email protected]:morphixorg/autobuilds/video/
       cp $VID_DIR/$TMP_MAINMODS_BN'_'$TMP_BASES_BN.ogg /home/morph/autobuilds/video/
+      date
       # This machine get hot -  have 20 minutes to cool down
-      date
       sleep 1200
       date      
     fi
+    #Zip the log and xml files of the base and main_modules
+    TMP_BASES_DIRNAME=$(cd $(dirname "${TMP_BASES}") && pwd)
+    TMP_BASES_BN_NO_EXT=${TMP_BASES_BN%.*}
+    cp $TMP_BASES_DIRNAME/$TMP_BASES_BN_NO_EXT.log $TMP_BASES_DIRNAME/$TMP_BASES_BN_NO_EXT.xml $TMP_TAR_DIR/
   done
+  TMP_MAINMODS_DIRNAME=$(cd $(dirname "${TMP_MAINMODS}") && pwd)
+  TMP_MAINMODS_NO_EXT=${TMP_MAINMODS_BN%.*}
+  cp $TMP_MAINMODS_DIRNAME/$TMP_MAINMODS_NO_EXT.log $TMP_MAINMODS_DIRNAME/$TMP_MAINMODS_NO_EXT.xml $TMP_TAR_DIR/  
 done
-
+for EACH_MINI in $ALL_MINIS; do
+  TMP_EACH_MINI_BN=$(basename $EACH_MINI)  
+  TMP_EACH_MINI_NO_EXT=${TMP_EACH_MINI_BN%.*}
+  TMP_EACH_MINI_DIRNAME=$(cd $(dirname "${EACH_MINI}") && pwd) 
+  cp $TMP_EACH_MINI_DIRNAME/$TMP_EACH_MINI_NO_EXT.xml $TMP_EACH_MINI_DIRNAME/$TMP_EACH_MINI_NO_EXT.log $TMP_TAR_DIR/
+done
+echo "List tmp tar dir"
+ls $TMP_TAR_DIR/ -lrth
+cd $TMP_TAR_DIR ; tar cvzf $VID_DIR/$TODAY.log_xml.tar.gz $TMP_TAR_DIR/*
+echo $DIVIDER
+echo "Upload log and xml as tar.gz"
+echo $TITLED
+gzip -c $LOG_FILE >$VID_DIR/$LOG_FILE_BN'_'$TODAY'_.gz'
+rsync -avz --delete -e ssh $VID_DIR morphix-FLx77brhBubMZ2x0e22RKNi2O/[email protected]:morphixorg/autobuilds/video/
+rm $TMP_TAR_DIR/*
 sudo rm $TMP_ISO_DIR -r

Modified: trunk/mmaker/utils/local_autobuilds.sh
===================================================================
--- trunk/mmaker/utils/local_autobuilds.sh	2006-10-26 19:53:40 UTC (rev 2435)
+++ trunk/mmaker/utils/local_autobuilds.sh	2006-10-28 21:21:19 UTC (rev 2436)
@@ -36,6 +36,7 @@
 	echo "Building $BASENAME"
         echo "Start Build: $BUILDTIME" > $LOCAL_DIR/$BASENAME$BUILDTIME.log
 	if [ "$MODULE_TYPE" = "main" ]; then 
+		echo  $mod $LOCAL_DIR/$BASENAME$BUILDTIME.mod
 		sudo mmaker    $mod $LOCAL_DIR/$BASENAME$BUILDTIME.mod >> $LOCAL_DIR/$BASENAME$BUILDTIME.log 2>&1
 	else
 		sudo morphmini $mod $LOCAL_DIR/$BASENAME$BUILDTIME.mod >> $LOCAL_DIR/$BASENAME$BUILDTIME.log 2>&1	
@@ -54,7 +55,7 @@
 build_main
 
 # delete all files in WORKING_DIR after 3 days
-find $LOCAL_DIR/[^local]* -ctime +1 -exec rm {} \;
+find $LOCAL_DIR/[^local]* -ctime +1 -exec sudo rm {} \;
 
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642