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