summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylanx.c.baker@intel.com>2014-10-30 14:00:43 -0700
committerDylan Baker <dylanx.c.baker@intel.com>2014-10-31 09:00:25 -0700
commit4b63f02d58d9573351e866236c779688e9f6aae1 (patch)
tree1f6445936232ae8a3480271fc46a3a25594926d6
parent7b7efb8afc71f9ae6481294c483b307ad6253004 (diff)
results_v0_tests.py: Use TestrunResult.load instead of load_results
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@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--framework/tests/results_v0_tests.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/framework/tests/results_v0_tests.py b/framework/tests/results_v0_tests.py
index fd8be26ff..c9ed91eca 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():