# -*- coding: utf-8 -*-
# $Id$
"""
VirtualBox Validation Kit - OS/2 install tests.
"""
__copyright__ = \
"""
Copyright (C) 2010-2014 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
General Public License (GPL) as published by the Free Software
Foundation, in version 2 as it comes in the "COPYING" file of the
VirtualBox OSE distribution. VirtualBox OSE is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
The contents of this file may alternatively be used under the terms
of the Common Development and Distribution License Version 1.0
(CDDL) only, as it comes in the "COPYING.CDDL" file of the
VirtualBox OSE distribution, in which case the provisions of the
CDDL are applicable instead of those of the GPL.
You may elect to license modified versions of this file under the
terms and conditions of either the GPL or the CDDL or both.
"""
# Standard Python imports.
import os
import sys
# Only the main script needs to modify the path.
try: __file__
# Validation Kit imports.
"""
OS/2 unattended installation.
Scenario:
- Create new VM that corresponds specified installation ISO image
- Create HDD that corresponds to OS type that will be installed
- Set VM boot order: HDD, Floppy, ISO
- Start VM: sinse there is no OS installed on HDD, VM will booted from floppy
- After first reboot VM will continue installation from HDD automatically
- Wait for incomming TCP connection (guest should initiate such a
connection in case installation has been completed successfully)
"""
# VM parameters required to run ISO image.
# Format: (cBytesHdd, sKind)
kaoVmParams = {
}
"""
Reinitialize child class instance.
"""
self.asExtraData = []
#
# Overridden methods.
#
"""
Extend usage info
"""
return rc
"""
Extend standard options set
"""
iArg += 1
iArg += 1
else:
return iArg + 1
"""
Configure pre-conditions.
"""
if not self.importVBoxApi():
return False
return False
# Get VM params specific to ISO image
# Create VM itself
self.oVM = self.createTestVM(self.sVmName, 1, sKind = sKind, sDvdImage = self.sIso, cCpus = self.cCpus,
# Create HDD
# Set proper boot order
# Enable HW virt
# Enable I/O APIC
# Enable Nested Paging
# Enable PAE
# Remote desktop
# Set extra data
if self.asExtraData != []:
try:
except ValueError:
"""
Execute the testcase itself.
"""
return self.testDoInstallGuestOs()
#
# Test execution helpers.
#
"""
Install guest OS and wait for result
"""
if not reporter.isLocal(): ## @todo need to figure a better way of handling timeouts on the testboxes ...
oSession, _ = self.startVmAndConnectToTxsViaTcp(self.sVmName, fCdWait = False, cMsTimeout = cMsTimeout)
if oSession is not None:
# Wait until guest reported success
return False
if __name__ == '__main__':