From 1822773cd5e415c7b05740be06202bd02523446b Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Tue, 26 May 2009 22:07:52 +0200 Subject: Piglit update database --- dxo-piglit-update-database | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 dxo-piglit-update-database diff --git a/dxo-piglit-update-database b/dxo-piglit-update-database new file mode 100755 index 0000000..f027116 --- /dev/null +++ b/dxo-piglit-update-database @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Hacked-together script for updating and building the results summaries on +# http://people.freedesktop.org/~nh/piglit/results/ +# The script is based on a database of results in the ${database}. +# The structure of the database is: +# classes/classes: +# File listing device classes, one per line, e.g.: +# R300 +# R500 +# classes/${classname}: (for every class listed above) +# Listing all results in this class in chronological order, one per line, e.g.: +# R300ND-2008-06-12 +# R300ND-2008-06-13-2 +# R300ND-2008-06-30 +# R300ND-2008-07-04 +# database/${resultname}: (for all results appearing in a classes/${classname} file) +# a Piglit summary file +# incoming/${classname}/ +# directory where new results may be placed that will be automatically +# moved to their right place by this script + + +### Configuration +piglitdir=${DXO_PATH}/piglit/repo +webdir=~/web/fdo/html/piglit/results +database=~/web/fdo/piglit-results + + +### Script starts here +mkdir -p ${webdir} +classes=$(cat ${database}/classes/classes) + +for class in ${classes}; do + incomingdir=${database}/incoming/${class} + mkdir -p ${incomingdir} + rm -f ${incomingdir}/*~ + newresults=`find ${incomingdir} -type f -printf '%f '` + for newresult in ${newresults}; do + echo "Got new report ${newresult} in class ${class}" + echo ${newresult} >> ${database}/classes/${class} + mv ${incomingdir}/${newresult} ${database}/database/${newresult} + done +done + +echo "[" > tmpresults.all + +for class in ${classes}; do + echo "Building report for class ${class}" + echo "['${database}/database/$(tail -n 1 ${database}/classes/${class})'," >> tmpresults.all + echo "{'name': '${class}', 'href': '../${class}/index.html'}]," >> tmpresults.all + + classlist=$(tail -n 4 ${database}/classes/${class} | sed s@^@${database}/database/@) + ${piglitdir}/piglit-summary-html.py -o ${webdir}/${class} ${classlist} +done + +echo "Building report across classes" +echo "]" >> tmpresults.all +${piglitdir}/piglit-summary-html.py -o -l tmpresults.all ${webdir}/all +rm tmpresults.all -- cgit v1.2.3