#!/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