summaryrefslogtreecommitdiff
path: root/documentation/build-results.sh
blob: bb7ea0a63f60d36e84d179697b369b49c5fb6508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
#
# Hacked-together script for building the results summaries on
#  http://people.freedesktop.org/~nh/piglit/results/
# The script is based on a database of results in the ${databasedir}.
# The ${classesdir} is supposed to contain one file classes which
# is simply a list of class names, and one file for each class which
# contains names of results for that class, in chronological order.
#
# So for example, ${classesdir} might contain the files:
#
# ${classesdir}/classes:
#   R300
#   R500
#
# ${classesdir}/R300:
#   R300ND-2008-06-12
#   R300ND-2008-06-13-2
#   R300ND-2008-06-30
#   R300ND-2008-07-04
#
# And similarly, ${classesdir}/R500.
# Corresponding results of test runs must exist in ${databasedir}


### Configuration
piglitdir=~/dev/xorg/piglit/repo
resultsdir=../html/piglit/results
classesdir=./classes
databasedir=./database


### Script starts here
SUMMARY=${piglitdir}/piglit-summary-html.py

mkdir -p ${resultsdir}
classes=$(cat ${classesdir}/classes)

echo "[" > tmpresults.all

latest=
for class in ${classes}; do
	echo "Building report for class ${class}"
	echo "['${databasedir}/$(tail -n 1 ${classesdir}/${class})'," >> tmpresults.all
	echo "{'name': '${class}', 'href': '../${class}/index.html'}]," >> tmpresults.all

	classlist=$(tail -n 4 ${classesdir}/${class} | sed s@^@${databasedir}/@)
	${SUMMARY} -o ${resultsdir}/${class} ${classlist}
done

echo "Building report across classes"
echo "]" >> tmpresults.all
${SUMMARY} -o -l tmpresults.all ${resultsdir}/all
rm tmpresults.all