Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #!/bin/bash |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 2 | # |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 3 | # Copyright OpenEmbedded Contributors |
| 4 | # |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0-only |
| 6 | # |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | # This is an example script to be used in conjunction with test_build_time.sh |
| 8 | |
| 9 | if [ "$TEST_BUILDDIR" = "" ] ; then |
| 10 | echo "TEST_BUILDDIR is not set" |
| 11 | exit 1 |
| 12 | fi |
| 13 | |
| 14 | buildsubdir=`basename $TEST_BUILDDIR` |
| 15 | if [ ! -d $buildsubdir ] ; then |
| 16 | echo "Unable to find build subdir $buildsubdir in current directory" |
| 17 | exit 1 |
| 18 | fi |
| 19 | |
| 20 | if [ -f oe-init-build-env ] ; then |
| 21 | . ./oe-init-build-env $buildsubdir |
| 22 | elif [ -f poky-init-build-env ] ; then |
| 23 | . ./poky-init-build-env $buildsubdir |
| 24 | else |
| 25 | echo "Unable to find build environment setup script" |
| 26 | exit 1 |
| 27 | fi |
| 28 | |
| 29 | if [ -f ../meta/recipes-sato/images/core-image-sato.bb ] ; then |
| 30 | target="core-image-sato" |
| 31 | else |
| 32 | target="poky-image-sato" |
| 33 | fi |
| 34 | |
| 35 | echo "Build started at `date "+%Y-%m-%d %H:%M:%S"`" |
| 36 | echo "bitbake $target" |
| 37 | bitbake $target |
| 38 | ret=$? |
| 39 | echo "Build finished at `date "+%Y-%m-%d %H:%M:%S"`" |
| 40 | exit $ret |
| 41 | |