Changeset 83479 in vbox for trunk/src/VBox/ValidationKit/testdriver
- Timestamp:
- Mar 30, 2020 12:56:39 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r82968 r83479 1055 1055 return self.fImportedVBoxApi; 1056 1056 1057 def sanitizeLogFlagsString(self, sString): 1058 """ 1059 Sanitizes a given log flag string by removing any separators (":" and ",") with 1060 a space and removes quotes. 1061 1062 ## @todo !!! HACK ALERT !!! Needed until we have proper argument parsing / quoting support. 1063 """ 1064 for ch in [ ':', ',' ]: 1065 if ch in sString: 1066 sString = sString.replace(ch, " "); 1067 for ch in [ '\'', '"' ]: 1068 if ch in sString: 1069 sString = sString.replace(ch, ""); 1070 return sString; 1071 1057 1072 def _startVBoxSVC(self): # pylint: disable=too-many-statements 1058 1073 """ Starts VBoxSVC. """ … … 1065 1080 except: pass; 1066 1081 os.environ['VBOX_LOG'] = self.sLogSvcGroups; 1067 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sLogSvcFlags,); # Append becuse of VBoxXPCOMIPCD. 1082 # Append because of VBoxXPCOMIPCD. 1083 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sanitizeLogFlagsString(self.sLogSvcFlags),); 1068 1084 if self.sLogSvcDest: 1069 1085 os.environ['VBOX_LOG_DEST'] = 'nodeny ' + self.sLogSvcDest; … … 1291 1307 except: pass; 1292 1308 os.environ['VBOX_LOG'] = self.sLogSelfGroups; 1293 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.s LogSelfFlags, );1309 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sanitizeLogFlagsString(self.sLogSelfFlags), ); 1294 1310 if self.sLogSelfDest: 1295 1311 os.environ['VBOX_LOG_DEST'] = 'nodeny ' + self.sLogSelfDest; … … 1811 1827 iArg += 1; 1812 1828 if iArg >= len(asArgs): 1813 raise base.InvalidOption('The "--vbox- svc-flags" takes an argument');1829 raise base.InvalidOption('The "--vbox-log-flags" takes an argument'); 1814 1830 self.sLogSelfFlags = asArgs[iArg]; 1815 1831 self.sLogSessionFlags = asArgs[iArg]; … … 2767 2783 asEnvFinal = [ 2768 2784 'VBOX_LOG=%s' % (self.sLogSessionGroups,), 2769 'VBOX_LOG_FLAGS=%s' % (self.s LogSessionFlags,),2785 'VBOX_LOG_FLAGS=%s' % (self.sanitizeLogFlagsString(self.sLogSessionFlags),), 2770 2786 'VBOX_LOG_DEST=nodeny %s' % (sLogDest,), 2771 2787 'VBOX_RELEASE_LOG_FLAGS=append time',
Note:
See TracChangeset
for help on using the changeset viewer.