#!/bin/bash # Since it's a pain to manually update the acceptable diffs, this script will pick # new and modified diffs from the buildbot results, massage them slightly, display # the difference between the old and new (or the new if no old one) and ask # whether the diff should be updated. # # This script assumes that buildbot log files are available in $bblogdir; this # will be true only on the buildbot master. program=${0##*/} progdir=${0%/*} bblogdir=/var/lib/buildbot/master/ietfdb/builder1 function die() { echo "$program: $*"; echo "Terminating"; exit 1; } sudo chown buildbot:staff -R $bblogdir sudo chmod g+rw -R $bblogdir latest=$(ls $bblogdir | egrep "^[0-9]+$" | sort -nr | head -n 1) function urltimes() { awk ' /^OK/ { path = $3 } /^ *2007-/ { time[path] = substr($2, 2) } END { for (path in time) { printf "%8s %s\n", time[path], path } } ' "$@" } echo "Longest URL fetch times from build $latest:" cat $bblogdir/$latest-log-django-test-stdio | tr -d "\r" | urltimes | sort -n | tail