From 8d8a8230925c7c1416d9882af980eca832744860 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sat, 17 Jan 2015 12:29:47 +0100 Subject: [PATCH] Properly detect successful boot on jessie --- tests/integration/instances/virtualbox.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration/instances/virtualbox.py b/tests/integration/instances/virtualbox.py index 07c2a1e..deaddcd 100644 --- a/tests/integration/instances/virtualbox.py +++ b/tests/integration/instances/virtualbox.py @@ -57,7 +57,14 @@ class VirtualBoxInstance(Instance): log.debug('Booting vbox machine `{name}\''.format(name=self.name)) self.machine.launch_vm_process(self.session, 'headless').wait_for_completion(-1) from ..tools import read_from_socket - self.console_output = read_from_socket(self.serial_port_path, 'INIT: Entering runlevel: 2', 20) + # Gotta figure out a more reliable way to check when the system is done booting. + # Maybe bootstrapped unit test images should have a startup script that issues + # a callback to the host. + if self.image.manifest.system['release'] in ['squeeze', 'wheezy']: + termination_string = 'INIT: Entering runlevel: 2' + else: + termination_string = 'Debian GNU/Linux' + self.console_output = read_from_socket(self.serial_port_path, termination_string, 20) def shutdown(self): log.debug('Shutting down vbox machine `{name}\''.format(name=self.name))