Tools: Fix closing a perf server
Jeffrey Pfau jeffrey@endrift.com
Sat, 05 Mar 2016 18:11:00 -0800
1 files changed,
9 insertions(+),
5 deletions(-)
jump to
M
tools/perf.py
→
tools/perf.py
@@ -103,12 +103,15 @@ self.socket.send(os.path.join("/perfroms", test.rom))
self.results.append(next(self.reader)) self.iterations -= 1 if self.iterations == 0: - self.socket.send("\n"); - self.reader = None - self.socket.close() - time.sleep(5) - self.socket = None + self.finish() self.iterations = self.ITERATIONS_PER_INSTANCE + + def finish(self): + self.socket.send("\n"); + self.reader = None + self.socket.close() + time.sleep(5) + self.socket = None class Suite(object): def __init__(self, cwd, wall=None, game=None, renderer='software'):@@ -153,6 +156,7 @@ return results
if test.results: results.append(test.results) if self.server: + self.server.finish() results.extend(self.server.results) return results