- Timestamp:
- Apr 1, 2020 11:13:00 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r83479 r83500 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 ",") with1060 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 1072 1057 def _startVBoxSVC(self): # pylint: disable=too-many-statements 1073 1058 """ Starts VBoxSVC. """ … … 1080 1065 except: pass; 1081 1066 os.environ['VBOX_LOG'] = self.sLogSvcGroups; 1082 # Append because of VBoxXPCOMIPCD. 1083 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sanitizeLogFlagsString(self.sLogSvcFlags),); 1067 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sLogSvcFlags,); # Append becuse of VBoxXPCOMIPCD. 1084 1068 if self.sLogSvcDest: 1085 1069 os.environ['VBOX_LOG_DEST'] = 'nodeny ' + self.sLogSvcDest; … … 1307 1291 except: pass; 1308 1292 os.environ['VBOX_LOG'] = self.sLogSelfGroups; 1309 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.s anitizeLogFlagsString(self.sLogSelfFlags), );1293 os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sLogSelfFlags, ); 1310 1294 if self.sLogSelfDest: 1311 1295 os.environ['VBOX_LOG_DEST'] = 'nodeny ' + self.sLogSelfDest; … … 1782 1766 raise base.InvalidOption('The "--vbox-self-log-flags" takes an argument'); 1783 1767 self.sLogSelfFlags = asArgs[iArg]; 1768 print('self.sLogSelfFlags="%s"' % (self.sLogSelfFlags,)) 1784 1769 elif asArgs[iArg] == '--vbox-self-log-dest': 1785 1770 iArg += 1; … … 1827 1812 iArg += 1; 1828 1813 if iArg >= len(asArgs): 1829 raise base.InvalidOption('The "--vbox- log-flags" takes an argument');1814 raise base.InvalidOption('The "--vbox-svc-flags" takes an argument'); 1830 1815 self.sLogSelfFlags = asArgs[iArg]; 1831 1816 self.sLogSessionFlags = asArgs[iArg]; … … 2783 2768 asEnvFinal = [ 2784 2769 'VBOX_LOG=%s' % (self.sLogSessionGroups,), 2785 'VBOX_LOG_FLAGS=%s' % (self.s anitizeLogFlagsString(self.sLogSessionFlags),),2770 'VBOX_LOG_FLAGS=%s' % (self.sLogSessionFlags,), 2786 2771 'VBOX_LOG_DEST=nodeny %s' % (sLogDest,), 2787 2772 'VBOX_RELEASE_LOG_FLAGS=append time',
Note:
See TracChangeset
for help on using the changeset viewer.