summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2023-09-05 12:20:45 -0400
committerMatt Turner <mattst88@gmail.com>2023-09-05 12:20:45 -0400
commita4561c5f6253de226732ca9de883e603456832d6 (patch)
tree7f520aa1acd8713e60b820c662ef33d87407245a
parentbcd701c1f83027e4ae0e1c0815ced555486a1d35 (diff)
deqp-results-to-markdown: Add script
-rwxr-xr-xdeqp-results-to-markdown38
1 files changed, 38 insertions, 0 deletions
diff --git a/deqp-results-to-markdown b/deqp-results-to-markdown
new file mode 100755
index 0000000..0874513
--- /dev/null
+++ b/deqp-results-to-markdown
@@ -0,0 +1,38 @@
+#!/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
+
+ 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
+
+ for o in outcomes:
+ if histogram[o] == 0:
+ histogram[o] = ' '
+
+ print(test_results.format(API=API.upper(), **histogram))
+
+
+if __name__ == '__main__':
+ main()