test_build_time_worker.sh 904 B

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