Commit 3241e782 authored by Kenneth Graunke's avatar Kenneth Graunke

framework: Remove checking for the pre-JSON piglit file format.

It was polite to print a message shortly after the conversion, but at
this point, it's basically dead code.
parent 9455e5a8
......@@ -50,7 +50,6 @@ __all__ = [
'Group',
'Test',
'testBinDir',
'ResultFileInOldFormatError',
]
class JSONWriter:
......@@ -259,11 +258,6 @@ class GroupResult(dict):
return root
class ResultFileInOldFormatError(Exception):
def __init__(self, filepath):
super(Exception, self).__init__(filepath)
self.filepath = filepath
class TestrunResult:
def __init__(self):
self.serialized_keys = [
......@@ -278,19 +272,6 @@ class TestrunResult:
self.lspci = None
self.tests = {}
def __checkFileIsNotInOldFormat(self, file):
'''
If file contains the old, custom format, then raise
``ResultFileInOldFormatError``.
:return: None
'''
saved_position = file.tell()
first_line = file.readline()
if first_line.startswith('name:'):
raise ResultFileInOldFormatError(file.name)
file.seek(saved_position)
def __repairFile(self, file):
'''
Reapair JSON file if necessary
......@@ -365,7 +346,6 @@ class TestrunResult:
json.dump(raw_dict, file, indent=JSONWriter.INDENT)
def parseFile(self, file):
self.__checkFileIsNotInOldFormat(file)
file = self.__repairFile(file)
raw_dict = json.load(file)
......
......@@ -326,10 +326,7 @@ def main():
results = []
for result_dir in OptionList:
try:
results.append(loadresult(result_dir))
except core.ResultFileInOldFormatError as e:
print('warning: skipping result file because it is in old format, json is now required: file={0}'.format(e.message))
results.append(loadresult(result_dir))
summary = framework.summary.Summary(results)
for j in range(len(summary.testruns)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment