ubuntu-server-iso-testing-dev team mailing list archive
-
ubuntu-server-iso-testing-dev team
-
Mailing list archive
-
Message #00021
[Merge] lp:~jibel/ubuntu-server-iso-testing/flavor+desktop_fixes into lp:ubuntu-server-iso-testing
Jean-Baptiste Lallement has proposed merging lp:~jibel/ubuntu-server-iso-testing/flavor+desktop_fixes into lp:ubuntu-server-iso-testing.
Requested reviews:
Ubuntu Server Iso Testing Developers (ubuntu-server-iso-testing-dev)
For more details, see:
https://code.launchpad.net/~jibel/ubuntu-server-iso-testing/flavor+desktop_fixes/+merge/58252
--
https://code.launchpad.net/~jibel/ubuntu-server-iso-testing/flavor+desktop_fixes/+merge/58252
Your team Ubuntu Server Iso Testing Developers is requested to review the proposed merge of lp:~jibel/ubuntu-server-iso-testing/flavor+desktop_fixes into lp:ubuntu-server-iso-testing.
=== modified file 'debian/changelog'
--- debian/changelog 2011-03-10 09:01:45 +0000
+++ debian/changelog 2011-04-19 09:32:24 +0000
@@ -1,3 +1,17 @@
+ubuntu-server-iso-testing (1.0-1~ppa16) natty; urgency=low
+
+ * Desktop Testing:
+ - Increase wait time between steps in Ubiquity
+ - Start a basic http server to collect syslog
+ * Add support for flavor
+ * Added option --no-act to download-latest-test-iso.py to show what will
+ actually be downloaded
+ * run_test.py: calculate the timeout by a time difference rather than
+ decrementing a counter. On an heavy loaded environment the time shift
+ could reach 10 minutes per hour.
+
+ -- Jean-Baptiste Lallement <jean-baptiste.lallement@xxxxxxxxxx> Tue, 19 Apr 2011 11:24:35 +0200
+
ubuntu-server-iso-testing (1.0-1~ppa15) natty; urgency=low
* Desktop Testing:
=== modified file 'download-latest-test-iso.py'
--- download-latest-test-iso.py 2011-01-12 22:01:21 +0000
+++ download-latest-test-iso.py 2011-04-19 09:32:24 +0000
@@ -35,7 +35,7 @@
DEFAULT_VARIANT = 'server'
DEFAULT_RELEASE = 'maverick'
DEFAULT_ARCH = 'all'
-DEFAULT_FLAVOR= 'ubuntu'
+DEFAULT_FLAVOR= 'ubuntu-server'
DEFAULT_ISOROOT = os.path.expanduser('~/isos')
# URLS
@@ -102,6 +102,9 @@
help="location to store iso images (default=%s)" % DEFAULT_ISOROOT)
parser.add_option("-f", "--flavor", dest="flavor", default=DEFAULT_FLAVOR,
help="flavor of Ubuntu to download (default=%s)" % DEFAULT_FLAVOR)
+parser.add_option('-n', '--no-act', default=False, action='store_true',
+ dest='no_act', help='compute everything but don\'t actually download')
+
(options, args) = parser.parse_args()
if options.debug:
@@ -155,7 +158,7 @@
l_iso_name = options.release + '-' + options.variant + '-' + arch + '.iso'
lock = FileLock('/tmp/' + l_iso_name)
with lock:
- l_iso_dir = options.flavor + '-' + options.variant
+ l_iso_dir = options.flavor
l_iso_location = os.path.join(options.isoroot, l_iso_dir, l_iso_name)
# If iso does not exists then mark for retrieval
if os.path.exists(l_iso_location):
@@ -180,6 +183,12 @@
cmd = ['dl-ubuntu-test-iso', '--variant=%s' % options.variant,
'--arch=%s' % arch, '--release=%s' % options.release,
'--build=%s' % l_build,'--isoroot=%s' % options.isoroot, '-P']
+ if options.flavor:
+ cmd.append('--flavor=%s' % options.flavor)
+
+ if options.no_act:
+ cmd.append('-n')
+
logging.debug("Cmd: %s" % (cmd))
subprocess.check_call(cmd)
# Write out build version to file for later use - needs to be refactored
=== modified file 'run-test.py'
--- run-test.py 2011-03-04 13:50:04 +0000
+++ run-test.py 2011-04-19 09:32:24 +0000
@@ -65,7 +65,7 @@
DEFAULT_VARIANT = 'server'
DEFAULT_RELEASE = 'maverick'
DEFAULT_ARCH = 'i386'
-DEFAULT_FLAVOR= 'ubuntu'
+DEFAULT_FLAVOR= 'ubuntu-server'
DEFAULT_ISOROOT = os.path.expanduser('~/isos')
DEFAULT_TMPL_DIR = "/usr/share/ubuntu-server-iso-testing/templates"
DEFAULT_TEST_TIMEOUT = 1200
@@ -173,7 +173,7 @@
# Create useful handles to ISO location
iso_name = options.release + '-' + options.variant + '-' + options.arch + '.iso'
-iso_dir = options.flavor + '-' + options.variant
+iso_dir = options.flavor
iso_location = os.path.join(options.isoroot, iso_dir, iso_name)
# Extract kernel and initrd from ISO to build new initrd including
@@ -425,7 +425,6 @@
# Monitor the state of the virtual machine to determine
# completion of execution of test scripts
-l_timeout = TEST_TIMEOUT
l_macAddress = None
l_ipAddress = None
@@ -510,6 +509,7 @@
output = proc.communicate()[0].strip()
return output
+start_time = time.time()
while True:
if l_ipAddress is None:
l_ipAddress = get_ipAddress(test['_id'], mac_address)
@@ -532,7 +532,7 @@
if l_retcode == 0 and l_output == "shut off":
logging.debug("VM powered off for test case %s" % test['_id'])
break
- elif l_timeout <= 0:
+ elif start_time + TEST_TIMEOUT < time.time():
logging.debug("Test %s failed to execute within %d minutes" % (test['_id'], TEST_TIMEOUT / 60))
logging.debug("Terminating test case %s" % (test['_id']))
cmd = [ "virsh", "destroy", test['_id']]
@@ -542,8 +542,6 @@
else:
# Have another look in SLEEP_TIME seconds
time.sleep(SLEEP_TIME)
- # Decrement the timeout
- l_timeout = l_timeout - SLEEP_TIME
# Retrieve latest copy of data
test = db[test['_id']]
=== modified file 'templates.desktop/run_test.wrapper'
--- templates.desktop/run_test.wrapper 2011-03-09 21:10:39 +0000
+++ templates.desktop/run_test.wrapper 2011-04-19 09:32:24 +0000
@@ -53,6 +53,8 @@
RUNTEST=/usr/local/bin/run_test
if [ -x "$RUNTEST" ]; then
+ # Start a local http server to grab the logs
+ cd /var/log; sudo python -m SimpleHTTPServer 80 &
sleep 5
# Sometimes at-spi hangs with no reason, refresh it
sudo pkill /usr/lib/at-spi/at-spi-registryd
=== modified file 'templates.desktop/test_cases/ubiquity/test'
--- templates.desktop/test_cases/ubiquity/test 2011-03-09 21:10:39 +0000
+++ templates.desktop/test_cases/ubiquity/test 2011-04-19 09:32:24 +0000
@@ -27,6 +27,7 @@
logging.basicConfig(level=logging.DEBUG)
+
class DefaultTest(unittest.TestCase):
main_window = 'frmlive_installer'
btn_forward = 'btnnext'
@@ -41,13 +42,14 @@
txt_password1 = 'txtpassword' # Password
txt_password2 = 'txtverifiedpassword' # Password confirmation
+
def _waittillenabled(self, ui, component_name, timeout = 300):
- ldtp.wait(5) # UI is slow to react sometimes
+ ldtp.wait(15) # UI is slow to react sometimes
component = ui.getchild(component_name)
while not component.stateenabled():
logging.debug("SMOKETEST: Waiting for %s. Till %d to go" % (component_name, timeout))
- ldtp.wait(1)
- timeout =- 1
+ ldtp.wait(15)
+ timeout -= 15
if timeout < 0: return False
#ldtp.wait(2)
return True
@@ -71,12 +73,12 @@
logging.info("SMOKETEST: Launching Ubiquity")
ldtp.launchapp('ubiquity', ['gtk_ui'])
ldtp.waittillguiexist(self.main_window)
- ldtp.wait(15) # Ubiquity in a VM is sooo sloooow
+ ldtp.wait(30) # Ubiquity in a VM is sooo sloooow
ui = ooldtp.context(self.main_window)
# First Screen
logging.info("SMOKETEST: Welcome Screen")
- ldtp.wait(2)
+ ldtp.wait(30)
ui.click(self.btn_forward)
self._waittillenabled(ui, self.btn_forward)
@@ -91,9 +93,9 @@
logging.info("SMOKETEST: Use entire partition")
ui.click(self.rbtn_useentiredisk)
ui.click(self.btn_forward)
- ldtp.wait(5)
+ ldtp.wait(30)
ui.remap()
- ldtp.wait(2)
+ ldtp.wait(30)
self._waittillenabled(ui, self.btn_installnow)
logging.info("SMOKETEST: Allocate Drive Space")
@@ -122,12 +124,18 @@
ui.settextvalue(self.txt_password1, data['password1'])
ui.settextvalue(self.txt_password2, data['password2'])
ui.click(self.rbtn_loginautomatically)
- ldtp.wait(2)
+ ldtp.wait(30)
ui.click(self.btn_forward)
+ ldtp.wait(30)
+ #if ui.guiexist(self.btn_forward):
+ # component = ui.getchild(self.btn_forward)
+ # if component.stateenabled():
+ # ui.click(self.btn_forward)
+
ldtp.waittillguiexist('dlgfinished_dialog', guiTimeOut = 60 * 20)
- ldtp.wait(1)
+ ldtp.wait(30)
# Don't reboot just verify that ubiquity is done
self.assertTrue(ldtp.guiexist('dlgfinished_dialog', 'btnrebootbutton'))
Follow ups