mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-04 12:22:41 +01:00
Add support for Python 3
Add support for running under Python 3, while maintaining compatibility with Python 2. See http://python-future.org/compatible_idioms.html for more details behind these changes.
This commit is contained in:
committed by
Marc Bonnici
parent
c3ddb31d4d
commit
b3de85455a
@@ -15,7 +15,7 @@
|
||||
|
||||
# pylint: disable=E1101,W0201,E0203
|
||||
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
import re
|
||||
import select
|
||||
@@ -23,6 +23,7 @@ import json
|
||||
import threading
|
||||
import sqlite3
|
||||
import subprocess
|
||||
import sys
|
||||
from copy import copy
|
||||
|
||||
import pandas as pd
|
||||
@@ -143,7 +144,7 @@ class Jankbench(ApkWorkload):
|
||||
|
||||
for test_name, rep in results.index:
|
||||
test_results = results.ix[test_name, rep]
|
||||
for metric, value in test_results.iteritems():
|
||||
for metric, value in test_results.items():
|
||||
context.add_metric(metric, value, units=None, lower_is_better=True,
|
||||
classifiers={'test_name': test_name, 'rep': rep})
|
||||
|
||||
@@ -222,6 +223,8 @@ 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)
|
||||
if self.regex.search(line):
|
||||
self.run_ended.set()
|
||||
|
||||
|
Reference in New Issue
Block a user