def __exit__(self, exception_type, exception_value, traceback):
pass
+ def filter_line(self, line):
+ """Returns False if the provided output line can be suppressed."""
+ return True
+
def sanity_check(self):
"""Raises a HardwareException if any hardware state is not as expected."""
pass
exception_value, exception_traceback)
self._unlock_clocks()
+ def filter_line(self, line):
+ JUNK = ['NvRmPrivGetChipPlatform: Could not read platform information',
+ 'Expected on kernels without fuse support, using silicon']
+ return False if line in JUNK else HardwareAndroid.filter_line(self, line)
+
def _lock_clocks(self):
if not self._adb.is_root():
return
'--config', 'gpu',
'--skp', 'warmup']
dump_commandline_if_verbose(commandline)
- output = subprocess.check_output(commandline).decode('utf-8')
+ output = subprocess.check_output(commandline, stderr=subprocess.STDOUT)
+
# validate the warmup run output.
- for line in output.split('\n'):
+ for line in output.decode('utf-8').split('\n'):
match = BenchResult.match(line.rstrip())
if match and match.bench == 'warmup':
return
_path.basename(self.skp) + '.png')
commandline.extend(['--png', pngfile])
dump_commandline_if_verbose(commandline)
- self._proc = subprocess.Popen(commandline, stdout=subprocess.PIPE)
+ self._proc = subprocess.Popen(commandline, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
self._monitor = SubprocessMonitor(self._queue, self._proc)
self._monitor.start()
if result:
hardware.sanity_check()
self._process_result(result)
- else:
+ elif hardware.filter_line(message.value):
print(message.value, file=sys.stderr)
- sys.stdout.flush()
continue
if message.message == Message.POLL_HARDWARE:
hardware.sanity_check()
"(%s%% instead of %s%%)." %
(result.config, result.bench, self.best_result.stddev,
result.stddev), file=sys.stderr)
+ sys.stdout.flush()
if self.max_stddev and self.best_result.stddev > self.max_stddev:
raise StddevException()