#!/bin/sh # move previous glean results from current to previous if [ -e current ] ; then rm -rf previous mv current previous fi # start xserver and run glean against it, capturing output to /tmp/glean.log echo >/tmp/glean.log xinit `pwd`/glean-wrapper -- :99 -multiwindow -noclipboard +iglx >/tmp/xinit.log 2>&1 cat /tmp/glean.log # crudely summarize pass/fail statistics PASS=`grep -c "PASS " /tmp/glean.log` FAIL=`grep -c "FAIL " /tmp/glean.log` # compare with previous statistics PREV_PASS=`cat .glean.pass 2>/dev/null || echo 0` PREV_FAIL=`cat .glean.fail 2>/dev/null || echo 9999` EXITCODE=0 if [ $PASS -lt $PREV_PASS ] || [ $FAIL -gt $PREV_FAIL ] ; then # report an error echo ================== echo "Warning: current PASS: $PASS FAIL: $FAIL worse than previous PASS: $PREV_PASS FAIL: $PREV_FAIL" echo ================== #EXITCODE=1 else # record pass/fail counts for checking next time echo $PASS >.glean.pass echo $FAIL >.glean.fail fi echo ================== echo Comparison with previous test results echo ================== # use glean compare mode to report differences $JHBUILD_CHECKOUTROOT/glean/bin/glean -c previous current 2>/dev/null exit $EXITCODE