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