[Intel-gfx] [PATCH i-g-t] scripts: Fix outdated quick-testlist.py

Gabriel Feceoru gabriel.feceoru at intel.com
Wed Apr 20 13:41:42 UTC 2016


Piglit changed the format of the result json file, replacing time attribute
float with a TimeAttribute object, which stores a start time and an end time.

Fixed this script by calculating the duration when reading the json results.

Signed-off-by: Gabriel Feceoru <gabriel.feceoru at intel.com>
---
 scripts/quick-testlist.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/quick-testlist.py b/scripts/quick-testlist.py
index 0dd4c69..ffd6bb9 100755
--- a/scripts/quick-testlist.py
+++ b/scripts/quick-testlist.py
@@ -32,7 +32,11 @@ def filter_results(filename):
     for test_name in json_data["tests"]:
         if json_data["tests"][test_name]["result"] == "incomplete":
             continue
-        if json_data["tests"][test_name]["time"] < 60:
+
+        duration = json_data["tests"][test_name]["time"]['end'] - \
+                    json_data["tests"][test_name]["time"]['start']
+
+        if duration < 60:
             print(test_name)
 
 
-- 
1.9.1



More information about the Intel-gfx mailing list