test_build_time_worker.sh 861 B

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