blob: 3c8e345ab3010f023a047275a765b0dc36cf424c [file] [log] [blame]
Harrison Mutai4126dc72021-11-23 11:34:41 +00001#
2# Copyright (c) 2022 Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# Determine the number of test groups, scale the terminal based on the number
8# of these.
9groups=system(sprintf("awk -F ',' 'NR!=1 {print $1}' %s | sort | uniq", ARG1))
10group_count=words(groups)
11
12# Terminal height should scale with the number of groups
13# (each group has a plot).
14set terminal pngcairo enhanced size 5400,9600 font ',14'
15
16set xrange [0:5<*] extend
17set ytic scale 0 nomirror
18set grid xtics
19set lmargin 70
20set bmargin 5
21set yrange [:] reverse
22set offsets 0,0,0.5,0.5
23set datafile separator ","
24
25set key autotitle columnhead
26
27# Create linetypes for coloured labels
28set linetype 1 linecolor "red"
29set linetype 2 linecolor "black"
30fill(n) = word("green red orange gray", n)
31
32set multiplot title "TF-A CI Test Results: " . jenkins_id \
33 font ",30" layout ceil(group_count/3.0),3
34
35 set style data histograms
36 set style fill solid 0.3 border -1
37 set key outside left vertical
38 set label "Test Suites" at screen 0.05,0.5 \
39 center front rotate font ",20"
40
41 do for [group in groups]{
42 set title group font ",18"
43 set style histogram rowstacked
44 filter = "awk -F, 'NR==1 || $1==\"".group."\"'"
45 col_count = 8
46 box_width = 0.5
47
48 plot for [col=5:col_count] '< '.filter.' '.ARG1 u col:0: \
49 (sum [i=5:col-1] column(i)): \
50 (sum [i=5:col] column(i)): \
51 ($0-box_width/2.):($0+box_width/2.):ytic(2) w boxxyerror \
52 ti columnhead(col) lc rgb fill(col-4)
53
54 unset key
55 }
56
57unset multiplot
58