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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux