tdSmokeTest1.py revision cf22150eaeeb72431bf1cf65c309a431454fb22b
# -*- coding: utf-8 -*-
# $Id$
"""
VirtualBox Validation Kit - Smoke Test #1.
"""
__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.
"""
__version__ = "$Revision$"
# Standard Python imports.
import os;
import sys;
# Only the main script needs to modify the path.
try: __file__
g_ksValidationKitDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))));
# Validation Kit imports.
from testdriver import reporter;
from testdriver import base;
from testdriver import vbox;
from testdriver import vboxcon;
"""
VBox Smoke Test #1.
"""
#
# Overridden methods.
#
return rc;
iArg += 1;
raise base.InvalidOption('The "--nic-attachment" value "%s" is not supported. Valid values are: bridged, nat' \
% (self.sNicAttachment));
# Disable all but a few VMs and configurations.
else:
else:
return iArg + 1;
def actionVerify(self):
'Please unzip a Validation Kit build in the current directory or in some parent one.'
% (self.sVBoxValidationKitIso,) );
return False;
def actionConfig(self):
# Make sure vboxapi has been imported so we can use the constants.
if not self.importVBoxApi():
return False;
# Do the configuring.
else: eNic0AttachType = None;
assert self.sVBoxValidationKitIso is not None;
return self.oTestVmSet.actionConfig(self, eNic0AttachType = eNic0AttachType, sDvdImage = self.sVBoxValidationKitIso);
def actionExecute(self):
"""
Execute the testcase.
"""
#
# Test execution helpers.
#
"""
Runs the specified VM thru test #1.
"""
# Simple test.
if oSession is not None:
## @todo do some quick tests: save, restore, execute some test program, shut down the guest.
# cleanup.
return True;
return None;
if __name__ == '__main__':