Changeset 84544 in vbox
- Timestamp:
- May 26, 2020 4:07:58 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r84483 r84544 1935 1935 cOthers += aSubResult[3]; 1936 1936 elif eType is vboxcon.FsObjType_File: 1937 reporter.log 2(' File "%s"' % oFsObjInfo.name);1937 reporter.log4(' File "%s"' % oFsObjInfo.name); 1938 1938 cFiles += 1; 1939 1939 elif eType is vboxcon.FsObjType_Symlink: 1940 reporter.log 2(' Symlink "%s" -- not tested yet' % oFsObjInfo.name);1940 reporter.log4(' Symlink "%s" -- not tested yet' % oFsObjInfo.name); 1941 1941 cOthers += 1; 1942 1942 elif oTestVm.isWindows() \ … … 2098 2098 return fRc; 2099 2099 2100 def gctrlExecute(self, oTest, oGuestSession, fIsError): 2100 def gctrlExecute(self, oTest, oGuestSession, fIsError): # pylint: disable=too-many-statements 2101 2101 """ 2102 2102 Helper function to execute a program on a guest, specified in the current test. … … 2125 2125 # Start the process: 2126 2126 # 2127 reporter.log2('Executing sCmd=%s, afFlags=%s, timeoutMS=%d, asArgs=%s, asEnv=%s' 2128 % (oTest.sCmd, oTest.afFlags, oTest.timeoutMS, oTest.asArgs, oTest.aEnv,)); 2127 reporter.log2('Executing sCmd=%s, afFlags=%s, timeoutMS=%d, asEnv=%s' 2128 % (oTest.sCmd, oTest.afFlags, oTest.timeoutMS, oTest.aEnv,)); 2129 2130 # Don't be too noisy by default when testing reeeeeeally long arguments. 2131 if len(oTest.asArgs) <= 64: 2132 reporter.log2('asArgs=%s' % (oTest.asArgs,)); 2133 else: 2134 reporter.log4('asArgs=%s' % (oTest.asArgs,)); 2135 2129 2136 try: 2130 2137 oProcess = oGuestSession.processCreate(oTest.sCmd, … … 2205 2212 reporter.log2('Process (PID %d) got %d bytes of %s data (type: %s)' 2206 2213 % (iPid, len(abBuf), sFdNm, type(abBuf))); 2207 sBuf = ''; 2208 if sys.version_info >= (2, 7): 2209 if isinstance(abBuf, memoryview): ## @todo Why is this happening? 2210 abBuf = abBuf.tobytes(); 2211 sBuf = abBuf.decode("utf-8"); 2212 if isinstance(abBuf, buffer): 2213 sBuf = str(abBuf); 2214 for sLine in sBuf.splitlines(): 2215 reporter.log('%s: %s' % (sFdNm, sLine)); 2214 if reporter.getVerbosity() >= 4: 2215 sBuf = ''; 2216 if sys.version_info >= (2, 7): 2217 if isinstance(abBuf, memoryview): ## @todo Why is this happening? 2218 abBuf = abBuf.tobytes(); 2219 sBuf = abBuf.decode("utf-8"); 2220 if isinstance(abBuf, buffer): 2221 sBuf = str(abBuf); 2222 for sLine in sBuf.splitlines(): 2223 reporter.log4('%s: %s' % (sFdNm, sLine)); 2216 2224 acbFdOut[iFd] += len(abBuf); 2217 2225 oTest.sBuf = abBuf; ## @todo Figure out how to uniform + append!
Note:
See TracChangeset
for help on using the changeset viewer.

