[Piglit] [Patch v2 4/5] results_v0_tests.py: Use TestrunResult.load instead of load_results
Dylan Baker
baker.dylan.c at gmail.com
Thu Oct 30 14:27:00 PDT 2014
framework.results.load_results calls update_results() internally. This
means that as soon as a second method is added that updates results to
version 2 then the tests will start failing.
v2: - add this patch
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
framework/tests/results_v0_tests.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/framework/tests/results_v0_tests.py b/framework/tests/results_v0_tests.py
index fd8be26..c9ed91e 100644
--- a/framework/tests/results_v0_tests.py
+++ b/framework/tests/results_v0_tests.py
@@ -100,8 +100,9 @@ DATA['tests'].update({
},
})
-with utils.with_tempfile(json.dumps(DATA)) as f:
- RESULT = results._update_zero_to_one(results.load_results(f))
+with utils.with_tempfile(json.dumps(DATA)) as t:
+ with open(t, 'r') as f:
+ RESULT = results._update_zero_to_one(results.TestrunResult.load(f))
def test_dmesg():
@@ -188,8 +189,9 @@ def test_info_split():
data['tests']['sometest']['info'] = \
'Returncode: 1\n\nErrors:stderr\n\nOutput: stdout\n\nmore\n\nstuff'
- with utils.with_tempfile(json.dumps(data)) as f:
- results._update_zero_to_one(results.load_results(f))
+ with utils.with_tempfile(json.dumps(data)) as t:
+ with open(t, 'r') as f:
+ results._update_zero_to_one(results.TestrunResult.load(f))
def test_subtests_with_slash():
--
2.1.2
More information about the Piglit
mailing list