test_build_time_worker.sh 944 B

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