summaryrefslogtreecommitdiff
path: root/deqp-results-to-markdown
diff options
context:
space:
mode:
Diffstat (limited to 'deqp-results-to-markdown')
-rwxr-xr-xdeqp-results-to-markdown41
1 files changed, 41 insertions, 0 deletions
diff --git a/deqp-results-to-markdown b/deqp-results-to-markdown
new file mode 100755
index 0000000..6ef3106
--- /dev/null
+++ b/deqp-results-to-markdown
@@ -0,0 +1,41 @@
+#!/usr/bin/env python3
+
+import csv
+import collections
+
+
+def main():
+ outcomes = ('Pass', 'Fail', 'Skip', 'Warn', 'Timeout', 'Flake')
+ header = ''.join([
+ '| | ', ' | '.join(outcomes), ' |\n',
+ '| ---------------- | ', ' | '.join([(len(o) - 1) * '-' + ':' for o in outcomes]), ' |',
+ ])
+ test_results = ''.join([
+ '| **dEQP-{API}** |{', '}|{'.join(outcomes), '}|',
+ ])
+
+ print(header)
+
+ for API in ('gles2', 'gles3', 'gles31', 'vk'):
+ histogram = collections.Counter()
+ for o in outcomes:
+ histogram[o] = 0
+
+ try:
+ with open(f'deqp-{API}/results.csv') as csvfile:
+ reader = csv.reader(csvfile)
+ for row in reader:
+ test_result = row[1]
+ histogram[test_result] += 1
+ except IOError as error:
+ continue
+
+ for o in outcomes:
+ if histogram[o] == 0:
+ histogram[o] = ' '
+
+ print(test_results.format(API=API.upper(), **histogram))
+
+
+if __name__ == '__main__':
+ main()