blob: 8e20a9ea7dd3020d54a5e10245f845e8aa7bd53e [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/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