From 1dd5095ff703b7813cb7cb12091078e28e0f9ee0 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 19 Jul 2011 15:14:52 +0100 Subject: scripts/contrib: add build time regression test script test_build_time.sh is a bash script 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, and returns a value telling "git bisect run" whether the build time is good (under the specified threshold) or bad (over it). (From OE-Core rev: d866a36d7839247e8cf61512a0092d7f4f396d1a) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- scripts/contrib/test_build_time.sh | 237 ++++++++++++++++++++++++++++++ scripts/contrib/test_build_time_worker.sh | 37 +++++ 2 files changed, 274 insertions(+) create mode 100755 scripts/contrib/test_build_time.sh create mode 100755 scripts/contrib/test_build_time_worker.sh (limited to 'scripts/contrib') diff --git a/scripts/contrib/test_build_time.sh b/scripts/contrib/test_build_time.sh new file mode 100755 index 0000000000..9e5725ae54 --- /dev/null +++ b/scripts/contrib/test_build_time.sh @@ -0,0 +1,237 @@ +#!/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