VirtualBox

Changeset 78634 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
May 21, 2019 2:22:03 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
130702
Message:

tdCreateVMWithDefaults1.py: Corrections and adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/api/tdCreateVMWithDefaults1.py

    r78633 r78634  
    160160        """
    161161        if not self.importVBoxApi():
    162             return False
     162            return reporter.error('importVBoxApi');
    163163
    164         aoGuestTypes = self.oVBoxMgr.getArray(self.oVBox, 'guestOSTypes')
    165         if aoGuestTypes is None or len(aoGuestTypes) < 1:
    166             return False;
     164        # Get the guest OS types.
     165        try:
     166            aoGuestTypes = self.oVBoxMgr.getArray(self.oVBox, 'guestOSTypes')
     167            if aoGuestTypes is None or len(aoGuestTypes) < 1:
     168                return reporter.error('No guest OS types');
     169        except:
     170            return reporter.errorXcpt();
    167171
    168         reporter.testStart('create-vm-with-defaults')
     172        # Create VMs with defaults for each of the guest types.
     173        reporter.testStart('Create VMs with defaults');
    169174        fRc = True
    170         try:
    171             for oGuestType in aoGuestTypes:
    172                 reporter.testStart('Checking VM creation (%s)' % (oGuestType.id))
    173                 fRc = self.createVMWithDefaults(oGuestType.id)
    174                 reporter.testDone()
    175                 if not fRc:
    176                     break
    177 
    178             assert fRc is True
    179         except:
    180             reporter.errorXcpt()
    181 
    182         reporter.testDone('create-vm-with-defaults')
     175        for oGuestType in aoGuestTypes:
     176            try:
     177                sGuestType = oGuestType.id;
     178            except:
     179                fRc = reporter.errorXcpt();
     180            else:
     181                reporter.testStart(sGuestType);
     182                fRc = self.createVMWithDefaults(sGuestType) & fRc;
     183                reporter.testDone();
     184        reporter.testDone();
    183185
    184186        return fRc
Note: See TracChangeset for help on using the changeset viewer.

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