Changeset 93068 in vbox for trunk/src/VBox/ValidationKit/testdriver
- Timestamp:
- Dec 23, 2021 1:22:16 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py
r92886 r93068 73 73 self._fUnpackedBuildFiles = False; 74 74 self._fAutoInstallPuelExtPack = True; 75 self._fKernelDrivers = True; 75 76 76 77 # … … 91 92 reporter.log(' Indicates that the PUEL extension pack should not be installed if found.'); 92 93 reporter.log(' The default is to install it if found in the vbox-build.'); 94 reporter.log(' --no-kernel-drivers'); 95 reporter.log(' Indicates that the kernel drivers should not be installed on platforms where this is supported.'); 96 reporter.log(' The default is to install them.'); 93 97 reporter.log(' --'); 94 98 reporter.log(' Indicates the end of our parameters and the start of the sub'); … … 115 119 elif asArgs[iArg] == '--puel-extpack': 116 120 self._fAutoInstallPuelExtPack = True; 121 elif asArgs[iArg] == '--no-kernel-drivers': 122 self._fKernelDrivers = False; 123 elif asArgs[iArg] == '--kernel-drivers': 124 self._fKernelDrivers = True; 117 125 else: 118 126 return TestDriverBase.parseOption(self, asArgs, iArg); … … 661 669 return self._executeSync(['hdiutil', 'attach', '-readonly', '-mount', 'required', '-mountpoint', sMountPath, sDmg, ]); 662 670 671 def _generateWithoutKextsChoicesXmlOnDarwin(self): 672 """ 673 Generates the choices XML when kernel drivers are disabled. 674 None is returned on failure. 675 """ 676 sPath = os.path.join(self.sScratchPath, 'DarwinChoices.xml'); 677 oFile = utils.openNoInherit(sPath, 'wt'); 678 oFile.write('<?xml version="1.0" encoding="UTF-8"?>\n' 679 '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n' 680 '<plist version="1.0">\n' 681 '<array>\n' 682 ' <dict>\n' 683 ' <key>attributeSetting</key>\n' 684 ' <integer>0</integer>\n' 685 ' <key>choiceAttribute</key>\n' 686 ' <string>selected</string>\n' 687 ' <key>choiceIdentifier</key>\n' 688 ' <string>choiceVBoxKEXTs</string>\n' 689 ' </dict>\n' 690 '</array>\n' 691 '</plist>\n'); 692 oFile.close(); 693 return sPath; 694 663 695 def _installVBoxOnDarwin(self): 664 696 """ Installs VBox on Mac OS X.""" … … 679 711 # Install the package. 680 712 sPkg = os.path.join(self._darwinDmgPath(), 'VirtualBox.pkg'); 681 fRc, _ = self._sudoExecuteSync(['installer', '-verbose', '-dumplog', '-pkg', sPkg, '-target', '/']); 713 if self._fKernelDrivers: 714 fRc, _ = self._sudoExecuteSync(['installer', '-verbose', '-dumplog', '-pkg', sPkg, '-target', '/']); 715 else: 716 sChoicesXml = self._generateWithoutKextsChoicesXmlOnDarwin(); 717 if sChoicesXml is not None: 718 fRc, _ = self._sudoExecuteSync(['installer', '-verbose', '-dumplog', '-pkg', sPkg, \ 719 '-applyChoiceChangesXML', sChoicesXml, '-target', '/']); 720 else: 721 fRc = False; 682 722 683 723 # Unmount the DMG and we're done.
Note:
See TracChangeset
for help on using the changeset viewer.