diff options
author | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-05-26 22:07:52 +0200 |
---|---|---|
committer | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-05-26 22:07:52 +0200 |
commit | 1822773cd5e415c7b05740be06202bd02523446b (patch) | |
tree | 75996967c6e437de69a4e3d925cca43b369677c5 | |
parent | 81bc1a3ba1190ac032cde16be867f0278a6f1e09 (diff) |
Piglit update database
-rwxr-xr-x | dxo-piglit-update-database | 60 |
1 files changed, 60 insertions, 0 deletions
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 |