Changeset 106823 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Nov 4, 2024 7:40:36 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py
r106061 r106823 905 905 kasWindowsServices = [ 'vboxsup', 'vboxusbmon', 'vboxnetadp', 'vboxnetflt', 'vboxnetlwf' ]; 906 906 907 ## Windows SetupAPI log files we handle. 908 kasSetupApiLogFiles = [ 909 ( '%WINDIR%/setupapi.log', 'log/host-setupapi.log', 'SetupAPI (setupapi.log)', ), 910 ( '%WINDIR%/setupact.log', 'log/host-setupact.log', 'SetupAPI (setupact.log)', ), 911 ( '%WINDIR%/setuperr.log', 'log/host-setuperr.log', 'SetupAPI (setuperr.log)', ), 912 ]; 913 914 def _winPurgeSetupApiLogs(self): 915 """ 916 Tries deleting the Setup API host logs. 917 """ 918 for sFile, _ in self.kasSetupApiLogFiles: 919 sFile = os.path.expandvars(sFile); 920 try: 921 os.remove(sFile); 922 except: 923 pass; 924 925 def _winAddSetupApiLogs(self, sDescPrefix = None): 926 """ 927 Adds all defined (and existing) SetupAPI host logs to the report. 928 929 The sDescPrefix is an optional prefix for the file naming. 930 """ 931 if sDescPrefix: 932 sDescPrefix = sDescPrefix + ": "; 933 else: 934 sDescPrefix = ''; 935 936 for sFile, sKind, sDesc in self.kasSetupApiLogFiles: 937 sFile = os.path.expandvars(sFile); 938 if os.path.isfile(sFile): 939 reporter.addLogFile(sFile, sKind, sDescPrefix + sDesc); 940 907 941 def _installVBoxOnWindows(self): 908 942 """ Installs VBox on Windows.""" … … 952 986 return False; 953 987 988 # Try removing old setupapi logs to get a fresh start before installing our stuff. 989 self._winPurgeSetupApiLogs(); 990 954 991 # We need the help text to detect supported options below. 955 992 reporter.log('Executing: %s' % ([sExe, '--silent', '--help'], )); … … 987 1024 reporter.addLogFile(sLogFile, 'log/installer', "Verbose MSI installation log file"); 988 1025 self._waitForTestManagerConnectivity(30); 1026 1027 # Add setupapi logs if something failed, to give some more clues about driver installation. 1028 if fRc is False: 1029 self._winAddSetupApiLogs('Installation'); 989 1030 990 1031 return fRc; … … 1104 1145 time.sleep(2); # fudge. 1105 1146 1147 # Try removing old setupapi logs to get a fresh start before uninstalling our stuff. 1148 self._winPurgeSetupApiLogs(); 1149 1106 1150 # Do the uninstalling. 1107 1151 fRc = True; … … 1123 1167 if fRc is False and os.path.isfile(sLogFile): 1124 1168 reporter.addLogFile(sLogFile, 'log/uninstaller', "Verbose MSI uninstallation log file"); 1169 self._winAddSetupApiLogs('Uninstallation'); 1125 1170 sLogFile = None; 1126 1171
Note:
See TracChangeset
for help on using the changeset viewer.