#!/bin/bash # Build performance regression test script # # Copyright 2011 Intel Corporation # All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # DESCRIPTION # This script is intended to be used in conjunction with "git bisect run" # in order to find regressions in build time, however it can also be used # independently. It cleans out the build output directories, runs a # specified worker script (an example is test_build_time_worker.sh) under # TIME(1), logs the results to TEST_LOGDIR (default /tmp) and returns a # value telling "git bisect run" whether the build time is good (under # the specified threshold) or bad (over it). There is also a tolerance # option but it is not particularly useful as it only subtracts the # tolerance from the given threshold and uses it as the actual threshold. # # It is also capable of taking a file listing git revision hashes to be # test-applied to the repository in order to get past build failures that # would otherwise cause certain revisions to have to be skipped; if a # revision does not apply cleanly then the script assumes it does not # need to be applied and ignores it. # # Please see the help output (syntax below) for some important setup # instructions. # # AUTHORS # Paul Eggleton syntax() { echo "syntax: $0