summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/test_build_time_worker.sh
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-19 15:14:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-20 15:27:31 +0100
commit1dd5095ff703b7813cb7cb12091078e28e0f9ee0 (patch)
tree9f3ae76a4259053f774f351d429a8bc4caee2d03 /scripts/contrib/test_build_time_worker.sh
parent114960a7c4c1be6d294b2cf9915a9396045859d1 (diff)
downloadpoky-1dd5095ff703b7813cb7cb12091078e28e0f9ee0.tar.gz
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 <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/test_build_time_worker.sh')
-rwxr-xr-xscripts/contrib/test_build_time_worker.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/contrib/test_build_time_worker.sh b/scripts/contrib/test_build_time_worker.sh
new file mode 100755
index 0000000000..8e20a9ea7d
--- /dev/null
+++ b/scripts/contrib/test_build_time_worker.sh
@@ -0,0 +1,37 @@
1#!/bin/bash
2
3# This is an example script to be used in conjunction with test_build_time.sh
4
5if [ "$TEST_BUILDDIR" = "" ] ; then
6 echo "TEST_BUILDDIR is not set"
7 exit 1
8fi
9
10buildsubdir=`basename $TEST_BUILDDIR`
11if [ ! -d $buildsubdir ] ; then
12 echo "Unable to find build subdir $buildsubdir in current directory"
13 exit 1
14fi
15
16if [ -f oe-init-build-env ] ; then
17 . ./oe-init-build-env $buildsubdir
18elif [ -f poky-init-build-env ] ; then
19 . ./poky-init-build-env $buildsubdir
20else
21 echo "Unable to find build environment setup script"
22 exit 1
23fi
24
25if [ -f ../meta/recipes-sato/images/core-image-sato.bb ] ; then
26 target="core-image-sato"
27else
28 target="poky-image-sato"
29fi
30
31echo "Build started at `date "+%Y-%m-%d %H:%M:%S"`"
32echo "bitbake $target"
33bitbake $target
34ret=$?
35echo "Build finished at `date "+%Y-%m-%d %H:%M:%S"`"
36exit $ret
37