diff options
Diffstat (limited to 'scripts/contrib/test_build_time_worker.sh')
-rwxr-xr-x | scripts/contrib/test_build_time_worker.sh | 37 |
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 | |||
5 | if [ "$TEST_BUILDDIR" = "" ] ; then | ||
6 | echo "TEST_BUILDDIR is not set" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | buildsubdir=`basename $TEST_BUILDDIR` | ||
11 | if [ ! -d $buildsubdir ] ; then | ||
12 | echo "Unable to find build subdir $buildsubdir in current directory" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | if [ -f oe-init-build-env ] ; then | ||
17 | . ./oe-init-build-env $buildsubdir | ||
18 | elif [ -f poky-init-build-env ] ; then | ||
19 | . ./poky-init-build-env $buildsubdir | ||
20 | else | ||
21 | echo "Unable to find build environment setup script" | ||
22 | exit 1 | ||
23 | fi | ||
24 | |||
25 | if [ -f ../meta/recipes-sato/images/core-image-sato.bb ] ; then | ||
26 | target="core-image-sato" | ||
27 | else | ||
28 | target="poky-image-sato" | ||
29 | fi | ||
30 | |||
31 | echo "Build started at `date "+%Y-%m-%d %H:%M:%S"`" | ||
32 | echo "bitbake $target" | ||
33 | bitbake $target | ||
34 | ret=$? | ||
35 | echo "Build finished at `date "+%Y-%m-%d %H:%M:%S"`" | ||
36 | exit $ret | ||
37 | |||