perf testsuite: python 3 fixes
authorSimon Marchi <simon.marchi@ericsson.com>
Fri, 8 Jan 2016 15:22:17 +0000 (10:22 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 8 Jan 2016 15:22:17 +0000 (10:22 -0500)
commit582a1b0064b14cb12b18f48678876d32c59c11c8
tree350fc2c4df4978026437fcb6b36ed3edf52aabc7
parent2f99e8fc9cb84ca80cfca6c119f1f22bbfd2a314
perf testsuite: python 3 fixes

There are a few errors when trying to run the performance testsuite with
Python 3.  This commit fixes them.

In Python 2, it was possible to use relative imports (importing a module
relative to the current one).  In Python 3 it isn't.  So I use
absolute_import from the __future__ module, which allows Python 2 to
behave like Python 3, and use the Python 3 syntax.

In Python 3, dict.iterkeys doesn't exist anymore.  Using dict.keys is a
good compromise in this case.

gdb/testsuite/ChangeLog:

* gdb.perf/lib/perftest/perftest.py: Change relative imports to
absolute.
(SingleStatisticTestResult.report): Use dict.keys instead of
dict.iterkeys.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.perf/lib/perftest/perftest.py
gdb/testsuite/gdb.perf/lib/perftest/testresult.py