[Piglit] [PATCH v2 2/2] core.py: don't write subtests as full entries

Dylan Baker baker.dylan.c at gmail.com
Wed Nov 13 08:51:50 PST 2013


This stops subtests from being written as full entries in the json.
Instead, in the summary code the test with subtests is treated as a
group, and the subtests as real tests. This has the added benefit of
reducing the size of the json by 80%.

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/core.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/framework/core.py b/framework/core.py
index 2d5d0dc..e7767c2 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -483,12 +483,7 @@ class Test:
 
             status(result['result'])
 
-            if 'subtest' in result and len(result['subtest'].keys()) > 1:
-                for test in result['subtest'].keys():
-                    result['result'] = result['subtest'][test]
-                    json_writer.write_dict_item(os.path.join(path, test), result)
-            else:
-                json_writer.write_dict_item(path, result)
+            json_writer.write_dict_item(path, result)
         else:
             status("dry-run")
 
-- 
1.8.1.5



More information about the Piglit mailing list