Skip to contentSkip to conversation

scripts: Fix outdated quick-testlist.py

PATCH New Gabriel Feceoru 1 participant 1 message Apr 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: Fix outdated quick-testlist.py

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.

---
 scripts/quick-testlist.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/quick-testlist.py +5 -1
index 0dd4c69..ffd6bb9 100755
@@ -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)
 
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx