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