[SCM] debian-live/autotesting branch, master, updated. 0179fa0ab299b42a9ef15d8612fa8322ee435eca

Brendan M. Sleight (none) bms at brum.
Tue Jul 7 21:46:34 UTC 2009


The following commit has been merged in the master branch:
commit 0179fa0ab299b42a9ef15d8612fa8322ee435eca
Author: Brendan M. Sleight <bms at brum.(none)>
Date:   Tue Jul 7 22:45:13 2009 +0100

    My mistake on using git - forcing an extra push.

diff --git a/Makefile b/Makefile
index 43eb3c1..7841d91 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,9 @@ autotesting:
 	cp ./README $(DESTDIR)/usr/share/autotesting/README
 	mkdir -p $(DESTDIR)/usr/share/autotesting/tests
 	cp -r ./tests/* $(DESTDIR)/usr/share/autotesting/tests/
-	
+	xmlstarlet tr ./tests-source/transform-to-test-list.xml ./tests-source/debian-live-all.xml  >$(DESTDIR)/usr/share/autotesting/tests/debian-live-all.xml 
+	xmlstarlet tr ./tests-source/transform-to-test-list.xml ./tests-source/debian-live-i386-iso.xml  >$(DESTDIR)/usr/share/autotesting/tests/debian-live-i386-iso.xml
+	xmlstarlet tr ./tests-source/transform-to-test-list.xml ./tests-source/debian-live-i386-iso-xfce.xml >$(DESTDIR)/usr/share/autotesting/tests/debian-live-i386-iso-xfce.xml
 clean:
 
 remove:
diff --git a/README.setup b/README.setup
index 65af90f..0a184c8 100644
--- a/README.setup
+++ b/README.setup
@@ -43,7 +43,7 @@ Commands:-
 
 Install Webserver
 =================
-To be able to view the results, of autotesting a webserver is helpful.
+To be able to view the results of autotesting a webserver is helpful.
 
 Commands:-
   adduser autotesting www-data
diff --git a/autotesting.py b/autotesting.py
index 423cd6e..c2b7cf4 100644
--- a/autotesting.py
+++ b/autotesting.py
@@ -19,7 +19,7 @@
 
 
 from optparse import OptionParser
-import amara, datetime, os, shutil, subprocess, telnetlib, tempfile, time
+import amara, datetime, os, shutil, subprocess, sys, telnetlib, tempfile, time
 
 def displayNumber():
     """Really a global we can change later to something better.
@@ -30,6 +30,7 @@ def log(message):
     """ Print [date] message """ 
     now = datetime.datetime.now()
     print "[" + str(now) + "] " + str(message) 
+    sys.stdout.flush()
 
 def cronCheak(frequency):
     """Check if the frequency (e.g. daily, weekly, mounthly is due to 
@@ -99,6 +100,7 @@ def startXvfb(display, xscreen, background):
     authority = authorityFile()
     xvfbCommand = ["Xvfb", display, "-auth", authority.name, "-screen", "0", xscreen] 
     xvfb = subprocess.Popen(xvfbCommand)
+    time.sleep(1)
     log("Setting Xvfb background")
     xloadimage = ["xloadimage", "-display", display, "-onroot", "-fullscreen", background]
     retcode = subprocess.call(xloadimage)
@@ -134,7 +136,7 @@ def openingTitles(display, test):
     log("Showing Opening Titles")
     time.sleep(2)
     xmessage(display, str(test.title), "Autotesting of: " + str(test.title), "3", "monospace 14")
-    xmessage(display, str(test.title), str(test.description), "3", "monospace 12")
+    xmessage(display, str(test.title), str(test.description), "3", "monospace 6")
     xmessage(display, str(test.title), "Created at " + str(datetime.datetime.now()), "2", "monospace 10")
 
 def runningQemu(display, test, qemuDownload):
@@ -269,9 +271,14 @@ def main():
             xvfb = startXvfb(display, str(test.qemu.xscreen), background.name)
             (recordMyDesktop, video) = startRecordMyDesktop(display)
             openingTitles(display, test)
-            qemu = runningQemu(display, test, download.name)
-            finalImage = captureScreenshot(display)
-            kill(qemu, "Killing qemu")
+            try:
+                qemu = runningQemu(display, test, download.name)
+                finalImage = captureScreenshot(display)
+                kill(qemu, "Killing qemu")
+            except:
+                xmessage(display, str(test.title), "Qemu failed to run correctly!", "5", "monospace 14")
+                finalImage = captureScreenshot(display)
+                log("Qemu failed")
             kill(recordMyDesktop, "Killing recordmysdesktop")
             waitUntilEncodingFinished(recordMyDesktop)
             kill(xvfb, "Killing Xvfb")
@@ -279,7 +286,10 @@ def main():
             montage = createMontage(video, test)
             fileOutputs(test, video, finalImage, montage)
             log("Finished Autotesting of: " + str(test.title))
-            log("*****************************")        
+            log("*****************************")
+        else:
+            log("Skipping Autotesting of: " + str(test.title) + " as frequency " + str(test.frequency))
+            log("*****************************")
 
 if __name__ == "__main__":
     main()
diff --git a/debian/changelog b/debian/changelog
index 1a1e879..a53e686 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+autotesting (0.0.1-1.1) unstable; urgency=low
+
+  * Adding some useful test templates 
+
+ -- Brendan M. Sleight <bms at barwap.com>  Sun, 05 Jul 2009 23:40:36 +0100
+
 autotesting (0.0.1-1) unstable; urgency=low
 
   * Initial release 
diff --git a/debian/control b/debian/control
index 1e4f133..d1e9395 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: autotesting
 Section: unknown
 Priority: optional
 Maintainer: Brendan M. Sleight <bms at barwap.com>
-Build-Depends: debhelper (>= 7)
+Build-Depends: debhelper (>= 7), xmlstarlet
 Standards-Version: 3.7.3
 Homepage: <insert the upstream URL, if relevant>
 
diff --git a/tests-source/debian-live-all.xml b/tests-source/debian-live-all.xml
index c1bae8b..0fb80ed 100644
--- a/tests-source/debian-live-all.xml
+++ b/tests-source/debian-live-all.xml
@@ -24,13 +24,14 @@
           <qemu_options>-cdrom</qemu_options>
         </image>
         <image>
-          <name>usb-hd</name>
+          <name>usb-hdd</name>
           <extension>.img</extension>
-          <qemu-options>-hda</qemu-options>
+          <qemu_options>-hda</qemu_options>
         </image>
       </images>
       <packages>
         <package>gnome-desktop</package>
+        <package>kde-desktop</package>
         <package>lxde-desktop</package>
         <package>rescue</package>
         <package>standard</package>
diff --git a/tests/local-test_morphix-lightgui.xml b/tests/local-test_morphix-lightgui.xml
index df62b23..e318caf 100644
--- a/tests/local-test_morphix-lightgui.xml
+++ b/tests/local-test_morphix-lightgui.xml
@@ -7,19 +7,19 @@
       <background>http://www.morphix.org/templates/MorphixORG/images/mambo_header.jpg</background>
       <frequency>daily</frequency>
       <qemu>
-        <xscreen>800x600x24</xscreen>
+        <xscreen>1024x768x24</xscreen>
         <binary>qemu</binary>
         <options>-cdrom</options>
         <!-- Time to pause before sending keys presses -->
         <pause>10</pause>
-        <sendkeys>down,down,kp_enter</sendkeys>
+        <sendkeys>kp_enter</sendkeys>
         <!-- Time to run qmeu -->
-        <time>600</time>
+        <time>400</time>
       </qemu>
       <output>
         <!-- Number of test sets to keep -->
         <keep>4</keep>
-        <root>/home/bms/autotesting/tests/</root>
+        <root>/var/www/autotesting/</root>
         <local>morphix/lightGUI/</local>
         <video>autotesting.ogv</video>
         <screenshots>

-- 
debian-live/autotesting



More information about the debian-live-changes mailing list