mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-29 22:24:51 +00:00
Remove Python 2 support
Python 2 is long dead and devlib does not support it anymore, so cleanup old Python 2-only code.
This commit is contained in:
committed by
Marc Bonnici
parent
28b78a93f1
commit
6fe4bce68d
@@ -223,8 +223,7 @@ class JankbenchRunMonitor(threading.Thread):
|
||||
ready, _, _ = select.select([proc.stdout, proc.stderr], [], [], 2)
|
||||
if ready:
|
||||
line = ready[0].readline()
|
||||
if sys.version_info[0] == 3:
|
||||
line = line.decode(sys.stdout.encoding, 'replace')
|
||||
line = line.decode(sys.stdout.encoding, 'replace')
|
||||
if self.regex.search(line):
|
||||
self.run_ended.set()
|
||||
proc.terminate()
|
||||
|
||||
@@ -256,10 +256,7 @@ class Meabo(Workload):
|
||||
|
||||
outfile = os.path.join(context.output_directory, 'meabo-output.txt')
|
||||
with open(outfile, 'wb') as wfh:
|
||||
if sys.version_info[0] == 3:
|
||||
wfh.write(self.output.encode('utf-8'))
|
||||
else:
|
||||
wfh.write(self.output)
|
||||
wfh.write(self.output.encode('utf-8'))
|
||||
context.add_artifact('meabo-output', outfile, kind='raw')
|
||||
|
||||
cur_phase = 0
|
||||
|
||||
@@ -89,8 +89,7 @@ class PcMark(ApkUiautoWorkload):
|
||||
def update_output(self, context):
|
||||
expected_results = len(self.regex_matches[self.major_version])
|
||||
zf = zipfile.ZipFile(os.path.join(context.output_directory, self.result_file), 'r').read('Result.xml')
|
||||
if sys.version_info[0] == 3:
|
||||
zf = zf.decode(sys.stdout.encoding)
|
||||
zf = zf.decode(sys.stdout.encoding)
|
||||
for line in zf.split('\n'):
|
||||
for regex in self.regex_matches[self.major_version]:
|
||||
match = regex.search(line)
|
||||
|
||||
Reference in New Issue
Block a user