a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# -*- coding: utf-8 -*-
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncVirtualBox Validation Kit - Smoke Test #1.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncCopyright (C) 2010-2014 Oracle Corporation
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncThis file is part of VirtualBox Open Source Edition (OSE), as
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncavailable from http://www.virtualbox.org. This file is free software;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncyou can redistribute it and/or modify it under the terms of the GNU
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncGeneral Public License (GPL) as published by the Free Software
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncFoundation, in version 2 as it comes in the "COPYING" file of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncVirtualBox OSE distribution. VirtualBox OSE is distributed in the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynchope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncThe contents of this file may alternatively be used under the terms
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncof the Common Development and Distribution License Version 1.0
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync(CDDL) only, as it comes in the "COPYING.CDDL" file of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncVirtualBox OSE distribution, in which case the provisions of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncCDDL are applicable instead of those of the GPL.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncYou may elect to license modified versions of this file under the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncterms and conditions of either the GPL or the CDDL or both.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Standard Python imports.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Only the main script needs to modify the path.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncg_ksValidationKitDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))));
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Validation Kit imports.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync VBox Smoke Test #1.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync self.oTestVmSet = self.oTestVmManager.getSmokeVmSet();
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync # Overridden methods.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync reporter.log(' --nic-attachment <bridged|nat|mixed>');
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync reporter.log(' Default: %s' % (self.sNicAttachmentDef));
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync if iArg >= len(asArgs): raise base.InvalidOption('The "--nic-attachment" takes an argument');
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync if self.sNicAttachment not in ('bridged', 'nat', 'mixed'):
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync raise base.InvalidOption('The "--nic-attachment" value "%s" is not supported. Valid values are: bridged, nat' \
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync # Disable all but a few VMs and configurations.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync if oTestVm.sVmName == 'tst-win2k3ent': # 32-bit paging
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync elif oTestVm.sVmName == 'tst-rhel5': # 32-bit paging
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync elif oTestVm.sVmName == 'tst-sol10-64': # SMP, 64-bit
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync return vbox.TestDriver.parseOption(self, asArgs, iArg);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync if self.sVBoxValidationKitIso is None or not os.path.isfile(self.sVBoxValidationKitIso):
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync reporter.error('Cannot find the VBoxValidationKit.iso! (%s)'
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync 'Please unzip a Validation Kit build in the current directory or in some parent one.'
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync # Make sure vboxapi has been imported so we can use the constants.
else: eNic0AttachType = None;
return self.oTestVmSet.actionConfig(self, eNic0AttachType = eNic0AttachType, sDvdImage = self.sVBoxValidationKitIso);
if oSession is not None:
return True;