VirtualBox

Ignore:
Timestamp:
Jan 22, 2018 11:17:53 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120432
Message:

tdExoticOrAncient1: sketches based on smoke tests.

Location:
trunk/src/VBox/ValidationKit/tests/smoketests
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/smoketests/Makefile.kmk

    r69111 r70695  
    3333ValidationKitTestsSmokeTests_INST = $(INST_VALIDATIONKIT)tests/smoketests/
    3434ValidationKitTestsSmokeTests_EXEC_SOURCES := \
    35         $(PATH_SUB_CURRENT)/tdSmokeTest1.py
     35        $(PATH_SUB_CURRENT)/tdSmokeTest1.py \
     36        $(PATH_SUB_CURRENT)/tdExoticOrAncient1.py
    3637
    3738VBOX_VALIDATIONKIT_PYTHON_SOURCES += $(ValidationKitTestsSmokeTests_EXEC_SOURCES)
  • trunk/src/VBox/ValidationKit/tests/smoketests/tdExoticOrAncient1.py

    r70605 r70695  
    44
    55"""
    6 VirtualBox Validation Kit - Smoke Test #1.
     6VirtualBox Validation Kit - Exotic and/or ancient OSes #1.
    77"""
    88
    99__copyright__ = \
    1010"""
    11 Copyright (C) 2010-2017 Oracle Corporation
     11Copyright (C) 2010-2018 Oracle Corporation
    1212
    1313This file is part of VirtualBox Open Source Edition (OSE), as
     
    4343# Validation Kit imports.
    4444from testdriver import reporter;
    45 from testdriver import base;
    4645from testdriver import vbox;
    47 from testdriver import vboxcon;
    4846
    4947
    50 class tdSmokeTest1(vbox.TestDriver):
     48class tdExoticOrAncient1(vbox.TestDriver):
    5149    """
    52     VBox Smoke Test #1.
     50    VBox exotic and/or ancient OSes #1.
    5351    """
    5452
     
    5654        vbox.TestDriver.__init__(self);
    5755        self.asRsrcs            = None;
    58         self.oTestVmSet         = self.oTestVmManager.getSmokeVmSet();
    59         self.sNicAttachmentDef  = 'mixed';
    60         self.sNicAttachment     = self.sNicAttachmentDef;
    61         self.fQuick             = False;
     56        self.oTestVmSet         = self.oTestVmManager.selectSet(  self.oTestVmManager.kfGrpAncient
     57                                                                | self.oTestVmManager.kfGrpExotic);
    6258
    6359    #
     
    6662    def showUsage(self):
    6763        rc = vbox.TestDriver.showUsage(self);
    68         reporter.log('');
    69         reporter.log('Smoke Test #1 options:');
    70         reporter.log('  --nic-attachment <bridged|nat|mixed>');
    71         reporter.log('      Default: %s' % (self.sNicAttachmentDef));
    72         reporter.log('  --quick');
    73         reporter.log('      Very selective testing.')
    7464        return rc;
    7565
    7666    def parseOption(self, asArgs, iArg):
    77         if asArgs[iArg] == '--nic-attachment':
    78             iArg += 1;
    79             if iArg >= len(asArgs): raise base.InvalidOption('The "--nic-attachment" takes an argument');
    80             self.sNicAttachment = asArgs[iArg];
    81             if self.sNicAttachment not in ('bridged', 'nat', 'mixed'):
    82                 raise base.InvalidOption('The "--nic-attachment" value "%s" is not supported. Valid values are: bridged, nat' \
    83                         % (self.sNicAttachment));
    84         elif asArgs[iArg] == '--quick':
    85             # Disable all but a few VMs and configurations.
    86             for oTestVm in self.oTestVmSet.aoTestVms:
    87                 if oTestVm.sVmName == 'tst-win2k3ent':          # 32-bit paging
    88                     oTestVm.asVirtModesSup  = [ 'hwvirt' ];
    89                     oTestVm.acCpusSup       = range(1, 2);
    90                 elif oTestVm.sVmName == 'tst-rhel5':            # 32-bit paging
    91                     oTestVm.asVirtModesSup  = [ 'raw' ];
    92                     oTestVm.acCpusSup       = range(1, 2);
    93                 elif oTestVm.sVmName == 'tst-win2k8':           # 64-bit
    94                     oTestVm.asVirtModesSup  = [ 'hwvirt-np' ];
    95                     oTestVm.acCpusSup       = range(1, 2);
    96                 elif oTestVm.sVmName == 'tst-sol10-64':         # SMP, 64-bit
    97                     oTestVm.asVirtModesSup  = [ 'hwvirt' ];
    98                     oTestVm.acCpusSup       = range(2, 3);
    99                 elif oTestVm.sVmName == 'tst-sol10':            # SMP, 32-bit
    100                     oTestVm.asVirtModesSup  = [ 'hwvirt-np' ];
    101                     oTestVm.acCpusSup       = range(2, 3);
    102                 else:
    103                     oTestVm.fSkip = True;
    104         else:
    105             return vbox.TestDriver.parseOption(self, asArgs, iArg);
    106         return iArg + 1;
     67        return vbox.TestDriver.parseOption(self, asArgs, iArg);
    10768
    10869    def actionVerify(self):
     
    11980            return False;
    12081
    121         # Do the configuring.
    122         if self.sNicAttachment == 'nat':        eNic0AttachType = vboxcon.NetworkAttachmentType_NAT;
    123         elif self.sNicAttachment == 'bridged':  eNic0AttachType = vboxcon.NetworkAttachmentType_Bridged;
    124         else:                                   eNic0AttachType = None;
    12582        assert self.sVBoxValidationKitIso is not None;
    126         return self.oTestVmSet.actionConfig(self, eNic0AttachType = eNic0AttachType, sDvdImage = self.sVBoxValidationKitIso);
     83        return self.oTestVmSet.actionConfig(self, sDvdImage = self.sVBoxValidationKitIso);
    12784
    12885    def actionExecute(self):
     
    14299        """
    143100
    144         oSession = self.openSession(oVM);
    145 
    146         # Enable audio adapter
    147         oSession.o.machine.audioAdapter.enabled = True;
    148 
    149         fRc = oSession.saveSettings();
    150         fRc = fRc and oSession.close();
    151         assert fRc is True;
    152 
    153101        # Simple test.
    154102        self.logVmInfo(oVM);
    155         oSession, oTxsSession = self.startVmAndConnectToTxsViaTcp(oTestVm.sVmName, fCdWait = True);
    156         if oSession is not None:
    157             self.addTask(oTxsSession);
    158 
    159             ## @todo do some quick tests: save, restore, execute some test program, shut down the guest.
    160 
    161             # cleanup.
    162             self.removeTask(oTxsSession);
    163             self.terminateVmBySession(oSession)
    164             return True;
     103        if oTestVm.fGrouping & self.oTestVmManager.kfGrpNoTxs:
     104            pass;   ## @todo serial port VMs.
     105        else:
     106            oSession, _ = self.startVmAndConnectToTxsViaTcp(oTestVm.sVmName, fCdWait = True);
     107            if oSession is not None:
     108                self.terminateVmBySession(oSession)
     109                return True;
    165110        return None;
    166111
    167112if __name__ == '__main__':
    168     sys.exit(tdSmokeTest1().main(sys.argv));
     113    sys.exit(tdExoticOrAncient1().main(sys.argv));
    169114
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette