diff options
author | Chad Versace <chad@chad-versace.us> | 2011-07-12 07:18:53 -0700 |
---|---|---|
committer | Chad Versace <chad@chad-versace.us> | 2011-07-14 10:25:34 -0700 |
commit | b2ae931c5891a35aa3ddd22159b24e0d532e3b3d (patch) | |
tree | 6868805a52fdce7770997ed2cd7bb2b58a25237a /piglit-merge-results.py | |
parent | 0a9773ea4d2a795fb0ff77fa92f41dd08af81be0 (diff) |
framework: Replace custom serialization format with json
The results file produced by piglit-run.py contains a serialized
TestrunResult, and the serialization format was horridly homebrew. This
commit replaces that insanity with json.
Benefits:
- Net loss of 113 lines of code (ignoring comments and empty lines).
- By using the json module in the Python standard library, serializing
and unserializing is nearly as simple as `json.dump(object, file)`
and `json.load(object, file)`.
- By using a format that is easy to manipulate, it is now simple to
extend Piglit to allow users to embed custom data into the results
file.
As a side effect, the summary file is no longer needed, so it is no longer
produced.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
Diffstat (limited to 'piglit-merge-results.py')
-rwxr-xr-x | piglit-merge-results.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/piglit-merge-results.py b/piglit-merge-results.py index 4095e486c..eff8d5c61 100755 --- a/piglit-merge-results.py +++ b/piglit-merge-results.py @@ -68,8 +68,8 @@ def main(): for resultsDir in args: results = core.loadTestResults(resultsDir) - for testname, result in results.allTestResults().items(): - combined.results[testname] = result + for testname, result in results.tests.items(): + combined.tests[testname] = result combined.write(sys.stdout) |